Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix issue #215 by making sure option scopes don't get comingled
  • Loading branch information
ndw committed Jul 30, 2015
1 parent faea259 commit 3600f8b
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/main/java/com/xmlcalabash/runtime/XAtomicStep.java
Expand Up @@ -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);
Expand All @@ -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();
Expand Down

0 comments on commit 3600f8b

Please sign in to comment.