XML Schema nillable and fixed?

Bob Foster

Usenet Archive
Joined
Aug 14, 2002
Messages
220
Reaction score
0
One of the XSD test cases, elemQ016, contains the following:

<xsd:element name="fooTest" nillable="true" fixed="Hello"> <xsd:simpleType> <xsd:restriction base="xsd:string"/> </xsd:simpleType> </xsd:element>

Xerces does not flag the combination of nillable="true" and fixed as an error, and indeed it doesn't seem to be. But according to my reading of
3.3.4/3.2.2 an instance like:

<fooTest nil="true"/>

would be invalid because the element has a fixed value.

This seems very odd. Am I reading this right? If this is so, why wasn't the combination disallowed in the schema?

Thanks.

Bob Foster
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
548,042
Messages
3,104,223
Members
248,131
Latest member
Tonypshaw1

Latest Threads

Top