W3C home > Mailing lists > Public > www-xml-blueberry-comments@w3.org > March 2003

RE: [xml-dev] whitespace in 1.1

From: Michael Kay <michael.h.kay@ntlworld.com>
Date: Mon, 17 Mar 2003 09:59:19 -0000
To: "'John Cowan'" <cowan@mercury.ccil.org>, "'Richard Tobin'" <richard@cogsci.ed.ac.uk>
Cc: <xml-dev@lists.xml.org>, <www-xml-blueberry-comments@w3.org>, <xml-editor@w3.org>
Message-ID: <000001c2ec6b$e1243ee0$6401a8c0@pcukmka>

> 	 the characters passed to an application by the XML processor
> 	 must be as if the XML processor normalized all line breaks
> 	 in external parsed entities (including the document entity)
> 	 on input, before parsing

In my experience, the words "as if" are often a signal that something is
badly wrong in a spec. Either the processor should normalize line
breaks, in which case it must be made very clear at which stage of
processing it does so, or it shouldn't normalize them. Saying that it
behaves for some purposes as it it normalized them and for other
purposes as if it didn't is a sure path to ambiguity, and a sure signal
that the processing model has not been adequately defined.

There are examples of this in XSLT 1.0: 

"the stylesheet is treated as if neither processing instruction nodes
nor comment nodes were included in the tree that represents the
stylesheet" - but is this the tree before or after whitespace stripping?

"document('') refers to the root node of the stylesheet; the tree
representation of the stylesheet is exactly the same as if the XML
document containing the stylesheet was the initial source document" -
does this "as if" override the previous "as if"?

In all these cases the problems would be avoided by describing a
processing model in which the stages of processing (of an object such as
a stylesheet) are explicitly described, and constraints are defined on
the object at a specific stage of processing.



Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com 
Received on Monday, 17 March 2003 04:59:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 22 March 2009 12:11:47 GMT