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

Re: Xerces and QName resolution

From: Eddie Robertsson <eddie@allette.com.au>
Date: Tue, 19 Jun 2001 16:32:05 +1000
Message-ID: <3B2EF1E5.93566BEE@allette.com.au>
To: Jeff Rafter <jeffrafter@definedweb.com>
CC: xmlschema-dev@w3.org
Hi Jeff,


> Is Xerces-J 1.4 enforcing the QName resolution constraint? [1]  In the
> sample personal.xsd (at end of mail) I believe there is an error that is not
> reported.  I don't think the ref's to the schema components should be
> resolved as they should be in the no-namespace (because there is no
> targetNamespace) and they are actually in th schema namespace because they
> are qualified.

I agree with you. In the schema below (I've removed much of it) the 'person'
element is qualified with the XML Schema namespace and hence the resolved
reference would be:

...
    <element ref="{http://www.w3.org/2001/XMLSchema}person"...>
...

This element doesn't exist and it should result in an error. XML Spy doesn't
allow you to specify a schema that uses the default namespace declaration for
the XML Schema namespace without specifying a tragetNamespace for the schema
which makes sence to me.

<snip/>

> <?xml version="1.0" encoding="UTF-8"?>
> <schema xmlns='http://www.w3.org/2001/XMLSchema'>
>
>  <element name="personnel">
>   <complexType>
>    <sequence>
>      <element ref="person" minOccurs='1' maxOccurs='unbounded'/>
>    </sequence>
>   </complexType>

Cheers,
/Eddie
Received on Tuesday, 19 June 2001 02:31:52 GMT

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