stevedlawrence commented on a change in pull request #168: Keep line/column 
info for Daffodil tests
URL: https://github.com/apache/incubator-daffodil/pull/168#discussion_r249779770
 
 

 ##########
 File path: 
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala
 ##########
 @@ -603,7 +619,19 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent: 
DFDLTestSuite)
       }
       case (None, Some(defSchema), None) => {
         Assert.invariant(model != "") // validation of the TDML should prevent 
this
-        EmbeddedSchemaSource(defSchema.xsdSchema, defSchema.name)
+
+        /* The file, line, and column attributes we add for tracking purposes
+         * cause issues with the IBM DFDL processor as it doesn't allow
+         * attributes that it doesn't understand, so we must remove them */
+        val processedSchema = {
+          if (isCrossTest(this.tdmlDFDLProcessorFactory.implementationName)) {
+            stripLineColInfo(defSchema.xsdSchema)
+          } else {
+            defSchema.xsdSchema
+          }
+        }
+
+        EmbeddedSchemaSource(processedSchema, defSchema.name)
 
 Review comment:
   Can you add a test to make sure that when there is an SDE in a embeded and 
non-embedded schema that we get a line/col number when the implementation is 
"daffodil"?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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