Hello users,
I am looking for information/documentation on the XPath transformer. Does anybody have some good links? I searched the wiki but did not get very much out of it. The XPath transformer is not listed at http://cocoon.apache.org/2.1/userdocs/transformers/transformers.html either!
*Background* I have the following transformation: <map:transform type="xpath"> <map:parameter name="include" value="//[EMAIL PROTECTED]'true']"/> </map:transform>
That will include all nodes (and their children) that have the attribute wholesite='true'. e.g.
<samples label="Samples" href="samples/" tab="samples" wholesite="true">
<sample2 label="Static content" href="sample2.html" description="More Samples" />
<sample-wiki label="Wiki page" href="wiki-sample.html" description="wiki-sample" />
<sample-ihtml label="ihtml page" href="ihtml-sample.html" description="Test iHTML page" />
</samples>
But now I want to exclude some of the children with the attribute wholesite='false'. e.g.
<samples label="Samples" href="samples/" tab="samples" wholesite="true">
<sample2 label="Static content" href="sample2.html" description="More Samples" wholesite='false'/>
<sample-wiki label="Wiki page" href="wiki-sample.html" description="wiki-sample" />
<sample-ihtml label="ihtml page" href="ihtml-sample.html" description="Test iHTML page" />
</samples>
I thought about something like:
<map:parameter name="include" value="//[EMAIL PROTECTED]'true']//[EMAIL PROTECTED]'false']"/>
...but that gave me a blank page!
Then I tried <map:transform type="xpath"> <map:parameter name="include" value="//[EMAIL PROTECTED]'true']"/> <map:parameter name="exclude" value="//[EMAIL PROTECTED]'false']"/> </map:transform>
...and it worked just fine, but it would be nice to have a documentation on that because I came up with the solution after try'n error ;-).
King regards thorsten
-- Thorsten Scherler
Departamento de Desarrollo de Proyectos Sociedad Andaluza para el Desarrollo de la Sociedad de la Informaci�n S.A.U.
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
