Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Question on xmlschema-test-collection

From: Bob Morgan <morgan@---------.--->
To: 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...>


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent