For backward compatibility, a value can be an XPath expression, as follows:
The value is evaluated as an AVT. If the result is castable as an integer, the value is used as an integer.
The value is evaluated as an XPath expression.
Starting Orbeon Forms 2020.1, dynamic values should be written as AVTs and not plain XPath expressions.
Form Builder offers an option in the "Control Settings" dialog. The following example shows how to set the first available year as the current year, and the last available year as 10 years from the current year.
Start year and End year value templates
Until Orbeon Forms 2019.2
The values for the start and end year are determined as follows:
[SINCE 2016.3] If you're on Orbeon Forms 2016.3 or newer, and your form was created with Form Builder, and you defined an app/form specific property as in the example below, then the values of these properties are used.
[SINCE 4.2] If the conditions in point 1 don't apply, but you're on Orbeon Forms 4.2 or newer, and you defined a global property setting the start or end date, as in the example below, then the value of this property is used.
Finally, if none of the properties mentioned in points 1 and 2 above are usable, the start year is set to 1970, and the end year to the current year.
The values of all the properties mentioned earlier are XPath expressions. In particular, this allows you to set an end year which isn't hard coded and instead allows you to set it to, say, "this year".