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

Re: Problem with encoding using document function

Subject: Re: Problem with encoding using document function
From: António Mota <amsmota@xxxxxxxxx>
Date: Wed, 2 Mar 2005 12:34:47 +0000
createprocessinginstruction encoding
I don't know if this msg get to the list, cause i've got no answers :(
 and sometimes i think my messages are lost, maybe there is a problem
with my mail...

However, answering myself, the guy who's first made the ASP give me a
hint that solved the problem in a *very strange* way. Instead of using
the PI

aDocXml.createProcessingInstruction("xml", " version='1.0'
encoding='ISO-8859-1'")

I've attached the string containing the instruction to the beginig of the
XML.

response.Write "<?xml version=""1.0"" encoding=""ISO-8859-1"" ?>" &
aDocXml.xml

However, that makes me think that the error i've related

>  Content is not allowed in prolog.

was not caused by the PI after all.

Go wonder...



On Tue, 1 Mar 2005 19:04:10 +0000, Antsnio Mota <amsmota@xxxxxxxxx> wrote:
> I don't know why i'm facing this problem only now, cause i'm doing
> similar thinhgs allready without problem...
>
> In a styleshhets i have
>
>      <xsl:apply-templates
> select="document('http://tododev/Site/GridHoras/geraXML.asp')"/>
>
> and i'm generating the XML using a Microsoft.XMLDOM document. Actually
> i didn't write the code myself, i'm adaapting some code wroted by
> someone else.
>
> If i give no encoding in the ASP, i get a error from Saxon
>  Invalid byte 2 of 3-byte UTF-8 sequence.
>
> or similar errors with other processors.
>
> If i include a PI
>
> aDocXml.createProcessingInstruction("xml", " version='1.0'
> encoding='ISO-8859-1'")
>
> for some reasing it ignores the encoding and gives the same error.
>
> If i use UTF-16 instead it put's the encoding ok, but now i get
>
>  Content is not allowed in prolog.
>
> As i said i've done things like that but only now i'm getting this
> errors, go wonder why!!!
>
> What can i do?
>
> Thanks.

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.