Leigh,
I have checked the XPath functions and added the corresponding test when
required.
This should be OK in Rev. 502.
Thanks!
-Alain
Le 30/04/2011 01:40, Leigh L Klotz Jr a écrit :
> If you call serialize(x) and x does not exist, you get a fatal popup
> error from the browser.
> Form authors can't protect against it because XPath will still evaluate
> the arguments even if you try to check for non-existent nodes.
>
> I had a patch for this which I included accidentally in another patch.
> http://sourceforge.net/mailarchive/forum.php?thread_name=4D7A99D5.2000606%40xerox.com&forum_name=xsltforms-support
> <http://sourceforge.net/mailarchive/forum.php?thread_name=4D7A99D5.2000606%40xerox.com&forum_name=xsltforms-support>
>
> Here is the patch by itself this time:
>
> --- xsltforms.js.orig 2011-04-29 16:37:59.492079329 -0700
> +++ xsltforms.js.new 2011-04-29 16:33:29.339003561 -0700
> @@ -9569,6 +9569,7 @@
> if (arguments.length == 0) {
> throw XPathCoreFunctionsExceptions.serializeNoContext;
> }
> + if (!nodeSet[0]) return "";
> return Core.saveXML(nodeSet[0]);
> } ),
>
>
> It's quite possible transform() has the same problem but I have not
> tested it.
>
> Leigh.
>
> ------------------------------------------------------------------------------
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> http://p.sf.net/sfu/whatsupgold-sd
> _______________________________________________
> Xsltforms-support mailing list
> Xsl...@li...
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support
>
|