Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-610

xsd:nonNegativeInteger causes odd traceback

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: s10
    • Component/s: None
    • Labels:
      None

      Description

      With this input:

      Date: 20

      And this schema:

      <?xml version="1.0" encoding="UTF-8"?>
      <xsd:schema xmlns:dfdl="http://www.ogf.org/dfdl/dfdl-1.0/"
           xmlns:fmt="http://www.ibm.com/dfdl/GeneralPurposeFormat"
           xmlns:ibmDfdlExtn="http://www.ibm.com/dfdl/extensions"
           xmlns:ibmSchExtn="http://www.ibm.com/schema/extensions" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
              
          <xsd:import namespace="http://www.ibm.com/dfdl/GeneralPurposeFormat"
             schemaLocation="IBMdefined/GeneralPurposeFormat.xsd" />
          <xsd:annotation>
              <xsd:appinfo source="http://www.ogf.org/dfdl/">
                  <dfdl:format ref="fmt:GeneralPurposeFormat" />
              </xsd:appinfo>
          </xsd:annotation>
              
          <xsd:element dfdl:initiator="Date:%SP;" dfdl:terminator="%NL;"
             ibmSchExtn:docRoot="true" name="Date">
              <xsd:complexType>
                  <xsd:sequence dfdl:initiator="" dfdl:separator="%SP;"
                   dfdl:separatorPolicy="suppressed">
                      <xsd:element dfdl:length="2" dfdl:lengthKind="explicit"
                       dfdl:textNumberPattern="#0" ibmDfdlExtn:sampleValue="1" name="Day">
                          <xsd:simpleType>
                              <xsd:restriction base="xsd:nonNegativeInteger">
                                  <xsd:maxInclusive value="31" />
                              </xsd:restriction>
                          </xsd:simpleType>
                      </xsd:element>
                  </xsd:sequence>
              </xsd:complexType>
          </xsd:element>
      </xsd:schema>

      A very long, very confusing trace is returned. It appears to related to the nonNegativeInteger. Changing that to an unsignedInt solves the problem and it parses as expected.

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              jadams Joshua Adams
              Reporter:
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Tasks