limiting value-of...nested lists

Subject: limiting value-of...nested lists
From: Warren Farley <expolire@xxxxxxxxxxx>
Date: Sun, 06 Jun 1999 12:10:21 GMT
I have some xml that represents a nested index, similar to html's <ul><li><ul><li>etc. the nesting go go quite deep with my current data (5 levels). My problem is in rendering this as simple nested lists in html are displayed.

I understand I cannot transform source elememnts to result elements (aka search and replace style, every <foo> to <ul>), and i have problem using value-of in for-each and template-match rules.

Example.
Using <xsl:value-of select="foo"/ returns only the *first*
occurrence of <foo> in each <xsl:for-each> loop. (This is explained in the Microsoft documentation on <xsl:value-of> at
http://msdn.microsoft.com/xml/reference/xsl/xsl_value-of.asp). But using <xsl:value-of select="."/> I get all descendent elements of the source node I want, concatenated. Only the last level is displayed as I want.


Can I limit value-of by saying something like "get only this node, and forget its descendents"?

Or is there an easier way?

many thanks
WF


_______________________________________________________________ Get Free Email and Do More On The Web. Visit http://www.msn.com


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



Current Thread