Re: [Xsltforms-support] better error message for multiple bind elements
Brought to you by:
alain-couthures
From: COUTHURES A. <ala...@ag...> - 2011-03-13 20:17:21
|
Leigh, > 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); > This was already done at r484. At r493, I added experimental support for multiple bindings, considering that they are treated in document order and that conflicting MIPs are not indicated. > @@ -9241,6 +9241,7 @@ > if (arguments.length == 0) { > throw XPathCoreFunctionsExceptions.serializeNoContext; > } > + if (!nodeSet[0]) return ""; > return Core.saveXML(nodeSet[0]); > } ), > This was already done at r482. Thanks! -Alain |