Subject: Re: Absolute-path/index challenge From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 21 Jan 2000 12:57:56 -0500 |
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:
<A> <B> <C/> </B> <B> <C/> <C/> <--- calling a template with current() here... </B> <B> </B> </A>
will yield
A:1.B:2.C:2
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): { }
-- G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995) Web site: XSL/XML/DSSSL/SGML services, training, libraries, products. Practical Transformation Using XSLT and XPath ISBN 1-894049-03-9 Next instructor-led training: 2000-02-27/28,2000-05-11/12,2000-05-15
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Absolute-path/index challenge, Steve Tinney | Thread | RE: Absolute-path/index challenge, Pawson, David |
Re: Using Entity References in XSL , Theodore Epstein | Date | RE: Using Entity References in XSL , sara . mitchell |
Month |