stevedlawrence commented on code in PR #1057:
URL: https://github.com/apache/daffodil/pull/1057#discussion_r1484660294


##########
daffodil-tdml-lib/src/test/scala/org/apache/daffodil/tdml/ScalaxbTests.scala:
##########
@@ -0,0 +1,23 @@
+package org.apache.daffodil.tdml
+
+import org.apache.daffodil.tdml.scalaxb.TestSuite
+
+import org.junit.Assert._
+import org.junit.Test
+
+class ScalaxbTests {
+
+  @Test def testReading(): Unit = {
+    val testSuite =
+      _root_.scalaxb.fromXML[TestSuite](
+        scala.xml.XML.load(
+          getClass
+            .getClassLoader()
+            .getResourceAsStream("test-suite/ibm-contributed/dpaext1-2.tdml"),
+        ),
+      )
+
+    assertNotNull(testSuite)
+    assertEquals(Some("dpaext"), testSuite.suiteName)
+  }
+}

Review Comment:
   > We currently launch the daffodil debugger to create and append TDML files, 
which is IMO rather excessive, given that we could alternatively read and write 
XML files from the typescript extension itself.
   
   Yeah, a pure typescript implementation has some clear advantages. That might 
be a better approach.
   
   Another thought, there have been some discussions about an alternative DFDL 
syntax since there's a lot of dislike of XML. Maybe it's also worth considering 
a different test format? Maybe json (or something similar) would be sufficient, 
which I believe typescript has much better support for. That probably requires 
an even longer discussion and is maybe a more long term thing, if even done, 
but possibly something worth considering.



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to