mbeckerle commented on a change in pull request #560:
URL: https://github.com/apache/daffodil/pull/560#discussion_r633905668
##########
File path:
daffodil-core/src/test/scala/org/apache/daffodil/processor/TestSAXUtils.scala
##########
@@ -54,10 +55,12 @@ object TestSAXUtils {
lazy val testInfosetString: String = expectedInfoset.toString()
lazy val testData: String = "910"
+ lazy val loader = new DaffodilXMLLoader()
- lazy val qualifiedWithNestedSchemasFile: File = new File(
-
Misc.getRequiredResource("/test/example_nested_namespaces_qualified.dfdl.xsd"))
- lazy val qualifiedWithNestedSchemasElem: Elem =
scala.xml.XML.loadFile(qualifiedWithNestedSchemasFile)
+ lazy val qualifiedWithNestedSchemasFile =
+
Misc.getRequiredResource("/test/example_nested_namespaces_qualified.dfdl.xsd")
+ lazy val qualifiedWithNestedSchemasElem: Elem =
+ loader.load(URISchemaSource(qualifiedWithNestedSchemasFile),
None).asInstanceOf[Elem]
Review comment:
@olabusayoT Please note this is what I changed, that eliminated the bad
behavior.
It remains a mystery to me why calling scala.xml.XML.loadFile(...) was
resulting in bad behavior, but only when sbt was run from the command line.
I even commented out all but one test in the TestSAXParseAPI.scala file, but
still running sbt "testOnly *TestSAXParseAPI" would run just that one test, and
fail with the b02:a namespace prefix problem.
Changing this to use DaffodilXMLLoader.load fixed the issue. I am not sure
why.
--
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]