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=5357>.
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=5357

Function substring() doesn't work with http://www.w3.org/1999/XSL/Transform

           Summary: Function substring() doesn't work with
                    http://www.w3.org/1999/XSL/Transform
           Product: XalanC
           Version: 1.2.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: XalanC
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
                CC: [EMAIL PROTECTED]


The substring() function does not work properly with the xsl:stylesheet 
namespace="http://www.w3.org/1999/XSL/Transform";

Here are my test results ...

testXSLT -IN pp.xml -XSL pp.xsl -OUT pp.html
========= Parsing pp.xsl ==========
Parse of pp.xsl took 10 milliseconds
========= Parsing pp.xml ==========
XSL Warning: Error  at (file pp.xml, line 2, column 7): Unknown element 'root', 
line -1, offset -1
XSL Warning: Error  at (file pp.xml, line 2, column 7): Root element different 
from DOCTYPE, line -1, offset -1
XSL Warning: Error  at (file pp.xml, line 3, column 17): Unknown 
element 'descripcion', line -1, offset -1
Parse of pp.xml took 10 milliseconds
=============================
Transforming...
XSL Error: The substring() function takes two or three arguments!, source tree 
node: root, document file:///home/software/XML/linux/
pp.xsl, line 10, offset 58

XSLException Type is: XSLTProcessorException
Message is: The substring() function takes two or three arguments! 
(file:///home/software/XML/linux/pp.xsl, line 10, column 58)

My pp.xml file:
<?xml version="1.0" encoding="UTF-8"?>
<root>
   <descripcion>Esta es la descripcion</descripcion>
</root>

My pp.xsl file:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:template match="/">
<html>
   <xsl:apply-templates>
   </xsl:apply-templates>
</html>
</xsl:template>
   <xsl:template match="root">
      <xsl:value-of select='substring(descripcion,1,10)'></xsl:value-of>
   </xsl:template>
</xsl:stylesheet>

With xmlns:xsl="http://www.w3.org/TR/WD-xsl"; it works fine.
With xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; does not.

Why is this so?

Thank you and best regards

Reply via email to