Hi, I'm beginnig learning xslt, and I have some problems counting the nodes while grouping a node list, for example this is my tree:
<Countries>
<Mexico>
<Guadalajara>
<Juarez>
<Hidalgo>
</Guadalajara>
</Mexico>
<Spain>
<Guadalajara>
<Cortes>
</Guadalajara>
</Spain>
</Countries>
So, when a try to count the items in Guadalajara level always get 3 instead of 2 for the first one and 1 for de last one. And this is the way Im doing it, select="count($nodeset)" for each level. What am I doing wrong?
What do you select to get the $nodeset? Could you showe some of the code surrounding your count() statement - context is everything in XSLT, so it would help a lot to see what you're doing.
counting nodes, but repeating
Hi, I'm beginnig learning xslt, and I have some problems counting the nodes while grouping a node list, for example this is my tree:
<Countries>
<Mexico>
<Guadalajara>
<Juarez>
<Hidalgo>
</Guadalajara>
</Mexico>
<Spain>
<Guadalajara>
<Cortes>
</Guadalajara>
</Spain>
</Countries>
So, when a try to count the items in Guadalajara level always get 3 instead of 2 for the first one and 1 for de last one. And this is the way Im doing it, select="count($nodeset)" for each level. What am I doing wrong?
Hi can you try this
<xsl:value-of select="count($parent/*[@isDoc and string(umbracoNaviHide) != '1'])" />
Hi pepefgd,
What do you select to get the $nodeset? Could you showe some of the code surrounding your count() statement - context is everything in XSLT, so it would help a lot to see what you're doing.
/Chriztian
is working on a reply...