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/01/23 13:36:07 UTC

DO NOT REPLY [Bug 16359] New: - HTMLFormatter fails if a numbered character entity follows a prefixed element

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

HTMLFormatter fails if a numbered character entity follows a prefixed element

           Summary: HTMLFormatter fails if a numbered character entity
                    follows a prefixed element
           Product: XalanC
           Version: 1.3.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: XalanC
        AssignedTo: xalan-dev@xml.apache.org
        ReportedBy: floerke@doctronic.de


Source:
"""
<?xml version="1.0"?>
<xxx:A xmlns:x="http://foo.org">
&#269;
</xxx:A>
"""

Stylesheet:
"""
<?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="html" encoding="iso-8859-1"/>

<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

</xsl:stylesheet>
"""

Result is:
"""
<xxx:A xmlns:xxx="http://foo.org">
 &#xxx269;
</xxx:A>
"""

There is a problem within "FormatterToHTML::pushHasNamespace". It uses the
"m_stringBuffer" and does not clear the buffer.

If you add "clear(m_stringBuffer);" before returning, the test will work.