Permalink
Browse files

Attempt to fix issue #139; if a parameter wasn't initialized with a g…

…eneral value, create one from its string value
  • Loading branch information...
ndw committed Feb 8, 2014
1 parent d964441 commit 88f7dd15b1841ecbd1c9a4af370025e2c44d3e63
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/com/xmlcalabash/model/RuntimeValue.java
@@ -47,7 +47,6 @@
private Vector<XdmItem> generalValue = null;
private String value = null;
private XdmNode node = null;
- private ComputableValue val = null;
private boolean initialized = false;
private Hashtable<String,String> nsBindings = null;
@@ -129,7 +128,8 @@ public boolean hasGeneralValue() {
public XdmValue getValue() {
if (generalValue == null) {
- throw new XProcException(node, "Unexpexted null value in getValue()");
+ // Turn the string value into an XdmValue
+ return new XdmAtomicValue(value);
}
if (generalValue.size() == 1) {
return generalValue.get(0);

0 comments on commit 88f7dd1

Please sign in to comment.