Table 2.
Examples for constraint checks
| Check example | Comment |
|---|---|
| item0 >= 1 && item0 <= 1 | Cardinality check for a mandatory variable. (The domain path for item0 will specify that the number of child nodes of the element at the given archetype-path is of interest, similarly to the example in Table 1.) |
| is.element(item0, c("Weiblich","Männlich","Divers")) | Checks if value in item0 is in list of allowed values |
| if (item1 == "kg") {return (item0 >= 0.0 && item0 <= 1000.0)}if (item1 == "g") {return (item0 >= 0.0 && item0 <= 1000000.0)} | Checks range constraint for valid numeric values in item0 considering the corresponding value for the unit in item1 |