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

 ##########
 File path: 
daffodil-runtime1/src/main/scala/org/apache/daffodil/infoset/InfosetImpl.scala
 ##########
 @@ -1415,6 +1423,50 @@ sealed class DIComplex(override val erd: 
ElementRuntimeData, val tunable: Daffod
     }
   }
 
+  final def sortChildNodesByPosition(): Unit = {
+    // TODO: Once we upgrade to Scala 2.13 we can call the inplace sort 
method: DAFFODIL-2152
+    // childNodes = childNodes.sortInPlace(_.erd.position)
 
 Review comment:
   Are you sure? If you have something like:
   ```xml
   <xs:element name="root">
     <xs:complexType>
       <xs:sequence>
         <xs:element name="a" />
         <xs:element name="b" />
         <xs:sequence dfdl:sequenceKind="unordered">
           <xs:element name="c" />
           <xs:element name="d" />
        </xs:sequence>
     </xs:complexType>
   </xs:element>
   ```
   In that case elements a, b, c, and d are all children of the root element, 
and I would think would all be in the same childNodes array.

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