cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <>
Subject RE: [Q] How to create a cached XML object in memory...
Date Wed, 03 Jul 2002 12:47:04 GMT
> From: Per Kreipke []
> =========
> Cocoon uses Configurations from Avalon to abstract keeping common
> information in XML form and easily using and caching it in memory.
> it doesn't quite serve my purposes (I think) because it actually
> 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,
> wish there already was some example of, say, a URLSource that was
> cached in a simple way that I could retrieve it on demand.
> Specifically, each request will cause an XPath query against the XML
> portions of those results will be propagated to the sitemap. E.g. this
> all be handled by an Action.
> =============
> 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
> 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
> stream (much like ReadDOMTransformer).
> ==========
> 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
> - how to add caching to an action (note to self: look at all the
> again)
> 3. ??

Use Parser.ROLE to parse it into the DOM tree and save it into the
context. Use XPathProcessor.ROLE to query it.


> Thanks in advance for any pointers, feedback.
> Per Kreipke

Please check that your question  has not already been answered in the
FAQ before posting.     <>

To unsubscribe, e-mail:     <>
For additional commands, e-mail:   <>

View raw message