- From: Hans Teijgeler <hans.teijgeler@quicknet.nl>
- Date: Tue, 18 Nov 2003 16:17:03 +0100
- To: "xml-schema, mailing list" <xmlschema-dev@w3.org>
- Message-id: <3FBA37EF.F0BE2345@quicknet.nl>
Hi, If I have the following schema: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:complexType name="test-type"> <xs:attribute name="optional-attribute" type="xs:string" use="optional"/> <xs:attribute name="required-attribute" type="xs:string" use="required"/> <xs:attribute name="prohibited-attribute" type="xs:string" use="prohibited"/> </xs:complexType> <xs:element name="test-element" type="test-type"/> </xs:schema> and derive the following XML document from it: <?xml version="1.0" encoding="UTF-8"?> <test-element xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\XML\test-of-optionality.xsd" optional-attribute="" required-attribute="test" prohibited-attribute="test"/> then Spy (version 4.4) tells me that: * I MUST fill in a string in the 'optional-attribute', which doesn't make sense to me, because that means that my application has to remove all non-filled-in optional attributes from the XML document (then Spy accepts the file as valid) * I may not fill in a string in the 'prohibited-attribute', which makes sense Is that removal of unused optional attributes what XML Schema prescribes, or is it a flaw of Spy? Regards, Hans
Received on Tuesday, 18 November 2003 10:15:41 UTC