mbeckerle commented on a change in pull request #24: Make TDML Runner not strip 
all attributes
URL: https://github.com/apache/incubator-daffodil/pull/24#discussion_r160480467
 
 

 ##########
 File path: 
daffodil-lib/src/main/scala/edu/illinois/ncsa/daffodil/xml/XMLUtils.scala
 ##########
 @@ -671,13 +676,27 @@ object XMLUtils {
             case xsiNilAttr @ PrefixedAttribute("xsi", "nil", Text("true"), _) 
if (xsiNilAttr.getNamespace(e) == null) => {
               true
             }
-            case attr => {
-              if (ns.length > 0) {
-                !ns.contains(NS(attr.getNamespace(e)))
-              } else {
-                false
-              }
+            case dafIntAttr @ PrefixedAttribute(pre, _, _, _) if (pre ne null) 
&& (dafIntAttr.getNamespace(e) == 
XMLUtils.DAFFODIL_INTERNAL_NAMESPACE.toString) => {
+              Assert.invariant(pre != "")
 
 Review comment:
   Well, dafint is ours. Not the users choice how to use it. I don't think we 
want to allow use of dafint as a default namespace. Certainly I'd consider it  
a programming error in daffodil if dafint ever was a default namespace hence, 
this is an invariant.

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