Here is the language structure:
Query ::= Filter? ('ASC(path)' | 'DESC(path)')*
Filter ::= 'NOT'? SimpleFilter ( ('AND'|'OR') 'NOT'? SimpleFilter )*
SimpleFilter ::= PrimitiveFilter |
'BLOCK' Filter 'END-BLOCK' |
'TYPE(type)' Filter |
'EXISTS(path)' Filter
PrimitiveFilter ::= 'ALL' | 'NONE' | 'UNDEFINED' |
('ITEM(path)' ( ValueComparisonCondition | 'IS-NULL' | ( ItemComparisonCondition 'ITEM(path)') ) ) |
('ID(values)') | ('OWNER-ID(values)')
ValueComparisonCondition ::= 'EQ(value)' | 'GT(value)' | 'GE(value)' | 'LT(value)' | 'LE(value)' | 'STARTSWITH(value)' | 'ENDSWITH(value)' | 'CONTAINS(value)' | 'REF(value)' | 'ORG(value)'
ItemComparisonCondition ::= 'EQ' | 'GT' | 'GE' | 'LT' | 'LE'
It can be visualized e.g.
|