Pedro Alves wrote:
> On Thu, Jul 28, 2005 at 04:54:56PM -0700, [EMAIL PROTECTED] 
wrote:
> > It's always good to search the Jira database before you post a
> > question:
>
> I found references to that, but I thought it was not the same case
>
> > http://issues.apache.org/jira/browse/XALANJ-1799
>
> The solution to that is to upgrade to xalan 2.6.0. That is the
> version I use.
>
> When I was making a test case I found out this:
>
> a.xml:
>
> <?xml version="1.0" encoding="iso-8859-1"?>
> <Articles>
>     <Article>
>         <Identification>
>             <Name>Testação de cents</Name>
>         </Identification>
>     </Article>
> </Articles>
>
>
> a.xsl:
> <xsl:stylesheet version="1.0"
>     xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
>     <xsl:output encoding="cp850" method="xml"/>
>     <xsl:template match="//Identification">
>         <test><xsl:value-of select="."/></test>
>     </xsl:template>
> </xsl:stylesheet>
>
>
> Applying xalan, I get:
>
> <?xml version="1.0" encoding="cp850"?>
>
>                 <test>
>                         Testa&#231;&#227;o de cents
>                 </test>

Hi Pedro,

Outputting with method="xml", no encoding is done at all! That's why it 
succeeds.

> However, if I use method="text", I get:
>
> (Location of error unknown)XSLT Error
> (javax.xml.transform.TransformerException): org.xml.sax.SAXException:
> Attempt to output character of integral value 231 that is not
> represented in specified output encoding of cp850.

With method="text", encoding of the output is enforced, but fails for 
some reason.

David, note that this bug is different from XALANJ-1799, since the name 
of the desired encoding is printed out, which wasn't the case in 1799.

Cheers,
                        Axel

-- 
Humboldt-Universität zu Berlin
Institut für Informatik
Signalverarbeitung und Mustererkennung
Dipl.-Inf. Axel Weiß
Rudower Chaussee 25
12489 Berlin-Adlershof
+49-30-2093-3050
** www.freesp.de **

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to