Hi, Thorsten
Take a look at http://www.w3schools.com/xsl/xsl_functions.asp. Maybe you'll find something that could help
Bye,
Alexander


Thorsten Scherler wrote:

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



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to