W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > January to March 2001

Re: what should I expect for validation of attributes of type QName?

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 24 Jan 2001 08:46:34 +0000
To: "Vun Kannon, David" <dvunkannon@kpmg.com>
Cc: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
Message-ID: <f5br91t2v85.fsf@cogsci.ed.ac.uk>
"Vun Kannon, David" <dvunkannon@kpmg.com> writes:

> If my schema contains
> 
> <schema
>  xmlns="http://www.w3.org/2000/10/XMLSchema"
>  targetNamespace="myTest"
> >
> <element name="item">
> 	<complexType>
> 		<attribute name="measure" type="QName"/>
> 	</complexType>
> </element>
> </schema>
> 
> and my instance contains
> 
> <item 
> xmlns="myTest"
> xmlns:si="http://official.SI.org.fr/SI"
> xmlns:xsi="http://www.w3.org/2000/10/XMLSchema-instance" 
> xsi:schemaLocation="
> myTest				myTest.xsd
> http://official.SI.org.fr/SI	si.xsd
> "
> measure="si:kilogram"
> />
> 
> and the SI schema contains
> 
> <schema
>  xmlns="http://www.w3.org/2000/10/XMLSchema"
>  targetNamespace="http://official.SI.org.fr/SI"
> >
> <element name="kilogram"/>
> </schema>
> 
> What should I expect from validation of the instance? I tested this
> situation with the Oracle validator, and it treated the type of the
> attribute as no better than string. It didn't try to resolve the namespace
> and check that the element existed in that namespace.

QNames as datatypes in ordinary documents (not XML Schema documents)
are just that, qualified names, and are simply constrained to have the
right form and to have an appropriate NS declaration in scope.
There's no implication that they 'refer' to schema components, or that
they should 'resolve' to anything.

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 Wednesday, 24 January 2001 03:46:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 6 December 2009 18:12:49 GMT