[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Process only nodes on a special axis
Hi,
I have the following structure in my document: <y-axis> <element> <key>1,985</key> <element> <key>Lichtausschnitt</key> <element> <key>li</key> <values> <value> <x>73,5</x> <y>7629</y> </value </values> </element> <element> <key>re</key> <values> <value> <x>81,0</x> <y>9282</y> </value </values> </element> </element> <element> .... </element> </element> </y-axis> Let the context node be element[parent::y-axis]. At this point I need to process only nodes on a special axis (I don't mean the XPath axes) to create some correct html output. What I want/need is a XPath expression (or XSLT/XPath solution) that returns me only outermost nodes: The element node with the key "Lichtausschnitt" and the element node with the key "li" but not the element node with the key "re". This structure is created dynamically (elements can be of any depth) so I cannot use a fixed XPath expression. I tried to do this with a named template (which calls itself) but my problem is when I start calling it with <xsl:call-template name="foobar"> <xsl:with-param name="nodeSet" select="element[1]" /> </xsl:call-template> I get the the complete element with the key "Lichtausschnitt" but I only want it with the child element with the key "li". I hope that I could make my problem plain to you and you can give me a method of resolution. Thanks in advance.
|
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
|