stevedlawrence commented on code in PR #1314:
URL: https://github.com/apache/daffodil/pull/1314#discussion_r1773625884
##########
daffodil-lib/src/main/scala/org/apache/daffodil/lib/xml/QNameBase.scala:
##########
@@ -168,19 +168,22 @@ object QName {
def resolveStep(
qnameString: String,
scope: scala.xml.NamespaceBinding,
- targetNamespace: NS,
+ noPrefixNamespace: NS,
unqualifiedPathStepPolicy: UnqualifiedPathStepPolicy
): Try[StepQName] = {
- // TODO: We pass in NoNamespace instead of targetNamespace here, which may
not be correct in
- // all cases. If the step being referenced is a global element or if
elementFormDefault is
- // qualified then we probably do want to use targetNamespace to look it up
since those
- // elements likely have a namespace. But for non-qualified local steps, we
probably do just
- // want to use NoNamespace since the step won't have a namespace. However,
this is sort of a
- // chicken-and-egg problem--we need to know the namespace to how to find
the step, but we
- // don't know which namespace to use (NoNamespace or targetNamespace)
unless we've already
- // found the same. Instead, we use NoNamespace and let the flexibility that
- // unqualfiedPathStepPolicy gives use help to find the step element.
Possibly related to
- // DAFFODIL-2917
+ // It is not clear what namespace to use when a path step does not have a
prefix and there
+ // is no default namespace defined. The step could be to a global element
in the same
Review Comment:
Can you clarify what isn't right about this comment? My goal with this is to
explain why we don't use the `noPrefixNamespace` parameter when calling
resolveRef and instead pass in `NoNamespace`.
--
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]