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


##########
daffodil-test/src/test/resources/org/apache/daffodil/section23/dfdl_expressions/expressions_unused_path_no_context.dfdl.xsd:
##########
@@ -28,20 +28,119 @@
     </xs:appinfo>
   </xs:annotation>
 
+
   <xs:element name="e1" type="xs:int" dfdl:lengthKind="explicit" 
dfdl:length="1" />
 
-  <xs:group name="unused_group">
+  <xs:group name="unused_group_1">
     <xs:sequence>
       <xs:element name="value1" type="xs:string" dfdl:lengthKind="explicit" 
dfdl:length="1" />
       <xs:sequence dfdl:terminator="{ ./value1 }" />

Review Comment:
   Yep, that's exactly what's going on. Similar to my other comment, when we 
compile unused groups we could maybe create a fake "root" element contain a 
group ref to the unused group. This way `./` would refer to something with a 
DPathElementCompileInfo and it would work as expected. And if it did actually 
go outside the fake root, only then would you get a warning. That could 
potentially reduce a lot of warnings if it's something we did start to see more 
of them.



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