xslt-processor
xslt-processor copied to clipboard
Multiple match
In case of multiple node matches, instead of applying to the closest match all of the matches are applied at the same time.
e.g:
<xsl:template match="*">
<node name="{name(.)" />
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="*" />
</xsl:template>
<xsl:template match="creationTime" />
<xsl:template match="/*/submissionTime">
<foo>bar</foo>
<xsl:apply-templates select="*" />
</xsl:template>
In this case
-
<node name="creationTime" />is created - creationTime descendant nodes are considered
-
<node name="submissionTime" />is created - submissionTime descendant nodes are considered twice
I also tried by assigning priority to template matches, but it didn't solve the issue.