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

Validation: maxOccurs "unbounded" treated as -1

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s11-M1, s11
    • s11
    • None
    • None

      I created a separate bug for this so DFDL-483 doesn't get too hard to follow.

      I wrote a test that uses a sequence with minOccurs = 3 and maxOccurs = unbounded.

      [info] Test edu.illinois.ncsa.daffodil.section02.validation_errors.TestValidationErrDebug.test_facetCombos_fail_limited_02 started
      Validation Succeeded!
      2013-07-02 06:59:54:321 edu.illinois.ncsa.daffodil.tdml.ParserTestCase Error[Validation Error: element.e occurred '7' times when it was expected to be a minimum of '3' and a maximum of '-1' times.
      Schema context: Some(element.arrayCombo). Location line 22 column 353 in file:/tmp/daffodil_tmp_3337200428269477730.dfdl.xsd. Data Context: byte 14

      based on the schema I have an acceptable number of elements, but it seems to think I have too many because maxOccurs unbounded seems to be translated to -1.

      see tests facetCombos_fail_limited_02 and facetCombos_fail_on_02 in the following files:

      daffodil-test/src/test/scala-debug/edu/illinois/ncsa/daffodil/section02/validation_errors/TestValidationErrDebug.scala
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section02/validation_errors/Validation.tdml

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: