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

problem with default value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • Version 2 Beta 1
    • Binding
    • None
    • Windows XP, jdk 1.4.2_05

    Description

      getting error during binding xsdfile to java objects:
      default value '1' is not a valid value

      <xsd>
      .....
      <xs:element name="TransportUnitCharacteristics">
      <xs:complexType>
      <xs:sequence>
      <xs:element ref="TransportUnitCode" minOccurs="0"/>
      <xs:element ref="TransportUnitMeasurements" minOccurs="0"/>
      <xs:element ref="TransportUnitCount" minOccurs="0"/>
      <xs:element ref="TransportUnitIdentifier" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element ref="TransportUnitText" minOccurs="0"/>
      <xs:element ref="TransportUnitDetail" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="TransportUnitType" type="transportUnitType" use="required"/>
      <xs:attribute name="TransportUnitVariable" type="transportUnitVariable" use="optional"/>
      <xs:attribute name="TransportUnitLevel" type="nni1" use="optional" default="1"/>
      </xs:complexType>
      </xs:element>
      .....
      <xs:simpleType name="nni1">
      <xs:restriction base="xs:nonNegativeInteger">
      <xs:totalDigits value="1"/>
      </xs:restriction>
      </xs:simpleType>
      .....
      </xsd>

      this is a fragment of papiNet xml file

      Attachments

        1. papinet.xsd
          476 kB
          plastic

        Activity

          People

            Unassigned Unassigned
            plastic plastic
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: