You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Robert Taylor <rt...@mulework.com> on 2004/04/22 16:14:01 UTC
getting converted into Â
Greetings again,
I've run into a strange problem when transforming an XML document into HTML.
I have an XSL style sheet where I use the ASCII equivalent for ,  .
I'm using JDOM which inturn relies on TrAX to perform the transformation.
I've configured JDOM to use Xalan: org.apache.xalan.processor.TransformerFactoryImpl.
After transforming the XML document, the resulting document replaces each
  with an invisible binary character which is rendered as  when
using the XMLOutputter to output the document.
I've searched Google, JDOM, and Xalan archives. I've also reviewed the relavent
FAQ's and haven't come up with any answers.
I'm sure that I'm searching using the wrong criteria (nbsp; #160, etc...)
because this seems like a configuration issue.
Any ideas?
robert
RE: getting converted into Â
Posted by Robert Taylor <rt...@mulework.com>.
Josh Canfield help me resolved this problem.
It was not a Xalan issue after all. I'm using
JDOMBeta10 with Xalan-J implementation and I believe the issue
is with the JDOM configuration.
Thanks for responding.
robert
> -----Original Message-----
> From: Henry Zongaro [mailto:zongaro@ca.ibm.com]
> Sent: Thursday, April 22, 2004 3:07 PM
> To: Robert Taylor
> Cc: xalan-j-users@xml.apache.org
> Subject: Re:   getting converted into Â
>
>
> Hi, Robert.
>
> Christine Li/Toronto/IBM@IBMCA wrote on 2004-04-22 11:03:53 AM:
> > I tested with Xalan 2.6.0 and It works fine. Make sure that the method
> > attribute of the xsl:output element is set to "html".
> >
> > "Robert Taylor" <rt...@mulework.com> wrote on 04/22/2004 10:14:01 AM:
> > >
> > > After transforming the XML document, the resulting document replaces
> each
> > >   with an invisible binary character which is rendered as  when
> > > using the XMLOutputter to output the document.
>
> What is your output encoding? If it is UTF-8, are you viewing the
> result document with something that is assuming a UTF-8 encoding? The
> UTF-8 encoding of NBSP ( ) is the sequence of bytes C2 A0. C2
> happens to be the encoding of the character  in ISO-8859-1 and A0 happens
> to be the encoding of NBSP in ISO-8859-1.
>
> Viewed with something that is assuming an encoding of ISO-8859-1 (or
> a closely related encoding), you will likely see that as Â. But viewed in
> a browser, things should look correct.
>
> Thanks,
>
> Henry
> ------------------------------------------------------------------
> Henry Zongaro Xalan development
> IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
> mailto:zongaro@ca.ibm.com
>
>
Re: getting converted into Â
Posted by Henry Zongaro <zo...@ca.ibm.com>.
Hi, Robert.
Christine Li/Toronto/IBM@IBMCA wrote on 2004-04-22 11:03:53 AM:
> I tested with Xalan 2.6.0 and It works fine. Make sure that the method
> attribute of the xsl:output element is set to "html".
>
> "Robert Taylor" <rt...@mulework.com> wrote on 04/22/2004 10:14:01 AM:
> >
> > After transforming the XML document, the resulting document replaces
each
> >   with an invisible binary character which is rendered as  when
> > using the XMLOutputter to output the document.
What is your output encoding? If it is UTF-8, are you viewing the
result document with something that is assuming a UTF-8 encoding? The
UTF-8 encoding of NBSP ( ) is the sequence of bytes C2 A0. C2
happens to be the encoding of the character  in ISO-8859-1 and A0 happens
to be the encoding of NBSP in ISO-8859-1.
Viewed with something that is assuming an encoding of ISO-8859-1 (or
a closely related encoding), you will likely see that as Â. But viewed in
a browser, things should look correct.
Thanks,
Henry
------------------------------------------------------------------
Henry Zongaro Xalan development
IBM SWS Toronto Lab T/L 969-6044; Phone +1 905 413-6044
mailto:zongaro@ca.ibm.com
Re: getting converted into Â
Posted by Christine Li <jy...@ca.ibm.com>.
Hi, Robert
I tested with Xalan 2.6.0 and It works fine. Make sure that the method
attribute of the xsl:output element is set to "html".
Christine Li
XSLT Development
IBM Toronto Lab
Tel: (905)413-2601
Email: jycli@ca.ibm.com
"Robert Taylor" <rt...@mulework.com> wrote on 04/22/2004 10:14:01 AM:
> Greetings again,
>
> I've run into a strange problem when transforming an XML document into
HTML.
> I have an XSL style sheet where I use the ASCII equivalent for ,
 .
>
> I'm using JDOM which inturn relies on TrAX to perform the transformation.
> I've configured JDOM to use Xalan: org.apache.xalan.processor.
> TransformerFactoryImpl.
>
> After transforming the XML document, the resulting document replaces each
>   with an invisible binary character which is rendered as  when
> using the XMLOutputter to output the document.
>
> I've searched Google, JDOM, and Xalan archives. I've also reviewed
> the relavent
> FAQ's and haven't come up with any answers.
>
> I'm sure that I'm searching using the wrong criteria (nbsp; #160, etc...)
> because this seems like a configuration issue.
>
> Any ideas?
>
> robert
>
>