tuxji commented on a change in pull request #485:
URL: https://github.com/apache/incubator-daffodil/pull/485#discussion_r568642039
##########
File path:
daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/namespaces.tdml
##########
@@ -2415,4 +2417,23 @@
</tdml:infoset>
</tdml:parserTestCase>
+ <!--
+ Test name: schemaNoGlobalElems_03
+ Schema: multi_base_21.dfdl.xsd
+ Root: base2
+ Purpose: This test demonstrates that you can have a schema if there are
+ no global elements in the primary schema, as long as the root
element is
+ specified (the TDML Runner always specifies the root)
Review comment:
I searched TDMLRunner.scala for "root" to understand what you meant by
"the TDML Runner always specifies the root". What seems to happen is if a TDML
test has an infoset, the TDML Runner uses that infoset's root element (XML
documents have a single root element) as the root. The root="name" attribute
is not even needed and in fact the TDML Runner throws an exception if the
root="name" attribute does not match the name of the root element of the
infoset.
##########
File path:
daffodil-test/src/test/resources/org/apache/daffodil/section06/namespaces/namespaces.tdml
##########
@@ -2415,4 +2417,23 @@
</tdml:infoset>
</tdml:parserTestCase>
+ <!--
+ Test name: schemaNoGlobalElems_03
+ Schema: multi_base_21.dfdl.xsd
+ Root: base2
+ Purpose: This test demonstrates that you can have a schema if there are
+ no global elements in the primary schema, as long as the root
element is
+ specified (the TDML Runner always specifies the root)
+ -->
+
+ <tdml:parserTestCase name="schemaNoGlobalElems_03"
+ root="distant_element" model="multi_base_21.dfdl.xsd" description="">
Review comment:
Therefore, the root="distant_element" attribute here is redundant since
the test case has an infoset with the distant_element as well.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]