Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Indirect imports (XML Spy versus XERCES) >Thread Next - Re: W3C Standards Inquiry Question on xmlschema-test-collectionTo: xmlschema-dev@--.--- Date: 7/12/2004 11:44:00 AM
I was looking at the schema test collection and have a question about
several of the tests. Since it boils down to a single question I will
ask about one of the tests: idc_lanuage_Name, which tests the 'key' and
'keyref' facilities.
It seems to be a simple test which by observation should pass. The
originators of the tests and the microsoft validator says that the test
fails. The other validators say that it passes. My question is: what
language rules mandates failure or why does it fail.
Note that xsd:language and xsd:Name have a common base type of token
which is derived itself from string, the comparison reduces to
comparison of strings which are identical.
To make analysis simpler, here is the schema
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" >
<xsd:element name="root">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="key" type="xsd:language" />
<xsd:element name="keyref" type="xsd:Name" />
</xsd:choice>
</xsd:complexType>
<xsd:key name="key1">
<xsd:selector xpath="key"/>
<xsd:field xpath="."/>
</xsd:key>
<xsd:keyref name="key2" refer="key1">
<xsd:selector xpath="keyref"/>
<xsd:field xpath="."/>
</xsd:keyref>
</xsd:element>
</xsd:schema>
And here is the xml to be validated
<?xml version="1.0"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="idc_language_Name.xsd">
<key>en</key>
<keyref>en</keyref>
</root>
From nobody@w... Tue Jul 13 04:54:58 2004
Return-Path: <nobody@w...>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
