XML Schema nillable and fixed?

B

Bob Foster

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
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top