W3C home > Mailing lists > Public > xmlschema-dev@w3.org > January 2002

Namespace qualification

From: Gregory Khanlarov <kh_greg@hotmail.com>
Date: Tue, 22 Jan 2002 16:54:10 -0500 (EST)
To: <xmlschema-dev@w3.org>
Message-ID: <DAV40rYP0QzBxhJTANZ0001866b@hotmail.com>

I have namespace qualification question.
Suppose, we have the following schema:

<schema xmlns="http://www.w3.org/2001/XMLSchema"
<element name="a">
            <restriction base="string">
                <attribute name="q"/>    <!-- Attribute must be unqualified,
since attributeFormDefault equals to 'unqualified' -->
                <attribute name="w" form="qualified" />    <!-- Here we
state that the attribute must be qualified -->

Thus, we have string-content element "a" with two attributes. Attribute 'q'
must be unqualified and attribute 'w' must be qualified. Is the following
XML instance valid ?

<a xmlns="aaa" q="1" w="2"/>

I believe, this is ambiguos case. According to the spec
(http://www.w3.org/TR/REC-xml-names/#defaulting) default namespaces do not
apply directly to attributes. However, the attribute's namespace is
considered to be the same as element's namespace if no namespace prefix is
specified for the attribute. Am I right ? So, if there is an error than
where is it ? In namespace qualification of attribute 'q' or 'w' ?

Thank you,
Received on Wednesday, 23 January 2002 13:41:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:55 UTC