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 2003/12/30 01:43:50 UTC
DO NOT REPLY [Bug 25814] New: -
encoding bug in xsl:comment
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=25814>.
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=25814
encoding bug in xsl:comment
Summary: encoding bug in xsl:comment
Product: XalanJ2
Version: 2.5Dx
Platform: PC
OS/Version: All
Status: NEW
Severity: Normal
Priority: Other
Component: Xalan
AssignedTo: xalan-dev@xml.apache.org
ReportedBy: b.eicki@gmx.net
I used the current binaries from xalanj2 (Version 2.5.2) and I've found a bug
with the processing of xsl:comment. If you try to transform a xml-file via the
following xsl-file
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="ISO-8859-1"/>
<xsl:template match="test">
<xsl:comment>Kommentar Björn:<xsl:value-of select="'test'"/></xsl:comment>
</xsl:template>
</xsl:stylesheet>
you get the following exception:
Exception in thread "main" javax.xml.transform.TransformerException: org.xml.
sax.SAXException: Attempt to output character of integral value 246 that is not
represented in specific output encoding of .
This exception does not occur if you just have within the xsl-file a comment
like
<xsl:comment>Kommentar Björn:</xsl:comment>
but again does occur if the xsl-file contains a comment like
<xsl:comment><xsl:value-of select="'test Björn'"/></xsl:comment>
It seems that if the xsl-comment has got more or something else than a single
text-child that the specified encoding is not used. Thus if you then use special
characters of these encodings like the 'ö' out of ISO-8859-1, you get the above
exception.