The original TDML language has some friction in it. A new TDML version, with a distinct namespace, should be created.
This memo outlines suggested improvements and features.
- Compatibility flag: an attribute on the tdml:testSuite element should enable full compatibility with TDML v1.0
- Change: Overall the TDML (v2.0) schema should be elementFormDefault="unqualified" so that the nested elements like infoset, document, parserTestCase, defineSchema, defineConfig, etc. None of those should require namespace prefixes.
- Change: documentPart - use shorter name just "part"
- replaceDFDLEntities should default to true.
- Improvement: document
- replaceDFDLEntities should be allowed, and set the default for any contained parts
- Improvement: documentPart
- mixtures of multiple file and non-file documentParts should be allowed, and all get concatenated together. (TBD: How important is this?)
- Improvement: defineSchema
- useDefaultNamespace should default to false
- elementFormDefault should default to unqualified
- dfdl:format annotations should be accepted both encapsulated in annotation/appinfo, as well as not encapsulated.
- Improvement: tutorial
- add kind="xhtml/asciidoc/markdown" with the ability to also specify the defaultTutorialKind on the testSuite element
- in compatibility mode this would default to xhtml. In non-compatibility mode this would have no default, but would not be required to be specified unless tutorial elements were present.
- A tdml:tutorial="..." attribute form should also be allowed. Multiple such attributes should be allowed.
- Improvement: dfdlInfoset - this child element inside infoset should be optional.
- Improvement: The TDML Runner's comparison of Infosets for parserTestCases should require the right namespaces. (Currently only unparser test cases require this. Parser test cases tolerate incorrect namespaces.)
- Improvement: The comparison of XML should be type aware for all types based on xsi:type annotations on elements. Hence, the infoset of a test could be decorated with xsi:type, or a parameter set to tell Daffodil's infoset outputter to add these xsi:type annotations to the output infosets to facilitate comparison with the TDML expected infoset. This avoids the need for the test author to clutter the TDML infoset with redundant xsi:type information, which is, after all, redundant with the DFDL schema.
- Improvement: A reflective runner should allow a JUnit test to not have to contain a string for the test name. The test name should be derived from the test method's own name.
- See the sourcecode repository (https://github.com/com-lihaoyi/sourcecode) for easy reflective access to method names.