stevedlawrence commented on code in PR #1313:
URL: https://github.com/apache/daffodil/pull/1313#discussion_r1775762975
##########
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala:
##########
@@ -2262,6 +2262,7 @@ case class Document(d: NodeSeq, parent: TestCase) {
case "byte" => new ByteDocumentPart(child, this)
case "bits" => new BitsDocumentPart(child, this)
case "file" => new FileDocumentPart(child, this)
+ case "" => throw TDMLException("documentPart must have attribute
'type'", None)
Review Comment:
I would say the only valid use case of using non-validated TDML is for unit
tests, in which case I'm less worried about these kinds of issues, since
presumably unit tests are starting with valid TDML.
As long as we get a reasonable diagnostic when using the `Runner` class with
invalid TDML I'd prefer to avoid adding additional checks to keep the TDML
Runner as simple as possible. We should probably only include checks that XSD
validation can't support.
--
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]