[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: MSXML Whitespace handling
Andrew Kimball wrote: > I think it was the right decision for the vast majority of users. For users of the MS DOM, sure. For users of the MS DOM when it is being used as the basis of the stylesheet tree in XSLT processing, I think that Mike Kay's statement still stands: >> I accept the argument that it is legitimate to allow the user to mangle >> the tree before passing it to XSLT, but it seems wrong to mangle it by >> default. Your response is: > Users who need to preserve whitespace can always set > preserveWhiteSpace=true when loading the DOM, or use > xml:space="preserve" to tag significant whitespace. The XSLT 1.0 Recommendation doesn't contain a warning that xsl:text elements should be written with xml:space="preserve" in order to ensure whitespace is handled as one would expect. My guess, as I detailed in an email yesterday, is that the spec was written without taking this into consideration. Although the XML spec does make it clear that the parser has the option of discarding insignificant whitespace, the XSLT spec makes it sound like I can expect whitespace characters in my physical document to be preserved if they're in xsl:text. However inaccurate that may be, it would seem to be preferable to preserve whitespace if you know that the DOM will be used as the basis of a stylesheet tree. -Mike B. 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
|