Permalink
Browse files

Make sure that the in-scope binding for the default namespace never p…

…lays a role evaluating the expression associated with a variable
  • Loading branch information...
ndw committed Feb 15, 2014
1 parent 2ecf625 commit 1c2d18f120cb8a99ef9a4dc7549caff92410c2be
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/com/xmlcalabash/runtime/XAtomicStep.java
@@ -657,7 +657,14 @@ protected RuntimeValue computeValue(ComputableValue var) {
throw new XProcException(sae);
}
} else if (nsbinding.getNamespaceBindings() != null) {
- localBindings = nsbinding.getNamespaceBindings();
+ Hashtable<String,String> bindings = nsbinding.getNamespaceBindings();
+ for (String prefix : bindings.keySet()) {
+ if ("".equals(prefix) || prefix == null) {
+ // nop; the default namespace never plays a role in XPath expression evaluation
+ } else {
+ localBindings.put(prefix,bindings.get(prefix));
+ }
+ }
}
// Remove the excluded ones

0 comments on commit 1c2d18f

Please sign in to comment.