You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by bu...@apache.org on 2002/07/20 00:42:23 UTC
DO NOT REPLY [Bug 10995] New: -
Failed assertion on simple XPath syntax errors
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10995>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10995
Failed assertion on simple XPath syntax errors
Summary: Failed assertion on simple XPath syntax errors
Product: XalanJ2
Version: 2.4Dx
Platform: PC
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: Other
Component: org.apache.xpath
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: kse@wp.pl
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>