mbeckerle commented on a change in pull request #262: Unordered sequences
URL: https://github.com/apache/incubator-daffodil/pull/262#discussion_r330246445
 
 

 ##########
 File path: 
daffodil-test/src/test/resources/org/apache/daffodil/section14/unordered_sequences/UnorderedSequences.tdml
 ##########
 @@ -869,10 +758,123 @@
                root="SDE_03">
                <tdml:document><![CDATA[a1,bx20:y99:z,c55]]></tdml:document>
                <tdml:errors>
-                       <tdml:error>Two or more members of the unordered 
sequence (element.SDE_03::LocalComplexTypeDef::sequence)</tdml:error>
+                       <tdml:error>Two or more members of the unordered 
sequence</tdml:error>
                        <tdml:error>have the same name and the same 
namespace.</tdml:error>
-                       <tdml:error>[Namespace: prefix "" is mapped to URI 
"http://example.com";]        Name: e2.</tdml:error>
                </tdml:errors>
-       </tdml:parserTestCase>
+  </tdml:parserTestCase>
+
+       <tdml:defineSchema name="separated">
+               <xs:include 
schemaLocation="org/apache/daffodil/xsd/DFDLGeneralFormat.dfdl.xsd"/>
+    <dfdl:format ref="ex:GeneralFormat" lengthUnits="characters"
+                       lengthKind="delimited" occursCountKind="parsed" />
+               <xs:element name="infix">
+                       <xs:complexType>
+                               <xs:sequence dfdl:sequenceKind="unordered"
+                                       dfdl:separator="," 
dfdl:separatorPosition="infix">
+
+                                       <xs:element name="e1" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="a">
+                                       </xs:element>
+
+                                       <xs:element name="e2" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="b">
+                                       </xs:element>
+
+                                       <xs:element name="e3" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="c">
+                                       </xs:element>
+
+                               </xs:sequence>
+                       </xs:complexType>
+    </xs:element>
+
+    <xs:element name="prefix">
+                       <xs:complexType>
+                               <xs:sequence dfdl:sequenceKind="unordered"
+                                       dfdl:separator="," 
dfdl:separatorPosition="prefix">
+
+                                       <xs:element name="e1" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="a">
+                                       </xs:element>
+
+                                       <xs:element name="e2" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="b">
+                                       </xs:element>
+
+                                       <xs:element name="e3" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="c">
+                                       </xs:element>
+
+                               </xs:sequence>
+                       </xs:complexType>
+               </xs:element>
+
+    <xs:element name="postfix">
+                       <xs:complexType>
+                               <xs:sequence dfdl:sequenceKind="unordered"
+                                       dfdl:separator="," 
dfdl:separatorPosition="postfix">
+
+                                       <xs:element name="e1" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="a">
+                                       </xs:element>
+
+                                       <xs:element name="e2" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="b">
+                                       </xs:element>
+
+                                       <xs:element name="e3" type="xs:int" 
dfdl:lengthKind="delimited"
+                                               dfdl:initiator="c">
+                                       </xs:element>
+
+                               </xs:sequence>
+                       </xs:complexType>
+               </xs:element>
+
+       </tdml:defineSchema>
+
+       <tdml:parserTestCase name="test_separated_infix"
+               model="separated" description="Section 14 Sequence group with 
left over data - DFDL-14-001R"
+               root="infix">
+               <tdml:document><![CDATA[b2,a1,c3]]></tdml:document>
+               <tdml:infoset>
+                       <tdml:dfdlInfoset>
+                               <infix>
+                                       <e1>1</e1>
+                                       <e2>2</e2>
+                                       <e3>3</e3>
+                               </infix>
+                       </tdml:dfdlInfoset>
+               </tdml:infoset>
+  </tdml:parserTestCase>
+
+       <tdml:parserTestCase name="test_separated_prefix"
+               model="separated" description="Section 14 Sequence group with 
left over data - DFDL-14-001R"
 
 Review comment:
   Are these test descriptions just left over from cut-paste. I don't think 
they match what you are testing here. I would just delete them. Your test names 
are descriptive enough. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to