You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mark.birbeck@webBackplane.com edited this page Jan 16, 2010
·
2 revisions
summary How to add an XPath function
labels Module-XForms,Type-HowTo
Introduction
XForms relies heavily on XPath for providing different processing functionality. Adding new functions to the library is achieved by 'registering' the function with the XForms processor.
Details
The registration function to use is , and the parameter to pass is an object:
To add an extension function that just adds two numbers together, we only need to provide an object with one property; the name of the property will be used as the name of the XPath function, and the value of the property will be the function itself:
Once registered, the function can be used within any XPath expression. For example: