W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2004

Question on xmlschema-test-collection

From: Bob Morgan <morgan@datapower.com>
Date: Mon, 12 Jul 2004 15:43:57 -0400
Message-ID: <40F2E9FD.7090306@datapower.com>
To: xmlschema-dev@w3.org

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:choice maxOccurs="unbounded">
                        <xsd:element name="key" type="xsd:language" />
            <xsd:element name="keyref" type="xsd:Name" />

        <xsd:key name="key1">
            <xsd:selector xpath="key"/>
            <xsd:field xpath="."/>

        <xsd:keyref name="key2" refer="key1">
                <xsd:selector xpath="keyref"/>
                <xsd:field xpath="."/>


And here is the xml to be validated

<?xml version="1.0"?>
<root  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Received on Monday, 12 July 2004 16:06:36 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:15:22 UTC