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

Re: MSXML / NBSP problem and resolution

Subject: Re: MSXML / NBSP problem and resolution
From: Mike Brown <mike@xxxxxxxx>
Date: Fri, 8 Nov 2002 05:10:31 -0700 (MST)
xslt nbsp problem
David Carlisle wrote:
> me> No it is _mandated_ to add a meta element  by the XSLT spec.
> 
> you> Actually, it's a "should" in the spec.
> 
> so it is. I wonder why. (If any system can do html output at all I'd have
> thought it could easily do this)

I can think of 2 reasons why it's a should.

One is that the XSLT engine isn't necessarily encoding the output. It could
pass the HTML as Unicode to another process, which may or may not take care of
encoding it as bytes somewhere down the line. So it can't guess at what
encoding, if any, should be "declared" in the HTML document. On the other
hand, XML has the same problem, and the solution is that the processing APIs
(SAX for example) state that if the document is being received as Unicode,
then the encoding declaration is ignored, so it doesn't matter what it says.

The other more pressing reason is that if you are starting the serialization
of each node of the result tree as soon as it is added, which is what many
XSLT processors attempt to do, you have to keep state while outputting the
contents of the <head> element, in order to know whether you've reached the
end and haven't yet output a <meta http-equiv="Content-Type">. That might be
more work than the spec wants to require of an XSLT processor.

   - Mike
____________________________________________________________________________
  mike j. brown                   |  xml/xslt: http://skew.org/xml/
  denver/boulder, colorado, usa   |  resume: http://skew.org/~mike/resume/

 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.