cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan <alan-cocoon-...@engrm.com>
Subject Re: Momento and Cocoon
Date Mon, 01 Mar 2004 20:36:08 GMT
* Joerg Heinicke <joerg.heinicke@gmx.de> [2004-03-01 19:59]:
> On 26.02.2004 22:04, Alan wrote:
> 
> >>I would guess that Momento mainly would be accessed through the document 
> >>function in XSLT and XQuery. Saxon use JAXP 1.1 as external API to the 
> >>transformerand the URLs in the document functions are resolved by using 
> >>an implementation of javax.xml.transform.URIResolver that is provided by 
> >>the TraxTransformer.
> >
> >
> >The above is somewhat confusing for me. Momento does support the
> >    JAXP API. XUpdate is implemented as a SAX filter. It seems like
> >    Momento would work nicely in as a source, sink, or filter for
> >    SAX events.
> >    
> >    I've imagined that a pipeline would start with a Momento
> >    document and an XSLT trasform or XQuery query.
> >
> >    Something along these lines:
> >    
> >        <map:match pattern="index.html">
> >          <map:generate type="momento" src="momento.mx"
> >                                       xslt="index-document.xslt"/>
> >          <map:transform type="xslt" src="document-to-web.xslt"/>
> >          <map:serialize type="html"/>
> >        </map:match>
> >
> >    (It is easier for me to express myself as a Cocoon user.)

> It was already mentioned and I only want to repeat it here: Momento 
> should not be implemented as generator, but as source. As Momento 
> returns also only XML just the file or xml generator should be needed. 
> Example:

You miss the point. Saxon (and in time Xalan) operates directly on
    Momento. One uses XSLT or XQuery to build a document from a
    potentially HUGE Momento document. The XSLT and XQuery documents
    mean that Momento will not even touch parts of the document not
    pertiant to the query.

    I do not want to generate SAX events and have Cocoon build an in
    memory DOM, and then run an XSLT transform. It misses the point.
    
> <map:generate src="momento:/document"/>

Fine. We can do that.

> With the mentioned xmldb interface you would write the source just as 
> the xindice source and use it like the following ("copied" from xindice 
> sample sitemap):
> 
> <map:generate src="xmldb:momento://db/document#xpath"/>

Fine we can do that too. But this will only yank out a sub document,
    it won't aggregate, join, or filter a document.

> The only thing I don't know exactly how to handle is XQuery. If it is 
> used like XSLT we should add a XQueryTransformer later, but if the 
> comparison to JXTemplate is more appropriate an XQueryGenerator would be 
> needed (maybe both is useful).

XQuery uses the same generator as XSLT. You specify the Momento
    docuent and the query to run.

Also keep in mind that Momento can be used throughout the pipeline
    returning the document as it was at the start of the pipeline,
    which means that XPath can be used against Momento in the
    sitemap without worrying about returing inconsistant results.

-- 
Alan / alan@engrm.com / http://engrm.com/
    aim/yim: alanengrm - icq: 228631855 - msn: alanengrm@hotmail.com

Mime
View raw message