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

RE: trouble with "What's in the target Namespace?"

From: Priscilla Walmsley <priscilla@walmsley.com>
Date: Fri, 19 Oct 2001 09:17:09 -0400
To: <donalds@isogen.com>, "'Schema Dev \(E-mail\)'" <xmlschema-dev@w3.org>
Message-ID: <004301c158a0$753b5980$b92a6420@xmls>
Hi Don,

> The last declaration refers to the element declaration "BBB",
> and since that

Your example is not valid because you cannot have a reference to a locally
declared element.  Only globally declared elements can be referenced.

> I conclude that when asking whether something is in the
> target namespace,
> one must distinguish between schema components and
> information items in the
> document instance. When speaking of schema components,

Given that you can't reference locally declared elements, I don't think
there is any need to distinguish between the instance and the schema.
Locally declared elements and attributes are in the target namespace if
their form is qualified, and have no namespace if their form is unqualified.
Globally declared elements and attributes are always in the target
namespace.  This is true both in the schema and the instance.

Hope that helps,
Priscilla

-----------------------------------------------------------
Priscilla Walmsley                   priscilla@walmsley.com
Vitria Technology                     http://www.vitria.com
Author, Definitive XML Schema    (Prentice Hall, Dec. 2001)
-----------------------------------------------------------

> -----Original Message-----
> From: xmlschema-dev-request@w3.org
> [mailto:xmlschema-dev-request@w3.org]On Behalf Of Don Smith
> Sent: Friday, October 19, 2001 8:59 AM
> To: Schema Dev (E-mail)
> Subject: trouble with "What's in the target Namespace?"
>
>
> The question "What's in the target namespace?" has become a point of
> discussion around here. Here's an example to consider:
>
> <xsd:schema xmlns:xsd = 'http://www.w3.org/2001/XMLSchema'
> 	 targetNamespace = 'http://isogen.com/training'
> 	 xmlns:isg = 'http://isogen.com/training' >
>
> <xsd:element name="performer" type="xsd:boolean"  />
>
> <xsd:element name="performance">
>  <xsd:complexType>
>   <xsd:sequence>
>     <xsd:element ref="isg:performer"  />
>     <xsd:element name="BBB"  type="xsd:boolean" />
>     <xsd:element name="NNN" type="xsd:date" />
>     <xsd:element ref="BBB" />
>   </xsd:sequence>
>  </xsd:complexType>
> </xsd:element>
>
> </xsd:schema>
>
> In the content model, the first element declaration refers to
> the globally
> declared "performer", which is clearly in the isogen namespace.
> The second element declaration, "BBB", is locally declared
> and not in the
> target namespace.
> Likewise for the next declaration, "NNN".
> The last declaration refers to the element declaration "BBB",
> and since that
> schema component is not in the target namespace, the
> reference does not have
> a namespace prefix for the isogen namespace.
>
> The two references, one to a global declaration, and the
> other to a local
> declaration, indicate the different symbol spaces for global and local
> declarations, the latter not participating in the target namespace.
>
> I conclude that when asking whether something is in the
> target namespace,
> one must distinguish between schema components and
> information items in the
> document instance. When speaking of schema components,
> locally declared
> components are not in the target namespace. When speaking of
> information
> items in the document instance, they either are or are not in
> the target
> namespace depending on: 1) whether they map to locally or
> globally declared
> elements, 2)the global/local "form" settings.
>
> Is this correct? Where in the spec is the status of local
> schema components
> relative to the target namespace addressed?
>
> Don Smith
> ISOGEN International
>
>
Received on Friday, 19 October 2001 09:19:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:24 GMT