Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.4
-
None
-
None
-
Operating System: Linux
Platform: PC
-
10995
Description
Using wrong (Java/C-style) '==' operator is a nasty trap.
To cause an assertion failure, use the following xsl.
I use command line with Sun JDK1.4 for Linux, jars in lib/endorsed. No source xml needed. See
also Bug 2139.
I think this should produce a helpful message instead.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- a simple XPath syntax error test -->
<xsl:template match="doc">
<xsl:if test="@atr == 'val'"/>
<!-- You may also try: -->
<xsl:if test="@atr = = 'val'"/>
<xsl:if test="@atr ="/>
<xsl:if test="@atr != != 'val'"/>
<xsl:if test="@atr =!= 'val'"/>
<xsl:if test="@atr => 'val'"/>
<xsl:if test="@atr = + 'val'"/>
</xsl:template>
</xsl:stylesheet>