You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Rick Bullotta <Ri...@lighthammer.com> on 2001/03/15 19:05:26 UTC

Bug in Xalan2 With Mixed Encoding/UTF-16 Encoding

Applying the following stylesheet:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="http://somewhere.someplace.org"
xmlns:b="http://other.otherplace.org" exclude-result-prefixes="a b">
  <xsl:output method="xml" media-type="text/xml"/>

  <xsl:template match="/">
  <Result>
	<xsl:value-of select="/a:section/b:subsection/@attr"/>
  </Result>
  </xsl:template>
</xsl:stylesheet>

To this document:

<?xml version="1.0" encoding="UTF-16"?>
<section name="First" xmlns="http://somewhere.someplace.org"
xmlns:b="http://other.otherplace.org">
	<b:subsection attr="AttribValue"/>
</section>

...yields an empty result element.  However, if the XML document is UTF-8
encoding, instead of UTF-16, the stylesheet performs as expected.  The MSXML
parser handles either combination properly.

Any thoughts/suggestions?  Is this a known bug?  Xalan or Xerces issue?

Thanks.

- Rick Bullotta
  CTO
  Lighthammer Software