I've a problem with xform, that see only a customer system administrator. And i cannot see in my computer. There is a xforms code, where output has a ref-attribute ("if(licence) ..")
<xforms:group ref="content">
<xforms:label>The shop list</xforms:label>
<xforms:output ref="name"><xforms:label>Name</xforms:label></xforms:output>
<!--There is a complex expression-->
<xforms:output
ref="if(licence) then
if(licence/to) then
concat(licence/code,' (',
concat(substring(licence/from,9,2),'.',substring(licence/from,6,2),'.',substring(licence/from,1,4))
,' - ',
concat(substring(licence/to,9,2),'.',substring(licence/to,6,2),'.',substring(licence/to,1,4))
,')')
else
concat(licence/code,' (no due date, from ',
concat(substring(licence/from,9,2),'.',substring(licence/from,6,2),'.',substring(licence/from,1,4))
,')')
else
'You have not a licence!'">
<xforms:label>licence</xforms:label>
</xforms:output>
</xforms:group>
And the admin can see the next mistake in his log, that coming so much.
WARN XFormsServer - exception while evaluating XPath expression {throwable: "org.orbeon.oxf.common.ValidationException: (preparing XPath expression: expression='{if (not(exf:relevant( ... the same expression ... ))) then 'xforms-disabled-subsequent' else ''}'): Required item type of first argument of exf:relevant() is node(); supplied value has item type xs:string
Required item type of first argument of exf:relevant() is node(); supplied value has item type xs:string
at org.orbeon.oxf.common.ValidationException.wrapException(ValidationException.java:119)
at org.orbeon.oxf.util.XPathCache.handleXPathException(XPathCache.java:418)
To anybody help me, how to repair this problem? Thank you
As the error states, the problem is that the expression in your <xforms:output ref="...">
element, evaluates to a string not a node.
The ref
attribute on an xforms control needs to a refer to a node within the data model, not to a string.