I am currently experimenting with Oracle's XML Schema Validator for Java(compliant for W3C XML Schema Proposal version:20001024). I have an element definition in my schema as follows...
<xsd:element name="authorizer">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
...but if I validate an XML document against this schema definition and I omit the "name" attribute in the "authorizer" element in my XML document, the parser does not complain. It should since "name" is required. Whats strange is that if I change the schema to use="prohibited", then the parser complains that "name" in the XML document should not be present since according to the schema it is prohibited(at least that makes sense). I have no clue why it does not recognize use="required". Any help would be appreciated.
SAF
<xsd:element name="authorizer">
<xsd:complexType>
<xsd:attribute name="name" type="xsd:string" use="required"/>
</xsd:complexType>
</xsd:element>
...but if I validate an XML document against this schema definition and I omit the "name" attribute in the "authorizer" element in my XML document, the parser does not complain. It should since "name" is required. Whats strange is that if I change the schema to use="prohibited", then the parser complains that "name" in the XML document should not be present since according to the schema it is prohibited(at least that makes sense). I have no clue why it does not recognize use="required". Any help would be appreciated.
SAF