Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Character conversion problem

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Wolfgang Hoschek <whoschek AT lbl.gov>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Character conversion problem
  • Date: Wed, 3 Nov 2004 15:00:18 -0800

Hi,

Some characters such as "&#x50000;" and "'[[[&#x50000;]]]'" seem to get turned by XOM to "?" characters.
I've seen similar things before when using byte to char conversions, both with the nio converters and the java.lang.String converters. Any ideas on what could be done about it, or what I'm doing wrong here?

[hoschek /Users/hoschek/unix/devel] cat test.xsl
<?xml version="1.0"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<!-- test use of high Unicode characters in character maps. -->

<xsl:output method="xml" use-character-maps="map02" encoding="iso-8859-1"/>

<xsl:character-map name="map02">
<xsl:output-character character="&#x50000;" string="#####"/>
</xsl:character-map>


<xsl:template match="/">
<v><xsl:value-of select="'[[[&#x50000;]]]'"/></v>
</xsl:template>

</xsl:stylesheet>

------------------------------------------------
here is what Document.toXML() and the XOM serializer print after new Builder(false).build(File):

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0">

<!-- test use of high Unicode characters in character maps. -->

<xsl:output method="xml" use-character-maps="map02" encoding="iso-8859-1" />

<xsl:character-map name="map02">
<xsl:output-character character="?" string="#####" />
</xsl:character-map>


<xsl:template match="/">
<v><xsl:value-of select="'[[[?]]]'" /></v>
</xsl:template>

</xsl:stylesheet>





Archive powered by MHonArc 2.6.24.

Top of Page