openEHR / specifications-BASE

openEHR general specifications and resources.
Other
9 stars 9 forks source link

Expression language: for_all hard to read and whitespace aware parser needed #2

Open pieterbos opened 8 years ago

pieterbos commented 8 years ago

consider the following expression snippet:

for_all $event in /data/events /some/other/path > $event/items/value

This is quite hard to read, plus the parser needs to be whitespace aware in order to understand wh. Xpath solved this in xpath 2 and 3 with the following syntax:

every $event in /data/events satisfies /some/other/path > $event/items/value

And

some $event in /data/events satisfies /some/other/path > $event/items/value

So, we can do:

I would prefer the 'every'-syntax, but if someone has a good suggestion for what comes after for_all...