cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylv...@apache.org>
Subject Re: Pull Parsing
Date Thu, 08 Dec 2005 11:11:13 GMT
Daniel Fagerstrom wrote:
> was:  Re: Cocoon F2F at ApacheCon
> ...
>
>> BTW, I started to sketch a proof of concept pull-based pipeline API 
>> and will commit it to whiteboard/cong once I've managed to set up a 
>> basic file/xslt/html pipeline with some content inspection in the 
>> middle.
>
> Cool.
>
> What about letting it implement ProcessingPipeline so that we can use 
> it together with current Cocoon?

That's an idea, but the pipeline API needs to provide more than 
process(environment) and a StAX pipeline can actually be used as a 
regular XMLStreamReader (the StAX parser API), which provides some 
interesting properties for programmatically chaining pipelines.

Now for sure we can write an adapter implementing the ProcessingPipeline 
interface.

> Are there XSLT implementations that support StAX?

Not that I know of. Now there are some SAX<->StAX conversion utilities 
in the stax-utils project that will help.

> You should take a look at Axiom, 
> http://ws.apache.org/axis2/OMTutorial.html, from Axis2. It is a light 
> weight, supposedly high performance, XML object model that is based on 
> StAX, and has built in caching, that can be turned of. It is designed 
> so that you can cache elements in the StAX input stream in such a way 
> that you can do ordinary JDOM like tree random access, but when 
> turning caching of you neither build nor construct any elements.

Yeah, I looked at it. AFAIU, it defers pulling the events until they are 
really needed by the tree traversal operations.

> There is also a Jaxen adaper for Axiom.

Cool! I was looking for that, as we need it for a content-aware XPath 
matcher that wouldn't buffer the whole input document.

> The refactored JXTG is, at least on a conceptual level, designed to be 
> pull parsers friendly. It should be possible to replace the internal 
> object model with Axiom. This would make it usable both in current 
> pipelines and in the pull based ones.
>
> WDYT?

Sounds great. I look forward for some collective hacking during 
ApacheCon and don't know if we'll spend much time in session rooms :-)

Sylvain

-- 
Sylvain Wallez                        Anyware Technologies
http://bluxte.net                     http://www.anyware-tech.com
Apache Software Foundation Member     Research & Technology Director


Mime
View raw message