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 2001/10/16 17:03:27 UTC
DO NOT REPLY [Bug 4201] New: -
xsltc fails conf test string20; substring function and div by 0
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=4201>.
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=4201
xsltc fails conf test string20; substring function and div by 0
Summary: xsltc fails conf test string20; substring function and
div by 0
Product: XalanJ2
Version: CurrentCVS
Platform: All
OS/Version: All
Status: NEW
Severity: Minor
Priority: Other
Component: org.apache.xalan.xsltc
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: tom.amiro@sun.com
This is very low priority. The test is really a negative test.
I can't imagine anyone doing the following in real practice.
substring("12345", -42, 1 div 0)
Here's a little test session showing that XLSTC disagrees with the expected
(Xalan) results.
Running xalan on string20
<?xml version="1.0" encoding="UTF-8"?>
<out>12345</out>
Running XSLTC with Xerces Parser on string20
<?xml version="1.0" encoding="UTF-8" ?>
<out/>
glrr 320 =>cat string20.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- FileName: str20 -->
<!-- Document: http://www.w3.org/TR/xpath -->
<!-- DocVersion: 19990922 -->
<!-- Section: 4.2 String Functions -->
<!-- Purpose: Test of 'substring()' function. -->
<xsl:template match="doc">
<out>
<xsl:value-of select='substring("12345", -42, 1 div 0)'/>
</out>
</xsl:template>
</xsl:stylesheet>