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

Re: Bug in XSV?

From: Michael Anderson <michael@research.canon.com.au>
Date: Tue, 27 Feb 2001 09:39:34 +1100
Message-ID: <3A9ADB25.89877F1A@research.canon.com.au>
To: "Henry S. Thompson" <ht@cogsci.ed.ac.uk>
Cc: "Roger L. Costello" <costello@mitre.org>, xmlschema-dev@w3.org
"Henry S. Thompson" wrote:

> "Roger L. Costello" <costello@mitre.org> writes:

<snip>

> > Note that the targetNamespace is the default namespace.  When the
> > no-namespace components (Book and CardCatalogueEntry) are included in
> > this schema they take on the targetNamespace.  Consequently, this
> > element declaration in the no-namespace schema:
> >
> >     <xsd:element name="Book" type="CardCatalogueEntry"/>
> >
> > should be referencing a CardCatalogueEntry component in the
> > targetNamespace. [Or, is Book still referencing CardCatalogueEntry in
> > no-namespace?  Do only the components take on the namespace of the
> > <include>ing schema, or do the references also take on the namespace?  I
> > am not clear on this.]
>
> It should be clarified that the reference is resolved to the chameleon
> component.

But what if the CardCatalogueEntry type was qualified using a prefix. Ie for the
schema to be included ( myNoNamespaceSchema.xsd ) I have:
<schema xmlns:my="http://myNS" xmlns:xsd="http://www.w3.org/2000/10/XMLSchema">
...
<xsd:element name="Book" type="my:CardCatalogueEntry"/>


And the including schema has

<schema xmlns:my="http://myOTHERNS"
xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
targetNamespace="http://www.library.org">

<include schemaLocation="myNoNamespaceSchema.xsd" />
....nesting
    <xsd:element ref="book"/>
... end nesting

Is the type of book in the namespace "http://myNS" or "http://myOTHERNS" ?

I suspect that the scope of the xmlns:my declaration is brought across with the
include and so the answer is "http://myNS".

Also, consider the wildcard <any namespace="##other"/>.
If the original ( myNoNamespaceSchema.xsd ) has no target Namespace then this
<any> means "all qualified element information items allowed".  But when I
include it, does the meaning change to "all element information items other than
'http://www.library.org'  "?

thanks,
mick.
Received on Monday, 26 February 2001 17:39:43 UTC

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