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


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/GroupDef.scala:
##########
@@ -131,6 +133,18 @@ sealed abstract class GlobalGroupDef(
     }
   }
 
+  private def checkForGroupDefAnnotations(): Unit = {
+    // Ensure that the group definition itself does not have any annotations.
+    // Annotations should only be on group references or children of the group
+    // definition
+    val dais = getDFDLAppinfos(defXML \ "annotation" \ "appinfo")
+    if (dais.nonEmpty)
+      SDW(
+        WarnID.InvalidAnnotationPoint,
+        "Annotations placed directly on a group definition will be ignored by 
DFDL. Any annotation expected to be processed by DFDL should instead be placed 
on the group reference",

Review Comment:
   As an alternative to the group reference, could annotations also be placed 
on the model group (i.e. choice or sequence) of the group definition? I imagine 
if someone put an annotation on the group def that's maybe what they meant to 
do? Is it worth saying something like `... should be placed on the group 
reference or model group`?



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