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_r249778945
##########
File path:
daffodil-tdml-lib/src/main/scala/org/apache/daffodil/tdml/TDMLRunner.scala
##########
@@ -456,6 +458,20 @@ abstract class TestCase(testCaseXML: NodeSeq, val parent:
DFDLTestSuite)
final def isCrossTest(implString: String) = implString != "daffodil"
+ val removeLineColInfo = new RewriteRule {
+ override def transform(n: Node) = n match {
+ case e: Elem => {
+ e.copy(attributes = n.attributes.filter(a =>
+ (a.key != XMLUtils.COLUMN_ATTRIBUTE_NAME) &&
+ (a.key != XMLUtils.LINE_ATTRIBUTE_NAME) &&
+ (a.key != XMLUtils.FILE_ATTRIBUTE_NAME)))
+ }
Review comment:
Should we also make sure the the namespace is the DAFINT namespace?
"column", "line", and "file" are pretty generic, I could see this easily
removing attributes in some other namespace with the same name that shouldn't
be removed.
----------------------------------------------------------------
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