OVERVIEW: ========= Cocoon uses Configurations from Avalon to abstract keeping common config information in XML form and easily using and caching it in memory. However, it doesn't quite serve my purposes (I think) because it actually converts the XML into its internal format and doesn't allow XPath queries against it.
I'm beginning to suspect that there is no such object in C2 but rather caching is a component service provided by another component. However, I wish there already was some example of, say, a URLSource that was being cached in a simple way that I could retrieve it on demand. Specifically, each request will cause an XPath query against the XML and portions of those results will be propagated to the sitemap. E.g. this will all be handled by an Action. REQUIREMENTS: ============= I have some information in an XML file which is common to the entire web app (file is not tiny). For speed, I was thinking of storing it in a servlet context attribute so that it was accessible everywhere. I want to be able to execute XPath queries against it. Some of the attributes in the file need to be propa The XML file may be changed and should be reloaded. Among other things, I will want to stream the XPath results into the SAX stream (much like ReadDOMTransformer). SOLUTIONS: ========== 1. Use Configurations. - can be cached, etc. - doesn't allow XPath queries 2. Use URLSource and add caching (note to self: check if it already is). - how to add caching to an action (note to self: look at all the actions, again) 3. ?? Thanks in advance for any pointers, feedback. Per Kreipke --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>