VB.NET XSLT problem when using character refences 
Author Message
 VB.NET XSLT problem when using character refences

Hello out there,

i posted my problem to various newsgroups but until now i got no answer
which helped me to solve it.
So i try it here - as the problem is related to VB.NET
If anybody can give me an advice about another newsgroup which maybe able to
help me i would also be happy about it.
(in my mind this is a general problem and ther should be an answer out

The problem:

we use character refrences in our XML data

like:  ß    Schließer   : UNICODE for ?
       Ö    Öffner      : UNICODE for ?

this is a valid way to encode UNIcode characters in XML
and normally this works fine (in VB6 and in IE6)

But if i perfom the XSL Transformation in VB.NET with

 Dim xslt As New System.Xml.Xsl.XslTransform()
 Dim out As System.IO.StreamWriter
 Dim writer As New System.Xml.XmlTextWriter(out)

and i load the resulting HTM File into my Browser (IE6.0) then the display

Schlie?Yer instead of Schlie?er
?-ffner    instead of ?ffner

(if a perform the conversion "on the fly" in IE6.0 it is OK - but this does
not help me as i need
 to generate HTML files as result)

BUT ß is the valid UNICODE refrence for ?

Either i am doing something wrong or VB.NET does not work correctly here.

Bug or feature ???


Dim xslt As New System.Xml.Xsl.XslTransform()
Dim out As System.IO.StreamWriter

out = File.CreateText(m_strActDir + "\out.htm")

xslt.Load("file://" + m_strActXSL)
Dim xpathdocument As New System.Xml.XPath.XPathDocument("file://"
+ m_strActXML)

Dim writer As New System.Xml.XmlTextWriter(out)

writer.Formatting = System.Xml.Formatting.Indented

xslt.Transform(xpathdocument, Nothing, writer)

Style Sheet:

<xsl:stylesheet version="1.0"
xmlns:xsl=" http://www.*-*-*.com/ ;
<xsl:output method='html' encoding='ISO-8859-1'   omit-xml-

<xsl:template match="/">

XML Dok. sample:

<?xml version='1.0'?> <!DOCTYPE topic SYSTEM 'MedaPS2.dtd'>
<?xml-stylesheet href="medaps_convert2HTML.xsl" type="text/xsl"?>


<meta name="Generator" value="SCHEMA MarkupKit 2.0"/>

<table hsdl-percent="21.1 8.5 8.7 8.7 8.7 8.7 8.7 8.7 8.7 8.7"
<th><p>Schalten von Lasten<br/>Insta Sch&#252;tze 5TT3 7</p></th>
<th><p>20 A</p></th>
<th><p>21 A</p></th>
<th><p>24 A</p></th>
<th><p>25 A</p></th>
<th><p>40 A<br/>Schlie&#223;er</p></th>
<th><p>40 A<br/>&#214;ffner</p></th>

Sun, 29 May 2005 23:10:09 GMT  
 [ 1 post ] 

 Relevant Pages 

1. VB.NET XSLT problem when using character refrences

2. Extending XSLT with VB.NET

3. Using an XSLT in my VB app

4. Using an XSLT in my VB app

5. ASCII Problem in VB.Net no character greater than 127

6. INSERT into access database using vb.net/ado.net..problem

7. ADO.NET with ASP.NET using VB.NET

8. Using dhtml script to process XML vs. XSLT

9. Announcement: Online WNL - Using XSLT by Mike Helland.

10. Help with problem using (EIStream) OCXs in VB.NET/C# project

11. Problem using SmtpMail.Send() in a VB.NET dll with a C++ string

12. Problem in Generating reports using Crystal in VB.Net


Powered by phpBB® Forum Software