Home > References

XPath supported syntax

XPath notations used in EBX.Platform must conform to the abbreviated syntax of XML Path Language (XPath) Version 1.0, with some restrictions. This document details, which abbreviated syntax is actually supported.

The XPath general expression is: localisation[predicate]

Examples

 

Absolute path localisation:

/library/books/

Relative path localisations :

./Author

../Title

Root and descendant path localisations:

//books

Table path localisations with predicate :

../../books/[author_id = 0101 and (publisher = 'harmattan')]

/library/books/[not(publisher != 'dumesnil')]

Complex predicates :

starts-with(col3,'xxx') and ends-with(col3,'yyy')

contains(col3 ,'xxx') and ( not(col1=100) and date-greater-than(col2,'2007-12-30')

XPath expression syntax specification

Expression Composition Note/example
XPath expression

<container path>[predicate]

/books[title='xxx']

<container path>

<absolute path> | <relative path>

 

<absolute path>

/a/b | //b

//books

<relative path>

../../b | ./b | b

../../books

 

Predicate syntax specification

Expression Composition Note/example
<predicate>

Ex: A and ( B or not(C) )

A,B,C: <atomic expression>

Composition of: logical operators braces, not() and atomic expressions.
<atomic expression>

<path><comparator><criterion> |

method(<path>,<criterion>)

royalty = 24.5

starts-with(title, 'Johnat')

booleanValue = true

<path>

<relative path>

Relative to the table wich contains it.

./authors

title

<comparator>

<boolean comparator> | <numeric comparator> | <string comparator>

 
<boolean comparator> = , !=  
<numeric comparator> = , != , <, >, <=, >=  
<string comparator> =  
<method> <date method > | <string method >  
<date, time & dateTime method > date-less-than, date-equal, date-greater-than  
<string method > matches, starts-with, ends-with, contains  
<criterion> <boolean criterion> | <numeric criterion> | <string criterion> | <date criterion> | <time criterion> | <dateTime criterion>  
<boolean criterion> true , false  
<numeric criterion> integer or decimal -4.6
<string criterion> Quoted character string 'azerty'
<date criterion> Quoted formated: 'yyyy-MM-dd' '2007-12-31'
<time criterion> Quoted formated: 'HH:mm:ss' or 'HH:mm:ss.SSS' '11:55:00'
<dateTime criterion> Quoted formated: 'yyyy-MM-ddTHH:mm:ss' or 'yyyy-MM-ddTHH:mm:ss.SSS' '2007-12-31T11:55:00'

 

 

Home > References