473,387 Members | 1,641 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Problem in dotNET XSL convertion object. (XMLTRANSFORM)

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
1 1609
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Chiller | last post by:
I'm in the process of writing a class that performs functions on a Distance object. The object is created by entering details as "Distance a (5, km)" or "Distance b (3, cm)" etc. I wish to write...
1
by: Hoots | last post by:
I'm trying to transform an xml file that contains empty short elements like the following: <element attrib="abc"/> using the XmlTransform class. But I cannot seem to preserve the short format...
5
by: nospam | last post by:
I'm trying to transform an xml file that contains empty short elements like the following: <element attrib="abc"/> using the XmlTransform class. But I cannot seem to preserve the short format...
2
by: Jeroen Ceuppens | last post by:
I get an object from a function (tt.array1_10), it is a 2dim array I do this object o=new object(); o=tt.array1_10; (you can see through quickwatch the correct values in the "array" o)
6
by: Scott Zabolotzky | last post by:
I'm trying to pass a custom object back and forth between forms. This custom object is pulled into the app using an external reference to an assembly DLL that was given to me by a co-worker. A...
3
by: Ankit Aneja | last post by:
I have a strange situation and I have no idea how to solve this. Its a Recruitment Search Page,in the Admin Page, for every button click event the Admin Person has to create a checkbox on the users...
5
by: Segfahlt | last post by:
I need a little help here please. I have 2 win forms user controls in 2 different projects that I'm hosting in 2 different virtual directories. The controls have been test and operate okay in...
1
by: Alfons Puig | last post by:
Using the same xml and xsl files, the result of the xmlTransform.Transform is different depending if a xmlTextwriter or a StringWriter is used. In the first case, the output file is as expected,...
4
by: HackerisNewKnight | last post by:
Hello, 1) First problem. In my project i need to convert from char* to BYTE*( BYTE is unsigned char), is there any way to make the convertion? BYTE* bite; char* ch="help me, please"; bite =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.