|
|
| Matt Frame 2004-01-19, 4:30 pm |
| Does anyone know if you can get the depth of an element or node using XSL?
Thanks,
Matt
| |
| Janwillem Borleffs 2004-01-19, 7:30 pm |
| Matt Frame wrote:quote:
> Does anyone know if you can get the depth of an element or node using
> XSL?
>
<xsl:template match="element">
<xsl:value-of select="count(descendant::*)" />
</xsl:template>
JW
| |
| DFN-CIS NetNews Service 2004-01-20, 5:29 am |
| JB> <xsl:value-of select=3D"count(descendant::*)" />
I think you mean <xsl:value-of select=3D"count(ancestor::*)" />
--=20
Stuart
This week's Clairvoyants Association meeting is canceled due to
unforeseen events.
| |
| Janwillem Borleffs 2004-01-21, 5:31 pm |
| DFN-CIS NetNews Service wrote:quote:
> I think you mean <xsl:value-of select="count(ancestor::*)" />
No, I mean descendant as in all children of the context node.
JW
| |
| DFN-CIS NetNews Service 2004-01-22, 7:29 am |
| On 21/01/2004, around 10:38, Janwillem Borleffs wrote:=20
JB> No, I mean descendant as in all children of the context node.
Clearly we have a different understanding of what is meant by 'depth'.
I have always needed this info in the context of 'how deep is the
current node' rather than 'how deep is the tree under the current
node'.
--=20
Stuart
Error: Smash forehead on keyboard to continue
| |
| DFN-CIS NetNews Service 2004-01-22, 11:55 am |
| On 21/01/2004, around 10:38, Janwillem Borleffs wrote:=20
JB> No, I mean descendant as in all children of the context node.
Clearly we have a different understanding of what is meant by 'depth'.
I have always needed this info in the context of 'how deep is the
current node' rather than 'how deep is the tree under the current
node'.
--=20
Stuart
Error: Smash forehead on keyboard to continue
|
|
|
|
| Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |