cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Torsten Curdt" <>
Subject RE: generate and additional xpath
Date Fri, 09 Feb 2001 12:18:14 GMT
> >    <map:match pattern="content">
> >     <map:generate type="serverpages" src="page.xml"/>
> >     <map:generate type="serverpages" src="content1.xml" xpath="page/content"/>
> >     <map:generate type="serverpages" src="content2.xml" xpath="page/content"/>
> >     <map:transform src="xml2html.xsl"/>
> >     <map:serialize/>
> >    </map:match>
> > Is this possible and even useful?
> > What do you guys think?
> Hmm. It's *possible*, but the only way I know of to achieve it at the
> moment is to collate the output of the first generator into a DOM
> document, and then use XPathAPI to select the relevent nodes and then
> use the node import funcitonality from DOM to pull the nodes from the
> DOM trees of the other generators. It would work (I think), but it'd be
> slow. Do you *really* need this, or is it flexibility syndrome since you
> could achieve the same by just sticking a transformer after the
> generator?

Yepp... another victim got hit by the syndrome ;)

But do really think the creation of a DOM is needed? I'm not that into
SAX but couldn't we just create the events for the xpath prefix?
So we would get a tree structured like this (for example):


Matching "page/content" should give a flat view of the tree, right?

Don't know if it is really useful...
...just some idle thought ;)

View raw message