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

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

From: Vun Kannon, David <dvunkannon@kpmg.com>
Date: Tue, 23 Jan 2001 11:42:45 -0500
Message-Id: <17D550E30E75D31190C30008C75DCFC4047E05CA@usmnyexc06.kweb.us.kpmg.com>
To: "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
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. Obviously, the
validator does a much better job when it is reading the schema itself.
There, a ref attribute with QName content is understood quite well.
Are schema documents "special" in that the QName datatype works only within
a document with that namespace? (If yes, where is that documented?) Or is
the validator wrong, and not applying functionality that is at hand? 
Thanks,
David vun Kannon
KPMG Consulting, LLC
*****************************************************************************
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorized. 

If you are not the intended recipient, any disclosure, copying, distribution
or any action taken or omitted to be taken in reliance on it, is prohibited
and may be unlawful. When addressed to our clients any opinions or advice
contained in this email are subject to the terms and conditions expressed in
the governing KPMG client engagement letter.         
*****************************************************************************
Received on Tuesday, 23 January 2001 11:43:21 GMT

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