olabusayoT commented on code in PR #1650:
URL: https://github.com/apache/daffodil/pull/1650#discussion_r3066077679
##########
daffodil-core/src/main/scala/org/apache/daffodil/lib/xml/XMLUtils.scala:
##########
@@ -953,6 +1011,28 @@ Differences were (path, expected, actual):
} else if (checkPrefixes && prefixA != prefixB) {
// different prefix
List((zPath + "/" + labelA + "@prefix", prefixA, prefixB))
+ } else if (
+ checkPrefixes && prefixA != null && a.getNamespace(prefixA) !=
nsbA.getURI(prefixA)
+ ) {
+ // prefix doesn't resolve to namespace
+ List(
+ (
+ zPath + "/" + labelA + "@prefix-uri",
+ nsbA.getURI(prefixA),
+ a.getNamespace(prefixA)
+ )
+ )
+ } else if (
+ checkPrefixes && prefixB != null && b.getNamespace(prefixB) !=
nsbB.getURI(prefixB)
+ ) {
+ // prefix doesn't resolve to namespace
+ List(
+ (
+ zPath + "/" + labelA + "@prefix-uri",
+ nsbB.getURI(prefixB),
+ b.getNamespace(prefixB)
+ )
+ )
Review Comment:
I don't think we validate the expected infoset, it looks like it's still an
open ticket
https://issues.apache.org/jira/projects/DAFFODIL/issues/DAFFODIL-288
That being said I don't think it can actually fail, since
a.getNamespace(prefixA) is usually equal to nsbA.getURI(prefixA). I cannot
think of a failing elem example
--
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]