XPath custom functions support in Orbeon Forms

Viewed 28

I'm using version 2019.2, coding XForms "manually".

I was looking at: https://www.w3.org/MarkUp/Forms/wiki/Custom_XPath_functions and this: https://github.com/orbeon/orbeon-forms/issues/764

I saw another Orbeon stackoverflow post (which I can't find right now), where the reply said that this should be available to XForms users.

The examples I saw looked simple enough, but they didn't work for me. I declared a "fake" namespace, and tried this:

    xmlns:my="http://us/ny/state/otda/ddd/leaf/my

    <xf:function signature="my:strConcat($p as xs:string*, $q as xs:string*) as xs:string">
            <result value="string(concat($p,$q))"/>
    </xf:function>

and

    <xf:output ref="my:strConcat('one','two')" class="lf_inlineOutput" model="main">strConcat:</xf:output>

But I am getting the error:

XPath syntax error at char 25 in {my:strConcat('one','two')}:
Cannot find a matching 2-argument function named {ht tp://us/ny/state/otda/ddd/leaf/my}strConcat()

Should I be able to do this? Anyone spot a mistake above?

1 Answers

This is not yet supported in Orbeon Forms. See RFE #764 for details.

Related