stevedlawrence commented on code in PR #1366:
URL: https://github.com/apache/daffodil/pull/1366#discussion_r1842854257


##########
daffodil-test/src/test/resources/org/apache/daffodil/section14/sequence_groups/SequenceGroup.tdml:
##########
@@ -1164,7 +1164,7 @@
       </xs:complexType>
     </xs:element>
     <xs:group name="g0">
-      <xs:sequence dfdl:separatorPosition="infix">
+      <xs:sequence>

Review Comment:
   Can group sequences really not have any properties? I thought that was legal?



##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/SchemaSet.scala:
##########
@@ -563,6 +606,10 @@ final class SchemaSet private (
     else {
       val hasErrors = super.isError
       if (!hasErrors) {
+        // after compilation is done, we want to walk through all our refs and
+        // if a property is in the cache of the referencer, put it into the
+        // cache of the referenced element
+        propagateReferenceeAndTypeUsedProperties

Review Comment:
   I wonder if it would be possible or benefiit do this propogation at the time 
of property lookup instead of a step at the end of compilation? For example, is 
it possible for `findPropertyOption` to add to more than just one cache? It 
could add to its current cache but also use this logic to find any element 
reference/simpletypes and add to their cache as well? That way all the cache 
stuff is in one spot?
   
   Or maybe alternatively, could `checkUnusedProperties` be updated to inspect 
the referenced propCaches instead of just its, and then we don't have to 
propagate/copy things at all? 



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