Hi,
I have got an xml document that now looks something like this:
When i am looping over the document using xslt I need to be able to compare the current <f> element with the previous <f> element, if they are different then i need to change the style that is applied to the output.
We are using .net to generate/transform the document and this has got problems with preceeding-sibling apparently that puts the server into a 100% cpu consumption which is nice., so that's not an option.
I thought that I would be able to do something like this:
<xsl:if test="f != f[position()-1]">
but this doesn't work.
Anyone got any ideas?
Tony
P.S thanks to all for your help so far
I have got an xml document that now looks something like this:
Code:
<a>
<b>
<c>1</c>
<d>2</d>
<e>3</e>
<f>4</f>
</b>
<b>
<c>2</c>
<d>3</d>
<e>4</e>
<f>5</f>
</b>
<b>
<c>3</c>
<d>4</d>
<e>5</e>
<f>6</f>
</b>
</a>
When i am looping over the document using xslt I need to be able to compare the current <f> element with the previous <f> element, if they are different then i need to change the style that is applied to the output.
We are using .net to generate/transform the document and this has got problems with preceeding-sibling apparently that puts the server into a 100% cpu consumption which is nice., so that's not an option.
I thought that I would be able to do something like this:
<xsl:if test="f != f[position()-1]">
but this doesn't work.
Anyone got any ideas?
Tony
P.S thanks to all for your help so far