Files
release11-tools/FunctionSet/XPath/20_examples

74 lines
2.9 KiB
Plaintext

!DATE/TIMES
!anyURI
fn:resolve-uri(relative,base);NONE
!Number
!String
fn:normalize-unicode();NONE
fn:escape-uri(stringURI,esc-res);;escape-uri("http://example.com/test#car", true())?"http%3A%2F%2Fexample.com%2Ftest#car"?escape-uri("http://example.com/test#car", false())?"http://example.com/test#car"?escape-uri ("http://example.com/~bébé", false())?"http://example.com/~b%C3%A9b%C3%A9"
!STH
fn:nilled(node);Returns a Boolean value indicating whether the argument node is nilled
fn:index-of((item,item,...),searchitem);;index-of((15, 40, 25, 40, 10), 40)?(2, 4)?index-of(("a", "dog", "and", "a", "duck"), "a") Result (1, 4)?index-of((15, 40, 25, 40, 10), 18)?()
fn:collection();NONE
fn:collection(string);NONE
fn:resolve-QName();NONE
fn:deep-equal(param1,param2,collation);Returns true if param1 and param2 are deep-equal to each other, otherwise it returns false
fn:zero-or-one(item,item,...);Returns the argument if it contains zero or one items, otherwise it raises an error
fn:idref((string,string,...),node);Returns a sequence of element or attribute nodes that have an IDREF value equal to the value of one or more of the values specified in the string argument
fn:replace(string,pattern,replace);;replace("Bella Italia", "l", "*")?'Be**a Ita*ia'?replace("Bella Italia", "l", "")?'Bea Itaia'
!STH2
fn:namespace-uri-from-QName();NONE
fn:base-uri();Returns the value of the base-uri property of the current or specified node
fn:base-uri(node);Returns the value of the base-uri property of the current or specified node
fn:error()
fn:error(error)
fn:error(error,description)
fn:error(error,description,error-object);;error(fn:QName('http://example.com/test', 'err:toohigh'), 'Error: Price is too high')?http://example.com/test#toohigh and the string "Error: Price is too high" to the external processing environment
fn:doc-available(URI);Returns true if the doc() function returns a document node, otherwise it returns false
fn:subsequence((item,item,...),start,len);Returns a sequence of items from the position specified by the start argument and continuing for the number of items specified by the len argument. The first item is located at position 1?subsequence(($item1, $item2, $item3,...), 3)?($item3, ...)?subsequence(($item1, $item2, $item3, ...), 2, 2)?($item2, $item3)
fn:trace(value,label);Used to debug queries
fn:local-name-from-QName();NONE
fn:in-scope-prefixes();NONE
fn:namespace-uri-for-prefix();NONE
fn:unordered((item,item,...));Returns the items in an implementation dependent order
fn:QName();NONE
fn:root() fn:root(node);Returns the root of the tree to which the current node or the specified belongs. This will usually be a document node
fn:remove((item,item,...),position);Returns a new sequence constructed from the value of the item arguments
fn:ends-with(string1,string2);Returns true if string1 ends with string2, otherwise it returns false?ends-with('XML','X')?false
fn:doc(URI);NONE