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


##########
daffodil-lib/src/main/resources/org/apache/daffodil/xsd/tdml.xsd:
##########
@@ -31,86 +31,13 @@
   <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/"/>
   <xsd:import namespace="http://www.ogf.org/dfdl/dfdl-1.0/extensions"/>
 
-  <xs:attribute name="tutorialInclude" type="xs:string" fixed="no"/>
-  
-<!-- 
-  This element's type is a stub that satisfies the need for xhtml5 validation 
as part of TDML files.
-
-  It is just a wildcard with skip validation in it. So it's not really 
validating anything.
-
-  Users of TDML creating tutorials should paste in known-correct xhtml5 as the 
contents of the 
-  tutorial elements.
--->
-  <xs:element name="tutorial">
-      <xs:complexType mixed="true">
-      <xs:sequence>
-        <xs:any namespace="##any" processContents="skip" minOccurs="0" 
maxOccurs="unbounded"/>
-      </xs:sequence>
-      <xs:anyAttribute namespace="##any" processContents="skip"/>
-    </xs:complexType>
-  </xs:element>
-  
-  <!-- IBM uses this namespace http://www.ibm.com/xmlns/dfdl/testData -->
-
-  <element name="testSuite">
-    <complexType>
-      <sequence>
-        <choice maxOccurs="unbounded" minOccurs="0">
-          <element ref="tns:tutorial"/>
-          <element ref="tns:parserTestCase"/>
-          <!-- This is an extension to the IBM TDML language. We allow schemas 
-            to be directly embedded inside the TDML file. A TDML file that 
contains all 
-            the schemas it needs is a "self contained" TDML file. -->
-          <element ref="tns:defineSchema" minOccurs="0"/>
-
-          <element ref="tns:defineConfig" minOccurs="0"/>
-
-          <element ref="tns:unparserTestCase"/>
-        </choice>
-      </sequence>
-      <attribute name="suiteName" type="xs:token" use="optional"/>
-      <attribute name="ID" type="xs:token" use="optional"/>
-      <attribute name="description" type="xs:string" use="optional"/>
-      <attribute name="defaultRoundTrip" type="tns:roundTripType" 
use="optional"/>
-      <attribute name="defaultValidation" type="tns:validationType" 
use="optional"/>
-      <attribute name="defaultConfig" type="xs:string" use="optional"/>
-      <attribute name="defaultImplementations" type="tns:implementationsType" 
use="optional"/>
-    </complexType>
-    <unique name="unique-parserTestCase-name">
-      <selector xpath="parserTestCase"/>
-      <field xpath="@name"/>
-    </unique>
-    <unique name="unique-unparserTestCase-name">
-      <selector xpath="unparserTestCase"/>
-      <field xpath="@name"/>
-    </unique>
-    <unique name="unique-embeddedSchema-name">
-      <selector xpath="defineSchema"/>
-      <field xpath="@name"/>
-    </unique>
-    <unique name="unique-embeddedConfig-name">
-      <selector xpath="defineConfig"/>
-      <field xpath="@name"/>
-    </unique>
-  </element>
-  
-  <simpleType name="implementationsType">
-    <list itemType="tns:implementationItem"/>
-  </simpleType>
-  
-  <simpleType name="implementationItem">
-    <restriction base="xs:token">
-      <enumeration value="daffodil"/>
-      <enumeration value="daffodilC"/>
-      <enumeration value="ibm"/>
-    </restriction>
-  </simpleType>
+  <xsd:include schemaLocation="tdml-core.xsd"/>
   
 <!-- We want to allow an xsd:schema to be named and directly embedded in 
   the TDML thereby allowing a fully-self-contained single file test case as 
   an exchange medium for tests. -->
 
-  <element name="defineSchema" type="tns:defineSchemaType"/>
+  <element name="defineSchema" type="tns:defineSchemaType" 
substitutionGroup="tns:testSuiteChoices"/>

Review Comment:
   Wow. I learned what a substitution group is really for. Cool. 



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