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

RE: ISO-8859-1 encoding and XmlDecl omision (was Re: L

Subject: RE: ISO-8859-1 encoding and XmlDecl omision (was Re: Looking up keys in a separate xml file)
From: "Andrew Welch" <AWelch@xxxxxxxxxxxxxxx>
Date: Wed, 7 Jan 2004 14:40:38 -0000
utf 16 from xmldecl
> I wrote
> 
> > It has to either ignore the omit-xml-declaration, or ignore the 
> > requested encoding, and to output using an encoding that doesn't 
> > require a text declaration (utf8 or utf16)
> 
> Actually although this is my experience of XSLT1 
> implementations, the XSLT1 spec is not so explicit on the 
> behaviour in this case.
> 
> However the XSLT2 drafts (which I've read more recently) are explicit:
> 
>http://www.w3.org/TR/2003/WD-xslt-xquery-serialization-20030502/#N40031
8
>
>   The omit-xml-declaration parameter should be ignored if the
>   standalone parameter is present, or if the encoding parameter
>   specifies a value other than UTF-8 or UTF-16. 

I currently have the situation where the result of my transform is
included as part of a html page using jsp.  

I use encoding="ascii" to ensure all of my character refs remain as
character refs through to the output, but for this reason (as Ive just
found out) the omit-xml-declaration="yes" is ignored - which means in
the middle of my output I have the xml declaration.

HTML being as forgiving as it is, this isnt a problem, but I would like
it gone - whats the solution here?

I would have thought that as ascii is a subset of utf-8, the processor
could happily leave the declartion out knowing that any future parsing
of the document would use utf-8 (by default) and could correctly read
the file.  

cheers
andrew

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.