[
https://issues.apache.org/jira/browse/DAFFODIL-697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17268884#comment-17268884
]
Dave Thompson commented on DAFFODIL-697:
----------------------------------------
The original failing test testJavaAPI4 (that Jessie had commented out) has
since been removed and test testJavaAPI4b has been modified numerous time since
the initial write-up.
However, the initial write-up states that "When I swap e3 and e4 in the schema,
all tests that reference that schema use e4 - the first element."
With the latest commit 1ac990c8a299a8a5ecc0ae3ead5e3e5e0e25b96, the identified
issue appears to still occurs.
In the schema file test/japi/mySchema3.dfdl.xsd I moved element named "e4"
prior to the element named "e3". As stated in the initial write-up the tests
that use the "e3" (TestJavaAPI.testJavaAPI3_A, TestJavaAPI.testJavaAPI3) the
fail.
When I changed the length of element "e3" to the value of element "e4" tests
TestJavaAPI.testJavaAPI3_A and TestJavaAPI.testJavaAPI3 then pass and the tests
that use element "e4" then fail.
It still looks like tests TestJavaAPI.testJavaAPI3_A and
TestJavaAPI.testJavaAPI3 use the first element listed in the schema instead of
the element specified in the test.
> Java API: ProcessorFactory's setDistinguishedRootNode method does not appear
> to work.
> -------------------------------------------------------------------------------------
>
> Key: DAFFODIL-697
> URL: https://issues.apache.org/jira/browse/DAFFODIL-697
> Project: Daffodil
> Issue Type: Bug
> Components: API
> Reporter: Jessie Chab
> Priority: Minor
> Labels: reverify
>
> I copied testJavaAPI3 in
> daffodil-core/src/test/java/edu/illinois/ncsa/daffodil/example/TestJavaAPI.java
> and added a new element to
> daffodil-core/src/test/resources/test/japi/mySchema3.dfdl.xsd
> I modified the test (new test is testJavaAPI4) to reference my new element
> (e4) and my new data file (myData2.bat)
> When I run the test it still seems to be referencing element e3, the first
> element in the schema. When I swap e3 and e4 in the schema, all tests that
> reference that schema use e4 - the first element.
> Steve suggested trying the compiler's setDistinguishedRootNode before running
> compile, and that worked with no problems. It only seems to be the
> ProcessorFactory's setDistinguishedRootNode method that isn't working.
> I commented out the failing test (testJavaAPI4) and added the passing test
> that uses the compiler's method (testJavaAPI4b)
--
This message was sent by Atlassian Jira
(v8.3.4#803005)