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_r249782726
 
 

 ##########
 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:
   Also, can you double check with the 
[OpenDFDL/ibmDFDLCrossTester](https://github.com/OpenDFDL/ibmDFDLCrossTester)? 
One tests fails with ``sbt test`` with this PR with an error about unsupported 
attribute, so I think something still isn't being removed corrrectly.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to