|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Absolute-path/index challenge
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








