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

Issues with Contribution: Attribute Default Value

From: Asir S Vedamuthu <asirv@webmethods.com>
Date: Tue, 12 Dec 2000 21:47:06 -0500
To: "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>
Message-ID: <NEBBIAMHOMNDLFMEIEBAIELBCDAA.asirv@webmethods.com>
Reference -

Schema Information Set Contribution: Attribute Default Value

For each attribute use pair in the {attribute use pairs} whose boolean is
false and whose attribute declaration has a {value constraint} and does not
match one of the attribute information items in the element information
item's [attributes] as per clause 1.3 of Element Locally Valid (Complex
Type) (3.4) above, the post-schema-validation infoset has an attribute
information item whose [local name] is that attribute declaration's {name}
whose [namespace URI] is the attribute declaration's {target namespace} and
whose [schema normalized value] is the declaration's {value constraint}
string, added to the [attributes] of the element information item.
Furthermore, the item's [specified] is set to schema.

This is wonderful if there is no [namespace URI]. If there is a [namespace
URI], it raises two questions,

[1] Who is responsible for contributing a namespace declaration to this new
attribute's [owner element]?

[2] If schema processor uses DOM, it may contribute an attribute by invoking
two methods sequentially,

Attr Document.createAttributeNS(in DOMString namespaceURI, in DOMString

Attr Element.setAttributeNodeNS(in Attr newAttr) raises(DOMException);

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" -

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?

Regards, Asir S Vedamuthu
Received on Tuesday, 12 December 2000 21:47:39 UTC

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