11.5 Data Types




operations

standard functions




numbers: IEEE 754 floating point (doubles)

+ , -, *, div, mod

floor(num), ceiling(num), round(num), sum(numbers), number(value)




strings: "...", '...'

concat(str-1str-2, ...)

substring(strstartlength)

substring-after(strsubstr)

translate(strcharssubstitute-chars)

normalize-space(str)

string(value)

string-length(str)

starts-with(strsubstr)?

contains(strsubstr)?

format-number(numformat-string)




booleans

or, and

not(condition) true(), false(), boolean(value), lang(language)




node-sets

name(node-set)

namespace-uri(node-set)

local-name(node-set)

last(), position(), count(node-set)

id(id1 id2 ...)

path-1 | path-2

path-1 / path-2




relations

=, !=, <, >, <=, >=

 

<article title="red"  
         canvas="yellow">  
  <section>  
    <title>First  
       section</title>  
    <sentence>Some  
       text.</sentence>  
    <sentence>More  
       text.</sentence>  
  </section>  
  <ns:appendix xmlns:ns="none"/>  
</article>

(.='z') or (.='Z')


count( . | ../*[2] ) = 1


string-length() &gt; 1


substring(.,1,1)='a'


contains( 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', . )


translate(string(),'.','') != ''


position()=1 and ( substring(string(.),string-length(string(.))) = ' ' )