- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 06 Dec 2000 15:28:10 +0000
- To: Andy Palmer <Andy.Palmer@mediasurface.com>
- Cc: xmlschema-dev@w3.org
[Note www-xml-schema-comments is meant for discussion of the design, not problems with particular examples vs. particular implementations, unless of course you think your example points to a design issue, which doesn't seem to be the case in this case.] Andy Palmer <Andy.Palmer@mediasurface.com> writes: > <?xml version="1.0"?> > <Tester colour="dark red" > xmlns:xsi="http://www.w3.org/2000/10/XMLSchema" > xsi:noNamespaceSchemaLocation="D:\andyp\xml\tester.xsd"> > > <dummy>hello world</dummy> > > </Tester> Fine. > <?xml version="1.0" encoding="UTF-8"?> > <xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"> > > <xsd:simpleType name="colours"> > <xsd:restriction base="xsd:string"> > <xsd:enumeration value="red"/> > <xsd:enumeration value="dark red"/> > </xsd:restriction> > </xsd:simpleType> > > <xsd:element name="Tester"> > <xsd:complexType> > <xsd:sequence> > <xsd:element name="dummy" type="xsd:string"/> > </xsd:sequence> > <xsd:attribute name="colour" type="colours"/> > <xsd:attribute name="xsi:schemaLocation" type="xsd:string"/> Bogus -- no declaration required or allowed. > <xsd:attribute name="xmlns:xsi" use="default" > value="http://www.w3.org/2000/10/XMLSchema" type="xsd:uriReference"/> Bogus -- no declaration required or allowed. > <xsd:attribute name="xsi:noNamespaceSchemaLocation" type="xsd:string"/> Bogus -- no declaration required or allowed. > </xsd:complexType> > </xsd:element> > > </xsd:schema> > Using XMLSpy 3.5b1 the xsd is fine, but the xml gives the error (on line 2): The xsd is _not_ fine, as noted above. > "Unexpected choice 'dark red' for attribute 'colour': (red|dark|red) expected. But this is a bug. With the three bogus attr decls removed, and all the non-breaking spaces, which are bogus in UTF-8, XSV [1] is happy with your example. Check Spyb2 before complaining, I guess. ht [1] http://www.w3.org/2000/09/webdata/xsv -- Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh W3C Fellow 1999--2001, part-time member of W3C Team 2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440 Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk URL: http://www.ltg.ed.ac.uk/~ht/
Received on Wednesday, 6 December 2000 10:28:31 UTC