Re: Bug in XSV?

Michael Anderson <michael@research.canon.com.au> writes:

> "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".

Correct.  Only the missing namespaces are filled in.

> 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' "?

The WG just decided to clarify that the answer is "yes, it changes".

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/

Received on Monday, 5 March 2001 11:15:31 UTC