Permalink
Browse files

Fix issue #103 variables with no prefix are in no namespace

  • Loading branch information...
ndw committed Jul 25, 2013
1 parent 49e961e commit f50e2252912deca80fd099bea24d5a2aef329d11
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/com/xmlcalabash/model/Parser.java
@@ -879,6 +879,11 @@ private Variable readVariable(Step parent, XdmNode node) {
QName oname = new QName(name, node);
+ // If it has no prefix, then it's in no namespace, not the default namespace
+ if (oname.getPrefix() == null || "".equals(oname.getPrefix())) {
+ oname = new QName("", name);
+ }
+
if (XProcConstants.NS_XPROC.equals(oname.getNamespaceURI())) {
throw XProcException.staticError(28, node, "You cannot specify a variable in the p: namespace.");
}

0 comments on commit f50e225

Please sign in to comment.