[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: MSXML / NBSP problem and resolution
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|