mbeckerle commented on a change in pull request #237: Fixes DAFFODIL-2142
URL: https://github.com/apache/incubator-daffodil/pull/237#discussion_r294982760
 
 

 ##########
 File path: 
daffodil-core/src/main/scala/org/apache/daffodil/dsom/ComplexTypes.scala
 ##########
 @@ -52,8 +55,26 @@ abstract class ComplexTypeBase(xmlArg: Node, parentArg: 
SchemaComponent)
     xmlChildren.flatMap {
       xmlChild =>
         {
-          val g = ModelGroupFactory(xmlChild, this, 1, false) // discards 
unwanted text nodes also.
-          g
+          xmlChild match {
+            case <annotation>{ annotationChildren @ _* }</annotation> => {
+              val dais = annotationChildren.find { ai =>
+                ai.attribute("source") match {
+                  case Some(n) => n.text.contains("ogf") && 
n.text.contains("dfdl")
+                  case _ => false
+                }
+              }
+              if (dais != None) {
+                this.SDW(WarnID.InvalidAnnotationPoint, "complexType is not a 
valid annotation point. Annotation dropped.")
 
 Review comment:
   I prefer the term "ignored" to "dropped"

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