Re: [Xsltforms-support] User defined functions example
Brought to you by:
alain-couthures
From: William V. <wve...@vi...> - 2013-10-08 13:37:01
|
In the recent releases you can also use javascript functions directly in your XPath expressions. Take a look to the example on this message: http://sourceforge.net/p/xsltforms/mailman/message/31428268/ Regards, - Bill De: Isidro Vila Verde [mailto:jv...@gm...] Enviado el: lunes, 7 de octubre de 2013 17:28 Para: xsl...@li... Asunto: Re: [Xsltforms-support] User defined functions example Well, I think I found it myself. Looking inside xsltforms.js I found similar functions and it, apparently, does what we want XsltForms_xpathCoreFunctions['http://example.net/xforms/new-functions/ new-func'] = new XsltForms_xpathFunction( false, XsltForms_xpathFunction.DEFAULT_NONE, false, function() { return "NEW FUNC"; } ); On 10/07/2013 08:45 PM, Isidro Vila Verde wrote: I am trying to run the example presented here (http://en.wikibooks.org/wiki/XSLTForms/XSLTForms_only_Extensions#User-Defined_Functions) but the browser complains about a syntax error and, when I open the console, I see the error message: ReferenceError: XPathCoreFunctions is not defined Is that example updated to the current xsltforms version or has anyone tested it? Best regards Isidro |