A
A.T.
I have an XML document that looks like the following, except that it
has about 30,000 entries.
<root>
<version id="A-0000">
<!many elements within- removed for ease of reading>
</version>
<version id="A-0000">
</version>
<version id="A-0001">
</version>
</root>
I want to create a stylesheet where a flag goes up when there are
duplicates like:
<version id="A-0256">
</version>
<version id="A-0256">
</version>
I'm trying to use
<xsl:template match="version">
<xsl:choose>
<xsl:when test="preceding::node()=node()">
<td bgcolor="blue"><xsl:value-of select="id"/></td>
</xsl:when>
<xsltherwise>
<td><xsl:value-of select="id"/></td>
</xsltherwise>
</xsl:choose>
<xsl:apply-templates select="version"/>
</xsl:template>
but I can't seem to get the test="" part of it to work. Please help.
has about 30,000 entries.
<root>
<version id="A-0000">
<!many elements within- removed for ease of reading>
</version>
<version id="A-0000">
</version>
<version id="A-0001">
</version>
</root>
I want to create a stylesheet where a flag goes up when there are
duplicates like:
<version id="A-0256">
</version>
<version id="A-0256">
</version>
I'm trying to use
<xsl:template match="version">
<xsl:choose>
<xsl:when test="preceding::node()=node()">
<td bgcolor="blue"><xsl:value-of select="id"/></td>
</xsl:when>
<xsltherwise>
<td><xsl:value-of select="id"/></td>
</xsltherwise>
</xsl:choose>
<xsl:apply-templates select="version"/>
</xsl:template>
but I can't seem to get the test="" part of it to work. Please help.