Hi Martin,
Thanks for the quick reply.
Is there a way for me to do this without character maps such that I
don't have to change the XSL processor? I may not be in a position to
switch to Saxon 9.
Thanks again,
-Craig
On Tue, Aug 10, 2010 at 10:42 AM, Martin Honnen
<Martin(_dot_)Honnen(_at_)gmx(_dot_)de> wrote:
Craig Whisenhunt wrote:
Hello,
I am transforming XML to HTML. The XML source has:
Peña
which should transform and display as Peña.
Instead, the 'ñ' gets transformed into a '?'.
Same problem with mdash
Processor Information:
XSL version: 1
Vendor: Microsoft
Vendor URL: http://www.microsoft.com
Using VS2008, C#, .NET 3.5
My XSLT begins with:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xml:space="default"
xmlns:l="urn::tlc.state.tx.us.salsa.legdoc">
<xsl:output method="html" encoding="UTF-8" use-character-maps="cm1"
indent="yes"/>
<xsl:character-map name="cm1">
<xsl:output-character character=" " string="&nbsp;"/>
<xsl:output-character character="—" string="&mdash;"/>
<xsl:output-character character="é" string="&eacute;"/>
<xsl:output-character character="ñ" string="&ntilde;"/>
</xsl:character-map>
Note that when I do the transformation in XMLSpy, it works fine. Using
it in code, though, produces a '?'.
I think I did explain elsewhere that XML Spy supports XSLT 2.0 (i.e
xsl:character-map) while XslCompiledTransform is an XSLT 1.0 processor that
does not support any XSLT 2.0 constructs.
If you want to use XSLT 2.0 with .NET code then use Saxon 9
(http://saxon.sourceforge.net/) or use AltovaXML tools
(http://www.altova.com/altovaxml.html).
--
Martin Honnen
http://msmvps.com/blogs/martin_honnen/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--