Search code examples
xpathorbeon

Orbeon section visibility with XPath expression


I want to create a section that is visible if some expression is accomplished using dates. For example, if your age is greater than 18 years or if the selected date is at the future or at the past.

Then, the expression to check if date is at the future would be something like:

(xs:date('2012-01-01') > current-date())

This expression is working correctly if as a visibility rule of an element inside a section. The element is hidden when necessary. But if I use it to hide the entire section, a Incorrect XPath expression error is shown at the form builder. I can use simpler expressions like 10 > 5 correctly, but not this one. Is the use of xs:date() unavailable on the sections?


Solution

  • This was a bug #1758: Incorrect XPath expression in Section Settings dialog. We just fixed it and the fix will be in Orbeon Forms 4.6