[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: MS IXSLProcessor input encoding

Subject: Re: MS IXSLProcessor input encoding
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 23 Aug 2005 05:57:08 +1000
adodb.stream xml
> processor.input = oStream
> processor.input = domXML

This causes the IXSLProcessor instance to use domXML as input -- not oStream.


Cheers,
Dimitre Novatchev




On 8/23/05, Gabriel K <gabriel.klappenbach@xxxxxxxxxxxx> wrote:
> Ok, here it is. I have a COM object that feeds me the XML. So o.document
> contains the XML in UTF-8.
>
> ' setup XML-server -----------------------------------
> dim o
> set o = Server.CreateObject("MwebbCOM.MwebbCOM.1")
> o.httpRemoteUser = Request.ServerVariables("REMOTE_USER")
> o.httpRemoteAddr = Request.ServerVariables("REMOTE_ADDR")
> o.httpQueryString = Request.QueryString
> o.BeginTransaction
>
> ' setup ADODB Stream --------------------------------
> dim oStream
> set oStream = createobject("Adodb.Stream")
> oStream.Type = 2
> oStream.Charset = "UTF-8"
> oStream.open
> oStream.writeText o.document
> oStream.position = 0
>
> <some irrelevant code>
>
> ' output with IXSLProcessor --------------------------
> Set template = Server.CreateObject("MSXML2.XSLTemplate.5.0")
> template.stylesheet = domXSL
> set processor = template.createProcessor()
> processor.input = oStream
> processor.input = domXML
> processor.output = Response
> processor.transform()
>
>
> The problem is that processor.input reads o.document as an ISO-8859-1
> document, instead of UTF-8.
> The XML-file has declared UTF-8 and is indeed UTF-8 encoded.
>
>
> /Gabriel
>
>
>
> > -----Ursprungligt meddelande-----
> > Fren: Emmanouil Batsis [mailto:Emmanouil.Batsis@xxxxxxxxxxx]
> > Skickat: den 22 augusti 2005 14:14
> > Till: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Dmne: Re:  MS IXSLProcessor input encoding
> >
> > Gabriel K wrote:
> >
> > >After some investigation I have come to the conclusion that
IXSLProcessor
> > >always reads it input in ISO-8859-1 (it could also be windows 1252),
> > >regardless of any declarations in ado Stream, XML-file or Byte Order
> > Mark.
> > >
> > >Does anyone agree or disagree with that?
> > >
> > >
> >
> > The XML parser is responsible for that. If your XML file has a proper
> > encoding, the parser should be able to read it properly if that belongs
> > to the mandatory encodings (UTF-8 for example, also the default). I am
> > sure ppl will have some advice if you demonstrate the code you use to
> > read the XML, but in general this is irrelevant to XSL.
> >
> > hth,
> >
> > Manos
>
>


--
Cheers,
Dimitre Novatchev
---------------------------------------
Harry did not ask how Dumbledore knew; ...but Harry had long since
learned that bangs and smoke were more often the marks of ineptitude
than expertise.

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.