W3C home > Mailing lists > Public > xmlschema-dev@w3.org > October 2001

what namespace for unqualified locals?

From: Brian Atkins <brian_atkins@firehunter.com>
Date: Fri, 5 Oct 2001 18:26:56 -0400 (EDT)
Message-ID: <3BBE33F8.DCD4E718@firehunter.com>
To: xmlschema-dev@w3.org
If the form for local element is unqualified, what namespace, if any,
to they belong to?  If they do not belong to the targetNamespace of
the schema, how do they participate in validation?

I am also confused about the relationship between scope and namespace.
Consider the following schema:

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema targetNamespace='http://www.test.com/test'
  <xs:element name="test" type="mytype"/>

  <xs:complexType name="mytype">
      <xs:element name="spam" type="xs:string"/>


What namespace is the element "spam" in?  I know it's in the scope of the
type "mytype" in the targetNamespace.  Outside the schema itself (in
instance documents or stylesheets, for example), complex types and,
specifically, 'mytype' are not relevant.  How is this "spam" element,
in this type, in this namespace, uniquely identified?

Brian Atkins
Brian Atkins          brian_atkins@firehunter.com         (970) 288-2114
Agilent Technologies     4800 Wheaton Drive        Ft. Collins, CO 80525
Received on Saturday, 6 October 2001 10:44:52 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:14:54 UTC