mbeckerle commented on code in PR #1314:
URL: https://github.com/apache/daffodil/pull/1314#discussion_r1773761002


##########
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:
   Withdrawn. 
   



##########
daffodil-core/src/main/scala/org/apache/daffodil/core/grammar/GrammarTerm.scala:
##########
@@ -56,7 +56,7 @@ abstract class Gram(contextArg: SchemaComponent)
   final override lazy val tunable = context.tunable
 
   final override def namespaces = context.namespaces
-  final override def targetNamespace = context.targetNamespace
+  final override def noPrefixNamespace = context.noPrefixNamespace

Review Comment:
   This makes sense to me. DSOM should be the only thing that knows anything 
about namespaces.  That said, some stuff happens at Gram level that probably 
should not. 



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

Reply via email to