[Xsltforms-support] better error message for multiple bind elements
Brought to you by:
alain-couthures
From: Leigh L K. Jr <lei...@xe...> - 2011-03-11 21:53:33
|
Until the restriction on one bind element per node gets lifted, this helps you find the problem. (Note that the restriction is peculiar to XSLTForms and is not part of XForms 1.1) =================================================================== --- xsltforms.js (xsltforms-dataisland-478) +++ xsltforms.js (working copy) @@ -2340,7 +2340,7 @@ var node = this.nodes[i]; var bindid = Core.getMeta(node, "bind"); if (bindid && this.element.id != bindid) { - XFProcessor.error(el, "xforms-binding-exception", "Two binds affect one node"); + XFProcessor.error(el, "xforms-binding-exception", "Two binds affect one node: " + bindid + ", " + this.element.id); } else { Core.setMeta(node, "bind", this.element.id); @@ -9241,6 +9241,7 @@ if (arguments.length == 0) { throw XPathCoreFunctionsExceptions.serializeNoContext; } + if (!nodeSet[0]) return ""; return Core.saveXML(nodeSet[0]); } ), |