Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - Question on xmlschema-test-collection [Thread Next] RE: Question on xmlschema-test-collectionTo: "'Bob Morgan'" <morgan@---------.--->, <xmlschema-dev@--.---> Date: 7/13/2004 11:13:00 AM It looks valid to me, and Saxon validates it OK. Michael Kay > -----Original Message----- > From: xmlschema-dev-request@w... > [mailto:xmlschema-dev-request@w...] On Behalf Of Bob Morgan > Sent: 12 July 2004 20:44 > To: xmlschema-dev@w... > Subject: Question on xmlschema-test-collection > > > 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 13:22:53 2004 Return-Path: <nobody@w...> X-Original-To: | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
