Subject: Re: [xsl] Numbering similar nodes sequentially in the output From: "Mark" <mark@xxxxxxxxxxxx> Date: Wed, 12 Oct 2011 13:59:25 -0700 |
Thanks, Mark
I suspect this cannot be done, but will ask. Is it possible to sequentially number similar nodes in the output?
This is done in two ways: finding a pattern in how you collect the members of the output, or building an intermediate output in a temporary tree and then numbering the output copying the temporary tree to the result.
The original position() of the <Formats> in the input file is most likely irrelevant and misleading, and I suspect trying to count the different input <Formats> may be just as useless.
Then go with the temporary tree (though it can sometimes be surprising how patterns reveal themselves in the data). Build your output in the temporary tree and then, as you are copying the tree to the result, you can use position() and count() on the nodes of the tree.
-- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Numbering similar nodes s, G. Ken Holman | Thread | Re: [xsl] Numbering similar nodes s, G. Ken Holman |
Re: [xsl] Numbering similar nodes s, G. Ken Holman | Date | Re: [xsl] Numbering similar nodes s, G. Ken Holman |
Month |