Hi !
I am trying to create a XSL to transform such an XML structure in HTML :
<FACT>
<TYPDET typ='N'>
<DCO cta='123' dde='1'/>
<DCO cta='456' dde='1'/>
<DCO cta='456' dde='2'/>
<DCO cta='789' dde='1'/>
</TYPDET>
<TYPDET typ='T'>
<DCO cta='123' dde='2'/>
<DCO cta='456' dde='1'/>
<DCO cta='456' dde='3'/>
<DCO cta='789' dde='1'/>
</TYPDET>
</FACT>
I am in a template based on the DCO tag (don't have the choice), what I want to do is : if the value of TYPDET changes, write a title like 'Part' + typ attribute.
My problem is, I don't manage to do the correct test on TYPDET when I am in my DCO template.
I have tried :
<xsl:when test="../preceding-sibling::TYPDET[position()=1]/@typ!=../@typ">
but it writes a title for each line of the second typdet paragraph.
I have tried other things I don't remember, but I never get what I want.
Please, help me !!!
Gaelle.
I am trying to create a XSL to transform such an XML structure in HTML :
<FACT>
<TYPDET typ='N'>
<DCO cta='123' dde='1'/>
<DCO cta='456' dde='1'/>
<DCO cta='456' dde='2'/>
<DCO cta='789' dde='1'/>
</TYPDET>
<TYPDET typ='T'>
<DCO cta='123' dde='2'/>
<DCO cta='456' dde='1'/>
<DCO cta='456' dde='3'/>
<DCO cta='789' dde='1'/>
</TYPDET>
</FACT>
I am in a template based on the DCO tag (don't have the choice), what I want to do is : if the value of TYPDET changes, write a title like 'Part' + typ attribute.
My problem is, I don't manage to do the correct test on TYPDET when I am in my DCO template.
I have tried :
<xsl:when test="../preceding-sibling::TYPDET[position()=1]/@typ!=../@typ">
but it writes a title for each line of the second typdet paragraph.
I have tried other things I don't remember, but I never get what I want.
Please, help me !!!
Gaelle.