all groups > dotnet xml > april 2005 >
You're in the

dotnet xml

group:

Problem in dotNET XSL convertion object. (XMLTRANSFORM)


Problem in dotNET XSL convertion object. (XMLTRANSFORM) vidar.martinsen NO[at]SPAM ft.dep.no
4/26/2005 12:33:28 AM
dotnet xml: I have a problem in dotNET XSL convertion object. (XMLTRANSFORM)

It won't convert UTF-8 to ISO-8859-1
I use this stylesheet for konvertion:

<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- For convertion from UTF-8 to ISO-8859-1 CaracterSet -->

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="no" method="xml" version="1.0"
media-type="text" encoding="ISO-8859-1"/>
<xsl:template match="*">
<xsl:element name="{name(.)}">
<xsl:for-each select="@*">
<xsl:attribute name="{name(.)}">
<xsl:value-of select="self::node()"/>
</xsl:attribute>
</xsl:for-each>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
</xsl:stylesheet>


With Saxon XML engine it is no problem.

here is an exampel.
I have a XML document with the caracters "alpha" and "beta" in
UTF-8
If I use saxon engine I get the entityes &#945 and &#946 And
this is what I want.

With dotNET I get: ? and ? (two question mark in sted of the
entityes) and I loose my alpha and beta caracters.

Does anyone have a solution for this problem?
(Do I have to tie the XMLTRONSFORM object to an entityset in
some way? - How?)


Regards
Re: Problem in dotNET XSL convertion object. (XMLTRANSFORM) Oleg Tkachenko [MVP]
5/1/2005 12:00:00 AM
[quoted text, click to view]

XslTransform doesn't support that. Take a look at
http://www.tkachenko.com/blog/archives/000266.html for a workaround.


--
Oleg Tkachenko [XML MVP, MCP]
AddThis Social Bookmark Button