Click here to Skip to main content
15,912,329 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralRe: Problems with a well formed XML Pin
Christian Graus1-Feb-05 17:10
protectorChristian Graus1-Feb-05 17:10 
QuestionHow to add a datasource as a sub node in XML file Pin
Rekha Patel31-Jan-05 8:08
Rekha Patel31-Jan-05 8:08 
AnswerRe: How to add a datasource as a sub node in XML file Pin
DavidNohejl31-Jan-05 8:20
DavidNohejl31-Jan-05 8:20 
GeneralRe: How to add a datasource as a sub node in XML file Pin
Rekha Patel31-Jan-05 9:01
Rekha Patel31-Jan-05 9:01 
GeneralRe: How to add a datasource as a sub node in XML file Pin
DavidNohejl31-Jan-05 9:44
DavidNohejl31-Jan-05 9:44 
GeneralThanks a mil!!! Worked like a magic Pin
Anonymous31-Jan-05 14:02
Anonymous31-Jan-05 14:02 
GeneralHelp with converting Dataset to ADO schema..please! Pin
Dankarmy30-Jan-05 8:26
Dankarmy30-Jan-05 8:26 
GeneralUnicode encoding problem Pin
teo_xp29-Jan-05 2:27
teo_xp29-Jan-05 2:27 
Hello

I am facing a strange encoding problem using xsl transformation.
Concisely, i execute a SQL statement to fill a recordset which contain
some fields with Greek Characters saved as UTF-16 (on SQL Server 2000 using nvarchar) ,which then i save to the Response object of an ASP page as xml (adPersistXML).Then i use an xsl file
to transform XML to HTMl.The problem is that when i see the page in the
internet explorer instead of the greek character i get something like this
"Ξ•Ξ›Ξ›Ξ—ΞΞ™ΞšΞŸΞ£ Ξ¤Ξ™Ξ¤Ξ›ΞŸΞ£" . Moreover when i do a "view source" and
see the HTML source using Notepad the Text is displayed correctly in Greek.


I am using the following ASP code to do the transformation :

 <br />
' rs is an ADO recordset filled with data from a sql Select statement<br />
styleFile = Server.MapPath(xslfile)<br />
set stylexml =Server.CreateObject("MSXML2.FreeThreadedDOMDocument")<br />
stylexml.async = false<br />
stylexml.load(styleFile)<br />
<br />
 <br />
<br />
set sourcexml = Server.CreateObject("MSXML2.FreeThreadedDOMDocument")<br />
sourcexml.async = false<br />
<br />
rs.Save sourcexml,1 ' Save as adPersistXML<br />
set rs=Nothing<br />
<br />
 <br />
<br />
strPath=BuildPath(id,18)<br />
dim xslty,xslProc<br />
set xslt = Server.CreateObject("MSXML2.XSLTemplate")<br />
xslt.stylesheet =stylexml<br />
Set xslProc =xslt.createProcessor()<br />
xslProc.input=sourcexml<br />
xslProc.addParameter "Path",escape(strPath)<br />
Response.charSet = "UTF-8"<br />
xslProc.output = Response<br />
xslProc.transform


The xsl file is created using visual studio , saved as unicode file and inside it i define the encoding like this : <xsl:output encoding="utf-16" method="html" version="4.0">


I know that the problem was to do with "BIG endian" and "Little endian" switces

the ADO recordset is being saved as UTF-16 big endian (UTF-16BE). Rather, the data is. "Endianness" only matters when serializing UTF-16. When it's in-memory, it doesn't
matter. When there is no byte order mark, it's supposed to be Big Endian.


Although i've not managed to find any solution.

Any ideas ?

Thanks in advanced


Theodore Papadopoulos
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 2:29
teo_xp29-Jan-05 2:29 
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 2:30
teo_xp29-Jan-05 2:30 
GeneralRe: Unicode encoding problem Pin
DavidNohejl29-Jan-05 2:56
DavidNohejl29-Jan-05 2:56 
GeneralRe: Unicode encoding problem Pin
teo_xp29-Jan-05 10:45
teo_xp29-Jan-05 10:45 
GeneralRe: Unicode encoding problem Pin
DavidNohejl29-Jan-05 12:53
DavidNohejl29-Jan-05 12:53 
GeneralRe: Unicode encoding problem Pin
teo_xp30-Jan-05 3:14
teo_xp30-Jan-05 3:14 
GeneralXML serialisation Pin
Member 157171627-Jan-05 22:11
Member 157171627-Jan-05 22:11 
GeneralXML 's Question Pin
jzb26-Jan-05 14:00
jzb26-Jan-05 14:00 
GeneralSQLXML3.0 Question Pin
mysorian26-Jan-05 11:59
professionalmysorian26-Jan-05 11:59 
GeneralRe: SQLXML3.0 Question Pin
DavidNohejl26-Jan-05 12:41
DavidNohejl26-Jan-05 12:41 
GeneralRe: SQLXML3.0 Question Pin
mysorian26-Jan-05 13:08
professionalmysorian26-Jan-05 13:08 
GeneralRe: SQLXML3.0 Question Pin
DavidNohejl26-Jan-05 13:38
DavidNohejl26-Jan-05 13:38 
GeneralRe: SQLXML3.0 Question Pin
mysorian26-Jan-05 17:58
professionalmysorian26-Jan-05 17:58 
GeneralInvalid Characters with MSXML Pin
Insert Cool Screen Name Here25-Jan-05 10:14
Insert Cool Screen Name Here25-Jan-05 10:14 
GeneralRe: Invalid Characters with MSXML Pin
DavidNohejl25-Jan-05 10:36
DavidNohejl25-Jan-05 10:36 
GeneralRe: Invalid Characters with MSXML Pin
Anonymous25-Jan-05 10:42
Anonymous25-Jan-05 10:42 
GeneralRe: Invalid Characters with MSXML Pin
Insert Cool Screen Name Here25-Jan-05 10:45
Insert Cool Screen Name Here25-Jan-05 10:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.