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

RE: Issues with Contribution: Attribute Default Value

From: David E. Cleary <davec@progress.com>
Date: Wed, 13 Dec 2000 09:33:18 -0500
To: "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>, "Joe Lapp" <jlapp@webMethods.com>
> [2] If schema processor uses DOM, it may contribute an attribute
> by invoking
> two methods sequentially,
> Attr Document.createAttributeNS(in DOMString namespaceURI, in DOMString
> qualifiedName)
>                    raises(DOMException);
> 	http://www.w3.org/TR/DOM-Level-2-Core/core.html#i-Document
> Attr Element.setAttributeNodeNS(in Attr newAttr) raises(DOMException);
> http://www.w3.org/TR/DOM-Level-2-Core/core.html#ID-745549614
> If you observe closely, one of the parameters is 'qualifiedName'.
> 'qualifiedName' is defined as,
> "A qualified name is the name of an element or attribute defined as the
> concatenation of a local name (as defined in this specification),
> optionally
> preceded by a namespace prefix and colon character" -
> http://www.w3.org/TR/DOM-Level-2-Core/glossary.html#dt-qualifiedname
> mm .. 'namespace prefix' is required. Schema processor may introspect
> [in-scope namespaces] and compute a prefix, if one exists. If not, who is
> responsible for computing a SUPERFICIAL PREFIX and contributing a
> corresponding namespace declaration?

The DOM does absolutly no validation when creating an XML document. If you
do not use the DOM to add xmlns attributes, it will create invalid XML, but
it won't stop you from adding attributes and elements that use namespaces.
So it is up to the application that is using the DOM to do the right thing
if it wants valid XML. If there are no xmlns attributes that define
namespace prefixes, it isn't valid. The term SUPERFICIAL PREFIX should be
immediatly struck from the record and never used again, because there is no
such thing.

David Cleary
Progress Software
Received on Wednesday, 13 December 2000 09:33:48 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:50 UTC