Permalink
Browse files

Fix issue #215 by making sure option scopes don't get comingled

  • Loading branch information...
ndw committed Jul 30, 2015
1 parent faea259 commit 3600f8b56142c6bb7dbd600efad2995dfadc425b
Showing with 6 additions and 1 deletion.
  1. +6 −1 src/main/java/com/xmlcalabash/runtime/XAtomicStep.java
@@ -345,6 +345,7 @@ public void run() throws SaxonApiException {
// Calculate all the options
DeclareStep decl = step.getDeclaration();
inScopeOptions = parent.getInScopeOptions();
Hashtable<QName,RuntimeValue> futureOptions = new Hashtable<QName,RuntimeValue> ();
for (QName name : step.getOptions()) {
Option option = step.getOption(name);
RuntimeValue value = computeValue(option);
@@ -362,7 +363,11 @@ public void run() throws SaxonApiException {
}
xstep.setOption(name, value);
inScopeOptions.put(name, value);
futureOptions.put(name, value);
}
for (QName opt : futureOptions.keySet()) {
inScopeOptions.put(opt, futureOptions.get(opt));
}
xstep.reset();

0 comments on commit 3600f8b

Please sign in to comment.