- From: Bob Morgan <morgan@datapower.com>
- Date: Mon, 12 Jul 2004 15:43:57 -0400
- 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: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>
Received on Monday, 12 July 2004 16:06:36 UTC