QName resolution

In constraint "QName resolution (Schema Document)", bullet 4:

"4 its ·namespace name· is either the target namespace of the schema
document containing the ·QName· or that schema document contains an
<import> element information item the ·actual value· of whose namespace
[attribute] is identical to that ·namespace name·."

Does this mean that

<schema xmlns="http://www.w3.org/2001/XMLSchema"
        targetNamespace="myNS">
  <element name="e" type="string"/>
</schema>

is invalid? (Because the schema namespace is neither the target namespace,
nor imported by this document.)

The spec does mention:

"Simple type definitions for all the built-in primitive datatypes, namely
string, boolean, float, double, number, dateTime, duration, time, date,
gMonth, gMonthDay, gDay, gYear, gYearMonth, hexBinary, base64Binary, anyURI
(see the Primitive Datatypes section of [XML Schemas: Datatypes]), as well
as for the simple and complex ·ur-type definitions· (as previously
described), are present by definition in every schema. All are in the XML
Schema {target namespace} (namespace name http://www.w3.org/2001/XMLSchema
), have an atomic {variety} with an empty {facets} and the simple ·ur-type
definition· as their ·base type definition· and themselves as {primitive
type definition}.

Similarly, simple type definitions for all the built-in derived datatypes
(see the Derived Datatypes section of [XML Schemas: Datatypes]) are present
by definition in every schema, with properties as specified in [XML
Schemas: Datatypes] and as represented in XML in Schema for Schemas
(normative) (§A)."

But I don't think "are present" directly leads to "can be accessed".
Shouldn't bullet 4 of "QName resolution (Schema Document)" be changed to
something like:

"4 one of the following must be true:
4.1 all of the following must be true:
4.1.1 its ·namespace name· is identical to http://www.w3.org/2001/XMLSchema
.
4.1.2 the kind specified is simple or complex type definition.
4.1.3 its ·local name· is identical to the name of one of the built-in
types.
4.2 either the target namespace of the schema document containing the
·QName· or that schema document contains an <import> element information
item the ·actual value· of whose namespace [attribute] is identical to that
·namespace name·."

Thanks,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com

Received on Tuesday, 5 February 2002 16:03:30 UTC