Tuesday, 15 April 2014

xml - How to use or in Xquery -



xml - How to use or in Xquery -

how can utilize use or in query?

i want homecoming if name ="michael" or age =21. have

$d[contains((name,"michael") or (age,"21"))]

if want check if = :

$d[name = "michael" or age = "21"]

or if want utilize contains:

$d[contains(name,"michael") or contains(age,"21")]

when write contains((,) or (,) ) seemingly using or on syntactical level, giving 2 different xquery parser. not possible in xquery, or programming languages, since functions , operands operate on values of expressions, not on syntax. (name,"michael") has no value (well, has value of 2 element sequence, not value interested in), contains(name,"michael") has actual value, of test, if name contains "michael". or has between 2 calls contains.

xml xquery

No comments:

Post a Comment