OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Blanchard's Law, was: [xml-dev] The Browser Wars

[ Lists Home | Date Index | Thread Index ]

At 10:34 AM -0400 10/23/02, John Cowan wrote:


>The XPath data model and the Infoset were made compatible thanks to a
>conspiracy between James Clark and myself.  I note that the XPath data
>model also does not forbid names made up of seven spaces, but you don't
>rant about that.
>

That's because I don't think it's true:

	XPath operates on an XML document as a tree. This section describes
	how XPath models an XML document as a tree. This model is conceptual
	only and does not mandate any particular implementation. The
	relationship of this model to the XML Information Set [XML Infoset]
	is described in [B XML Information Set Mapping].

	XML documents operated on by XPath must conform to the XML
	Namespaces Recommendation [XML Names].

There's no notion of a synthetic XPath data model that can somehow avoid
the constraints of well-formedness. I also note that in discussion of
the location path and expression syntax, things are normatively QNames
as defined in namespaces in XML (and by extension XML .10.) For example,

	A node test that is a QName is true if and only if the type of the
	node (see [5 Data Model]) is the principal node type and has an
	expanded-name equal to the expanded-name specified by the QName. For
	example, child::para selects the para element children of the
	context node; if the context node has no para children, it will
	select an empty set of nodes. attribute::href selects the href
	attribute of the context node; if the context node has no href
	attribute, it will select an empty set of nodes.

	A QName in the node test is expanded into an expanded-name using the
	namespace declarations from the expression context. This is the same
	way expansion is done for element type names in start and end-tags
	except that the default namespace declared with xmlns is not used:
	if the QName does not have a prefix, then the namespace URI is null
	(this is the same way attribute names are expanded). It is an error
	if the QName has a prefix for which there is no namespace
	declaration in the expression context.

There are many more cases I could cite.

I also note that in XSLT, well-formedness is also required (aside
from allowing document fragments). For instance, when discussing the
name attribute of the xsl:element element that creates a new element
with a particular name, the XSLT spec states:

	The name attribute is interpreted as an attribute value template. It
	is an error if the string that results from instantiating the
	attribute value template is not a QName.

Clearly, seven spaces is not a legal QName in XSLT. I'm not sure if this
language has been carefully inserted into every location in the XSLT
spec., but it's obviously the intent.

-- 

+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@metalab.unc.edu | Writer/Programmer |
+-----------------------+------------------------+-------------------+
|          XML in a  Nutshell, 2nd Edition (O'Reilly, 2002)          |
|              http://www.cafeconleche.org/books/xian2/              |
|  http://www.amazon.com/exec/obidos/ISBN%3D0596002920/cafeaulaitA/  |
+----------------------------------+---------------------------------+
|  Read Cafe au Lait for Java News:  http://www.cafeaulait.org/      |
|  Read Cafe con Leche for XML News: http://www.cafeconleche.org/    |
+----------------------------------+---------------------------------+




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS