Subject: RE: MSXML Whitespace handling From: Jeni Tennison <Jeni.Tennison@xxxxxxxxxxxxxxxx> Date: Wed, 02 Aug 2000 10:22:13 +0100 |
Andy, Thanks for your response. >Your reply is well-written and well-researched, and it exposes a >simplification I made in my original mail. The fact is that the MS DOM does >not parse the input (I was trying to simplify the discussion, but instead >caused confusion). Instead, it's the MS XML Parser that actually parses the >input XML and makes SAX-like calls to the application to consume. At this >level, full whitespace is provided to the "application" that is consuming >the stream of events. [snip detailed explanation and helpful diagram] I do understand where you're coming from here, and obviously the layered architecture that MS uses brings some ambiguities about the intention of the definitions of 'processor' and 'application' in the XML Recommendation. MS DOM may not parse the XML directly (although the load() method hides from the user the fact that it is using a separate parser to read in the XML), but it does "provide access to the content and structure" to various XML applications. It does not do anything (as far as I know) with the XML aside from provide access to the content and structure - it does not *apply* the XML in any way: it does not display it, it does not process it. Thus, even though it sits on top of another XML processor, this does not mean it is not an XML processor itself. In a way, you could view MS DOM as having a dual role: to MS XML, it is an application, receiving information about the content and structure of some XML; to MS XSL (etc), it is a processor, providing this information. In a layered architecture like this, the role of an application (in its general sense) might be best defined dependent on its relationship to other applications. I understand that MS XSL does not control the source of the DOM that it is provided with (though I did overlook the full implications of this when I wrote last night). I don't think any of this is MS XSL's 'fault', and I recognise that you personally probably have no control over it. Can you give some examples where something other than MS DOM is used as the XML processor, supplying the MS XSL application with the content and structure of the stylesheet in a way that allows MS XSL to do its job properly? I understand that you can set the 'preserveWhiteSpace' property to 'true' to get MS DOM to act as a compliant XML processor. I do think that this should be the default, as it is both more useful and (in my opinion) more compliant. As I suggested, though: even if it cannot act as a compliant XML processor for any XML application, MS DOM does at least have the ability to identify elements in which whitespace should be preserved using the xml:space. What does MS XML use to validate the XSLT stylesheet? If it is an explicit DTD or schema, can this be changed to reflect the intent of the XSLT Recommendation? If it is implicit, then can the code be changed? Cheers, Jeni XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: MSXML Whitespace handling, Andrew Kimball | Thread | RE: MSXML Whitespace handling, Andrew Kimball |
RE: more on XSLT processor performa, Thorbjørn Ravn Ander | Date | Outputing two diff. elements side b, Sanjay Netrabile |
Month |