Subject: Re: [xsl] A way to test only top level nodes to see if they have children From: Syd Bauman <Syd_Bauman@xxxxxxxxx> Date: Tue, 28 Aug 2012 12:12:59 -0400 |
It would *really* help if you'd give us short snippet of input and of desired output. See the posting guidelines at http://www.mulberrytech.com/xsl/xsl-list/#posting That said, if your input uses the same element type for top level and lower level nav entries (in this case, <li>), you may be able to match the top-level entries with <xsl:template match="li"> <!-- process w/o assigning a link) </xsl:template> and the lower-level nav entries with <xsl:template match="li//li"> <!-- assign a link --> </xsl:template> > I have a navigation list that I am assigning links to every /parent > node that doesn't have children. Every nested list (children of the > top level parents) needs to have links assigned to them always. > Only effecting the top level nodes on the test is hard for me to > grasp. Any help? > > Eg: (for when top level nav has children) > home (no link assigned) > Child (link assigned) > Child (link assigned) > Grandchild (link assigned) > Child (link assigned) > > Eg: (for when top level nav has no children) > Some Top Level Nav (no link assigned)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] A way to test only top level , Voltmer, Steve T | Thread | [xsl] XPath element constructor, Jakub Malý |
[xsl] A way to test only top level , Voltmer, Steve T | Date | [xsl] XPath element constructor, Jakub Malý |
Month |