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


##########
daffodil-core/src/main/scala/org/apache/daffodil/core/dsom/GroupDef.scala:
##########
@@ -131,6 +133,15 @@ 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 found = defXML.child.map(_.label).contains("annotation")

Review Comment:
   Need to check that the annotation is specifically an appinfo annotation with 
source="http://www.ogf.org/dfdl/";.
   Those should create the warning.
   
   You might want to tolerate not a perfect match on the source URI. 
   
   See annotatedSchemaComponent.scala
   
   Look for ``` lazy val dfdlAppInfos = { ... ``` for this logic.
   
   The common logic for finding a DFDL appinfo, tolerating small imperfections 
in the URI, should be shared between here and there. I'd suggest the common 
code belongs in XMLUtils, called from both places. 
   



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