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

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