-
Bug
-
Resolution: Fixed
-
Major
-
s7
-
None
-
None
I created a multi-file schema CLI test where a simpleType with a restriction is defined in one file, and an element of that simpleType that contains an assertion that uses checkConstraints is defined in another schema. That element is used in the base schema as part of a sequence. The data I provide to the test does not meet the Assertion. No data gets parsed and no error is provided to the user, just an empty dataset. This is the command I run:
echo "unacceptable,hello" | ./daffodil-core/target/start parse -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_base_08.dfdl.xsd --root base2 -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_A_08.dfdl.xsd -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd
Since I was testing a combination of things here, I created a few tests to try and narrow down the issue:
In case it was an issue with spreading a pattern restriction/assertion across multiple schema files, I ran a CLI test against a pattern assertion that was contained in a single file:
echo "unacceptable" | ./daffodil-core/target/start parse -s daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd --root bElem2
with the same result: <nothing></nothing>
I also created a conformance test (multifile_facets_05) that split the assertion across several files, and that test failed correctly with an Assertion failure message.
The test components are in the following files:
- modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_B_08.dfdl.xsd
- modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_C_08.dfdl.xsd
- modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/multi_base_08.dfdl.xsd
- modified: daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/namespaces.tdml
- modified: daffodil-test/src/test/scala/edu/illinois/ncsa/daffodil/section06/namespaces/TestNamespaces.scala