http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2549 *** shadow/2549 Tue Jul 10 11:32:52 2001 --- shadow/2549.tmp.27215 Tue Jul 10 11:32:53 2001 *************** *** 0 **** --- 1,69 ---- + +============================================================================+ + | xsltc fails conf test attribvaltemplate08 on char with accent mark | + +----------------------------------------------------------------------------+ + | Bug #: 2549 Product: XalanJ2 | + | Status: NEW Version: 2.0.0 | + | Resolution: Platform: Sun | + | Severity: Normal OS/Version: Solaris | + | Priority: Other Component: org.apache.xalan.xsltc | + +----------------------------------------------------------------------------+ + | Assigned To: [EMAIL PROTECTED] | + | Reported By: [EMAIL PROTECTED] | + | CC list: Cc: | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + Conformance test attribvaltemplate08 demonstrates a problem with the way XSLTC + handles non-ascii characters in the XML when the encoding is iso-8859-1 and the + output method is HTML. The upshot it that XSLTC may not be ignoring the + "iso-8859-1" encoding and using UTF-8 instead. + + If the XML contains a non-ascii character that the output encoding doesn't + support, it must be represented by a character entity reference. In this case, + the test XML contained the � (o acute) character. While this character is + supported by the HTML iso-8859-1 encoding, three popular XSLT processors (XT, + Saxon, Xalan) all used the character entity reference, ó to represent the + character. While that behavior is not required by the XSLT spec, it is the most + portable, as it will survive a protocol that only supports 8-bits. Whereas, + XSLTC neither outputs the charactrer as-is or converts it to a character entity. + XSLTC outputs a two-byte sequence c3 b3, which most likely is UTF-8 encoded. + These bytes appear as ó (at least on the systems I was working on). + + + Note: the problem found by this test is orthogonal to the purpose of the test. + + XML + === + <?xml version='1.0' encoding='iso-8859-1'?> + <doc> + <problem code="70" title="Consulta de Informaci�n"/> + </doc> + + Stylesheet + ========== + <?xml version="1.0" encoding="iso-8859-1"?> + <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + <xsl:output method="html"/> + + <!-- FileName: attribvaltemplate08 --> + <!-- Document: http://www.w3.org/TR/xslt --> + <!-- DocVersion: 19991116 --> + <!-- Section: 7.1.2 Creating Elements with xsl:element. --> + <!-- Creator: Paul Dick --> + <!-- Purpose: Compare the results of attribute value generated by AVT vs. + xsl:value-of, with the output specified to be HTML. --> + + <xsl:template match="doc/problem"> + <out value="{@title}"> + <xsl:value-of select="@title"/> + </out> + </xsl:template> + + Expected Output + =============== + <out value="Consulta de Información">Consulta de Información</out> + + Obtained Output + =============== + <out value="Consulta de Información">Consulta de Información</out>
