olabusayoT commented on PR #1203:
URL: https://github.com/apache/daffodil/pull/1203#issuecomment-2034729770

   If I recall correctly, the closest I could get the tdml.xsd to satisfying 
what the ticket requested was:
   
   ```xsd
   <complexType name="parserTestCaseType">
     <xsd:sequence>
       <group ref="tns:commonTestCaseElements" maxOccurs="unbounded"/>
       <choice>
         <element ref="tns:infoset"/>
         <element ref="tns:errors"/>
       </choice>
     </xsd:sequence>
     <attributeGroup ref="tns:testCaseAttribs"/>
   </complexType>
   
   <group name="commonTestCaseElements">
     <choice>
       <!-- we can't enforce the cardinality in XSD 1.0 -->
       <element ref="tns:tutorial" minOccurs="0" maxOccurs="unbounded"/>
       <element ref="tns:document"/>
       <element ref="tns:warnings" minOccurs='0'/>
       <element ref="tns:validationErrors" minOccurs="0"/>
     </choice>
   </group>
   ```
   For this test case:
   ```xml
   <parserTestCase xmlns={tdml} name="testCase" root="data" model="mySchema">
     <document>25</document>
   </parserTestCase>
   ```
   
   
   This resulted in the following error, which didn't really make clear that 
infoset/errrors was what was missing:
   
   org.xml.sax.SAXParseException; lineNumber: 9; columnNumber: 20; 
cvc-complex-type.2.4.b: The content of element 'parserTestCase' is not 
complete. One of 
'{"[http://www.ibm.com/xmlns/dfdl/testData":tutorial](http://www.ibm.com/xmlns/dfdl/testData%22:tutorial),
 
"[http://www.ibm.com/xmlns/dfdl/testData":document](http://www.ibm.com/xmlns/dfdl/testData%22:document),
 
"[http://www.ibm.com/xmlns/dfdl/testData":warnings](http://www.ibm.com/xmlns/dfdl/testData%22:warnings),
 
"[http://www.ibm.com/xmlns/dfdl/testData":validationErrors](http://www.ibm.com/xmlns/dfdl/testData%22:validationErrors),
 
"[http://www.ibm.com/xmlns/dfdl/testData":infoset](http://www.ibm.com/xmlns/dfdl/testData%22:infoset),
 
"[http://www.ibm.com/xmlns/dfdl/testData":errors}'](http://www.ibm.com/xmlns/dfdl/testData%22:errors%7D%27)
 is expected.
   


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