Project

Profile

Help

Bug #6279 » test.xsl

Andy Yar, 2023-12-04 13:59

 
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="3.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:output encoding="UTF-8" indent="yes" method="xml"/>

<xsl:template match="TEST">
<root>
<xsl:apply-templates select="TEST2/F"/>
</root>
</xsl:template>

<!-- regular message template -->
<xsl:template match="F">
<F>
<xsl:value-of select="count(preceding::*[generate-id(preceding::TEST2[1]) = generate-id(current()/preceding::TEST2[1])])"/>
</F>
</xsl:template>

</xsl:stylesheet>
(2-2/2)