|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: matching elements of a list
Hi Rolf,
In XSLT 2.0 you can define a function to get the list of elements, see an example below: <?xml version='1.0'?>
<xsl:transform version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:g="http://www.oxygenxml.com/george">
<xsl:output method="text"/><xsl:function name="g:getList"> <xsl:param name="node"/> <xsl:param name="root"/> <xsl:sequence select="if ($node) then ($node, g:getList($root/ln[@s=$node]/@d, $root)) else ()"/> </xsl:function> <xsl:template match="st">
<xsl:value-of select="g:getList(@ix, /root)" separator="->"/>
</xsl:template>
</xsl:transform>a->g->f b->e->c->d Regards, George --------------------------------------------------------------------- George Cristian Bina - http://aboutxml.blogspot.com/ <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com Jeff Sese wrote: try this stylesheet, i think this would work (if i guessed your requirements right).
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






