A RESTful browser for eXist Java-Based Function Modules


http://www.w3.org/2005/xpath-functions
A module with the XQuery/XPath Core Library Functions

index-of($source as xdt:anyAtomicType*, $search as xdt:anyAtomicType) xs:integer?
Returns a sequence of positive integers giving the positions within the sequence of atomic values $source that are equal to $search.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence $source are compared with $search under the rules for the 'eq' operator. Values of type xs:untypedAtomic are compared as if they were of type xs:string. Values that cannot be compared, i.e. the 'eq' operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence $source is included in the result.
If the value of $source is the empty sequence, or if no item in $source matches $search, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order.
$sourceThe source sequence
$searchThe search component

Returns the sequence of positive integers giving the positions within the sequence

index-of($source as xdt:anyAtomicType*, $search as xdt:anyAtomicType, $collation-uri as xs:string) xs:integer?
Returns a sequence of positive integers giving the positions within the sequence of atomic values $source that are equal to $search.
The collation used by the invocation of this function is determined according to the rules in 7.3.1 Collations. The collation is used when string comparison is required.
The items in the sequence $source are compared with $search under the rules for the 'eq' operator. Values of type xs:untypedAtomic are compared as if they were of type xs:string. Values that cannot be compared, i.e. the 'eq' operator is not defined for their types, are considered to be distinct. If an item compares equal, then the position of that item in the sequence $source is included in the result.
If the value of $source is the empty sequence, or if no item in $source matches $search, then the empty sequence is returned.
The first item in a sequence is at position 1, not position 0.
The result sequence is in ascending numeric order. The third argument $collation-uri is relative so you only need to specify the last part of a valid full collation-uri, e.g. '?lang=sv-SE', 'lang=sv-SE;strength=primary;decomposition=standard' or 'swedish'.
$sourceThe source sequence
$searchThe search component
$collation-uriThe collation URI

Returns the sequence of positive integers giving the positions within the sequence
Return to list of all modules