[Home] [By Thread] [By Date] [Recent Entries]
At 00/01/20 12:58 -0600, Thomas E Enebo wrote:
As an extension of the position() of parent question from digest 480, I have a challenge. How can a template be created, such that it will print out the complete path of current node from the root? As an example: The following is the output for the above (with the comment repaired) from the SHOWTREE diagnostic stylesheet available through the free resources page on our web site: 1 Element 'A' ():
1.1 Text (A): {
}
1.2 Element 'B' (A):
1.2.1 Text (A,B): {
}
1.2.2 Element 'C' (A,B): (no child nodes or attributes)
1.2.3 Text (A,B): {
}
1.3 Text (A): {
}
1.4 Element 'B' (A):
1.4.1 Text (A,B): {
}
1.4.2 Element 'C' (A,B): (no child nodes or attributes)
1.4.3 Text (A,B): {
}
1.4.4 Element 'C' (A,B): (no child nodes or attributes)
1.4.5 Text (A,B): { }
1.4.6 Comment (A,B): {- calling a template with current() here...}
1.4.7 Text (A,B): {
}
1.5 Text (A): {
}
1.6 Element 'B' (A):
1.6.1 Text (A,B): {
}
1.7 Text (A): {
}The numbers above correspond to *all* nodes, so text nodes are included in the count as well. I hope you find it useful in figuring out the detail of precisely what you need. ............... Ken
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|

Cart



