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,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top