By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,098 Members | 1,881 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,098 IT Pros & Developers. It's quick & easy.

Problem in dotNET XSL convertion object. (XMLTRANSFORM)

P: n/a
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
Vidar Martinsen
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Vidar wrote:
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.


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]
http://blog.tkachenko.com
Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.