stevedlawrence 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_r159972014
##########
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:
Is the only situation where pre could be an empty string is if default
xmlsns was the daffodil internal namespace? Seems some like something really
weird and probably dumb to do, but technically it's legal, I think? So should
this assertion 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