<xsl:template> priority attribute is not working properly
---------------------------------------------------------
Key: XALANJ-2539
URL: https://issues.apache.org/jira/browse/XALANJ-2539
Project: XalanJ2
Issue Type: Bug
Security Level: No security risk; visible to anyone (Ordinary problems in
Xalan projects. Anybody can view the issue.)
Components: Xalan
Affects Versions: 2.7.1
Environment: RedHat 5
Reporter: Mark Veenstra
Priority: Critical
I have a XSLT file that matches elements and then give an output. When no match
is found the default output should be given. For example:
XSLT file:
<xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template priority="-9" match="*">
<xsl:text>Default output</xsl:text>
</xsl:template>
<xsl:template match="MyElement">
<xsl:text>Other output</xsl:text>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:apply-templates select="@*|node()"/>
</xsl:template>
</xsl:transform>
When you execute this XSLT, you will get the "Other output" when it matches,
but when it doesn't match the "Standard output" will never appear. I also tried
some different values for the priority of "Standard output" but then always the
standard output is shown, even if I give the other templates a higher priority.
I use version 2.7.0 of Xalan.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]