mbeckerle commented on a change in pull request #654:
URL: https://github.com/apache/daffodil/pull/654#discussion_r725092133
##########
File path:
daffodil-runtime1/src/main/scala/org/apache/daffodil/infoset/SAXInfosetOutputter.scala
##########
@@ -180,14 +180,50 @@ class SAXInfosetOutputter(xmlReader:
DFDL.DaffodilParseXMLReader,
attrs
}
+ /**
+ * Copied (with slight modification) from Scala-XML NamespaceBinding.scala to
+ * ensure we use the same logic to convert NamespaceBindings to mappings as
+ * other InfosetOutputters that use NamespaceBinding.buildString(stop)
+ */
+ private def shadowRedefined(start: NamespaceBinding, stop:
NamespaceBinding): NamespaceBinding = {
+ def prefixList(x: NamespaceBinding): List[String] =
+ if ((x == null) || (x eq stop)) Nil
+ else x.prefix :: prefixList(x.parent)
+ def fromPrefixList(l: List[String]): NamespaceBinding = l match {
+ case Nil => stop
+ case x :: xs => new NamespaceBinding(x, start.getURI(x),
fromPrefixList(xs))
Review comment:
Ah, well if they can't be covered, a comment with a theory/guess as to
why a long with adding Assert.invariantFailed for those code paths makes sense
to me along with COVERAGE-ON/OFF comments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]