Uploaded image for project: 'XMLBeans'
  1. XMLBeans
  2. XMLBEANS-256

XmlObject.validate() validates fine when missing attribute declared with use="required"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • Version 2.1
    • None
    • Validator
    • None
    • XMLBeans 2.1.0, JDK/JRE 1.5.0_06-b05, WinXP SP2

    Description

      I have defined the following element type:
      <xs:complexType name="displayName">
      <xs:complexContent>
      <xs:extension base="name">
      <xs:attribute name="index" type="xs:boolean" use="required">
      <xs:annotation>
      <xs:documentation>Boolean , Indicates if the element should be indexed for search.</xs:documentation>
      </xs:annotation>
      </xs:attribute>
      </xs:extension>
      </xs:complexContent>
      </xs:complexType>

      When creating an element of this type it validates fine using XmlObject.validate() - even if the index attribute is missing from the element.

      Attachments

        Activity

          People

            Unassigned Unassigned
            erikgb Erik Godding Boye
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: