D
datamodel
Hello I have an XML tree of which you can see a mini-version here:
http://paste.uni.cc/11838
(the tree is actually over 30,000 levels deep)
How do I count the depth of a given <NODES><NODE> ?????
The problem is I would like to "color" nodes based on their depth in
the tree - ie, use alternating colors.
A depth, or actually "level" in the logical tree actually comprises two
levels in the XML tree - ie
<NODES><NODE>
There is no depth attribute in the XML tags,
and the position() function applies only to the currently processed
node,
Ideally I want to construct a test like
<xsl:if test="[parent:osition() < 3]">
of course this is wrong syntax.
and position() doesn't help , since it really computes the position in
the siblings at a given level,
not the level of depth in the tree.
http://paste.uni.cc/11838
(the tree is actually over 30,000 levels deep)
How do I count the depth of a given <NODES><NODE> ?????
The problem is I would like to "color" nodes based on their depth in
the tree - ie, use alternating colors.
A depth, or actually "level" in the logical tree actually comprises two
levels in the XML tree - ie
<NODES><NODE>
There is no depth attribute in the XML tags,
and the position() function applies only to the currently processed
node,
Ideally I want to construct a test like
<xsl:if test="[parent:osition() < 3]">
of course this is wrong syntax.
and position() doesn't help , since it really computes the position in
the siblings at a given level,
not the level of depth in the tree.