Subject: [xsl] Problem with index-position in for-each From: Timothy Marc <timothymarc@xxxxxxxxxx> Date: Tue, 18 Dec 2007 18:39:33 +0100 |
i've a strange problem. I want to select some elements by their index via predicate expression. The source looks like: <root> <tree> <statics mapTo="xyz">...</statics> <statics mapTo="xyz">...</statics> <dynamics mapTo="xyz">...</dynamics> <statics mapTo="xyz">...</statics> ... </tree> ... </root>
Now, i want to iterate over all statics-child elements, depending on their position. Therefore, i have created an for-each-loop like this:
I want to do this with the explicit position, because i generate some sql insert statements, where @mapTo defines the sql rowname and the value of the element defines the column data. But the result is really unexpected. I allways get the values of all @mapTo in this tree-element, like this:
I 'm wondering because when i replace the position() function with an static integer like [1] i only get the @mapTo value i want. Hope, that somebody could help me.
thx mfw
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Removing duplicates where, Michael Kay | Thread | Re: [xsl] Problem with index-positi, David Carlisle |
RE: [xsl] select first word, Scott Trenda | Date | Re: [xsl] Problem with index-positi, David Carlisle |
Month |