W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > October to December 2000

RE: Issues with Contribution: Attribute Default Value

From: Joe Lapp <jlapp@webmethods.com>
Date: Wed, 13 Dec 2000 15:33:39 -0500
Message-Id: <4.2.0.58.20001213140714.01a3c100@mail.webMethods.com>
To: "David E. Cleary" <davec@progress.com>, "Asir S Vedamuthu" <asirv@webmethods.com>, "Www-Xml-Schema-Comments@W3.Org" <www-xml-schema-comments@w3.org>
Cc: "W3c-Xml-Schema-Ig" <w3c-xml-schema-ig@w3.org>, "Ningang chen" <nchen@webmethods.com>
At 01:22 PM 12/13/00 -0500, David E. Cleary wrote:
>No. A schema processor does not create XML or use the DOM.

But schema processors do use DOM.  They consume DOM nodes and even use DOM methods to add schema contributions.  Given that contributions change the content of the serialized XML, one may even think of a schema processor as creating XML.

>That was tounge in cheek. Where I am coming from is that IMHO the sole
>purpose of prefixes is to support human pasrsing of XML. Prefixes do not
>apear in the infoset or PSVI. Schema processors should not add xmlns
>attributes that are not there. 

Take a look at the December draft of the infoset (http://www.w3.org/XML/Group/2000/12/WD-infoset-20001211).  Each element information item (section 2.2) has a [prefix] property, a [namespace attributes] property, and an [in-scope namespaces] property.  Each namespace information item (section 2.15) also has a [prefix] property.  Even each attribute information item (section 2.3) has a [prefix] property.

If the schema processor must contribute an attribute to an element information item, and if that attribute belongs to a namespace (outside the "per-element partition"), then one must somehow assert, within the document object being embellished, which namespace the attribute belongs to.

There is only one way to assert a namespace in an XML document and still be in compliance with the "Namespaces in XML" spec.  One must declare the namespace.  But declaring a namespace means picking a prefix and picking an element on which to declare the namespace.  Because the infoset says that prefixes are informative and that the association of a "namespace attribute" with an element is informative, we are faced with the prospect of having different schema processors take the same inputs and yet output different PSVIs.

If it is important that the PSVI conform to the "Namespaces in XML" spec, or if it is important that the PSVI output by any two schema processors be comparable, we may have to conclude that XML Schema is underspecified on this matter.  XML Schema may need to explicitly say how to compute the prefix and where to place the "namespace attribute."

I don't understand all the issues, but given what I know, I would have left prefixes and "namespace attributes" out of the infoset.  As you say, they do seem like constructs that exist only for human convenience.  Unfortunately for us, the infoset does not take this approach.

Joe Lapp
W3C Advisory Committee Representative
webMethods, Inc.
Received on Wednesday, 13 December 2000 15:30:20 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT