- From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
- Date: 26 Oct 2000 08:52:24 +0100
- To: Mike_Leditschke@nemmco.com.au
- Cc: xmlschema-dev@w3.org
Mike_Leditschke@nemmco.com.au writes: > I am attempting to build a number of XML schemas using the > http://www.w3.org/1999/XMLSchema version of the spec. I am using > XMLSpy which is reporting errors on XML that looks valid to me. > > I would appreciate an indication as to whether or not the errors are > legitimate. > > > Problems > > 1. The XML below gets the message below when validation is attempted. > > "We are sorry, but the elements that have the same name but different types > functionality is not yet implemented in this version". > > <?xml version="1.0" encoding="UTF-8"?> > <!-- edited with XML Spy v3.0.7 NT (http://www.xmlspy.com) by Michael > Leditschke (NEMMCO) --> > <schema xmlns="http://www.w3.org/1999/XMLSchema"> > <complexType name="a"> > <element name="c" type="string"/> > </complexType> > <complexType name="b"> > <element name="c" type="decimal"/> > </complexType> > </schema> > > The two c elements are part of different type definitions and should be > locally scoped and hence happily have different types. Yes/No? That looks OK to me. Have you tried the April version of xsv [1] ? > 4. The XML below gets the message below when validation is attempted > > "DTD/Schema error - element 'd' already defined" (the second definition is > highlighted). > > <?xml version="1.0" encoding="UTF-8"?> > <!-- edited with XML Spy v3.0.7 NT (http://www.xmlspy.com) by Michael > Leditschke (NEMMCO) --> > <schema xmlns="http://www.w3.org/1999/XMLSchema"> > <complexType name="a"> > <element name="d"> > <simpleType base="string"> > <length value="5"/> > </simpleType> > </element> > </complexType> > <complexType name="b"> > <element name="d"> > <simpleType base="string"> > <length value="5"/> > </simpleType> > </element> > </complexType> > </schema> > > This situation is very similar to the previous one except that rather than > using an > inbuilt type, I'm using an anonymous type definition. Again, the two 'd' > elements > are part of different type definitions and should be locally scoped. > What have I done this time? As above -- looks OK to me, but as it stands there's no way any instance would get validated at all, as there are no top-level element definitions . . . ht -- 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 Thursday, 26 October 2000 03:52:28 UTC