Tamino XML Server Version 9.7
 —  XQuery 4 Reference Guide  —

Functions Ordered by Categories


Tamino Functions

The following functions are specific to Tamino XQuery 4. They are bound to the predeclared namespace http://namespaces.softwareag.com/tamino/TaminoFunction that is usually prefixed by tf.

Name Short Description
tf:content-type get the content type of the specified document
tf:createTextNode create text node from string
tf:document document constructor
tf:getCollation get collation information for a single node
tf:getCollection get name of current collection
tf:getDocname get name of current document
tf:getInoId get ino:id of current document
tf:getLastModified get date of last modification for current document
tf:nonXML-kind get the kind of a non-XML document
tf:parse convert non-XML content to XML
tf:query Execute an XQuery
tf:serialize convert XML content to non-XML
tf:setDocname set name of current document
tf:text-content retrieve non-XML text content from a non-XML document

Top of page

Tamino WebDAV Functions

The following functions are also specific to Tamino XQuery 4. They are bound to the namespace http://namespaces.softwareag.com/tamino/DavFunction that is usually prefixed by tdf.

Name Short Description
tdf:getProperties get all WebDAV properties of a document
tdf:getProperty get single WebDAV property of a document
tdf:isDescendantOf check for WebDAV resource on given path
tdf:mkcol create a new collection resource
tdf:resource get sequence of WebDAV resources
tdf:setProperty set single WebDAV property of a document

Top of page

Text Retrieval Functions

The following functions perform operations in the context of text retrieval. They are also bound to the namespace http://namespaces.softwareag.com/tamino/TaminoFunction (prefixed by tf). Please note that the functions bound to the namespace http://www.w3.org/2002/04/xquery-operators-text (prefixed by ft) are deprecated and will be removed in a future version of Tamino.

Name Short Description
tf:broaderTerm search immediate superordinate term
tf:broaderTerms search all superordinate terms
tf:containsAdjacentText search word tokens in order within some distance
tf:containsNearText search word tokens within some distance, but without order
tf:containsText search for word tokens in a search string
tf:content-type get content type of given document
tf:createAdjacentTextReference create reference descriptions for adjacent text locations
tf:createNearTextReference create reference descriptions for nearby text locations
tf:createNodeReference create reference descriptions for nodes
tf:createTextReference create reference descriptions for text locations
tf:highlight highlight text based on reference descriptions
tf:narrowerTerm search immediate subordinate term
tf:narrowerTerms search all subordinate terms
tf:phonetic search text based on phonetic similarities
ft:proximity-contains search for word tokens within some distance
tf:stem search text based on word stems
tf:synonym search for synonymous terms
ft:text-contains search for word tokens in a search string

Top of page

XQuery Functions

Most of the following functions are also defined in the W3C draft specification. They are bound to the namespace http://www.w3.org/2002/08/xquery-functions that is usually prefixed by fn in this documentation. Since this is the standard namespace in Tamino XQuery 4, you need not declare this namespace when invoking such a function. You can simply use string-length instead of fn:string-length.

Accessors

Tamino XQuery W3C XQuery Draft Short Description
fn:data fn:data (Draft of November 12, 2003) return sequence of atomic items
fn:node-name fn:node-name (Draft of October 29, 2004) return expanded QName of a node
fn:put   inserts a new instance into a database
fn:string fn:string return argument value as a string

Constructors

These functions construct an item of a supported type that is defined in the W3C XML Schema specification. This is why they are bound to the namespace http://www.w3.org/2001/XMLSchema and are usually prefixed by xs. Please also refer to the section Constructor Functions of the W3C draft specification XQuery 1.0 and XPath 2.0 Functions and Operators as of November 12, 2003.

Tamino XQuery Short Description
xs:anyURI construct an anyURI value from an item value
xs:base64Binary construct a base64Binary value from an item value
xs:boolean construct a boolean value from an item value
xs:byte construct a byte value from an item value
xs:date construct a date value from an item value
xs:dateTime construct a dateTime value from an item value
xs:decimal construct a decimal value from an item value
xs:double construct a double value from an item value
xs:duration construct a duration value from an item value
xs:ENTITY construct an ENTITY value from an item value
xs:float construct a float value from an item value
xs:gDay construct a gDay value from an item value
xs:gMonth construct a gMonth value from an item value
xs:gMonthDay construct a gMonthDay value from an item value
xs:gYear construct a gYear value from an item value
xs:gYearMonth construct a gYearMonth value from an item value
xs:hexBinary construct a hexBinary value from an item value
xs:ID construct an ID value from an item value
xs:IDREF construct an IDREF value from an item value
xs:int construct an int value from an item value
xs:integer construct an integer value from an item value
xs:language construct a language value from an item value
xs:long construct a long value from an item value
xs:Name construct a Name value from an item value
xs:NCName construct an NCName value from an item value
xs:negativeInteger construct a negativeInteger value from an item value
xs:NMTOKEN construct an NMTOKEN value from an item value
xs:nonNegativeInteger construct a nonNegativeInteger value from an item value
xs:nonPositiveInteger construct a nonPositiveInteger value from an item value
xs:normalizedString construct a normalizedString value from an item value
xs:positiveInteger construct a positiveInteger value from an item value
xs:short construct a short value from an item value
xs:string construct a string value from an item value
xs:time construct a time value from an item value
xs:token construct a token value from an item value
xs:unsignedByte construct an unsignedByte value from an item value
xs:unsignedInt construct an unsignedInt value from an item value
xs:unsignedLong construct an unsignedLong value from an item value
xs:unsignedShort construct an unsignedShort value from an item value

Functions on Numbers

Tamino XQuery W3C XQuery Draft Short Description
fn:abs   return absolute value
fn:ceiling fn:ceiling return smallest integer not smaller than its argument
fn:floor fn:floor return largest integer not greater than its argument
fn:round fn:round return number closest to its argument

Functions on Strings

Tamino XQuery W3C XQuery Draft Short Description
fn:compare fn:compare (Draft of November 12, 2003) compare two strings
fn:contains fn:contains (Draft of November 12, 2003) check whether one string contains another
fn:ends-with fn:ends-with (Draft of November 12, 2003) check whether a string ends with another string
fn:lower-case fn:lower-case (Draft of October 29, 2004) return lower-cased value of a string
fn:normalize-space fn:normalize-space return its argument with normalized whitespace
fn:starts-with fn:starts-with check whether string 1 starts with string 2
fn:string-join fn:string-join (Draft of November 12, 2003) return concatenation of string sequence
fn:string-length fn:string-length return length of string value
fn:substring fn:substring (Draft of November 12, 2003) return substring of a string value
fn:substring-after fn:substring-after (Draft of November 12, 2003) return substring of a string value following another string
fn:substring-before fn:substring-before (Draft of November 12, 2003) return substring of a string value preceding another string
fn:upper-case fn:upper-case (Draft of October 29, 2004) return upper-cased value of a string

Functions on Booleans

Tamino XQuery W3C XQuery Draft Short Description
fn:false fn:false return the boolean value false
fn:not fn:not invert boolean value of its argument
fn:true fn:true return the boolean value true

Component Extraction Functions on Date and Time Values

These functions are all based on the W3C draft specification XQuery 1.0 and XPath 2.0 Functions and Operators as of October 29, 2004.

Tamino XQuery W3C XQuery Draft Short Description
fn:day-from-date fn:day-from-date return day integer value from date argument
fn:day-from-dateTime fn:day-from-dateTime return day integer value from datetime argument
fn:hours-from-dateTime fn:hours-from-dateTime return hours integer value from datetime argument
fn:hours-from-time fn:hours-from-time return hours integer value from time argument
fn:minutes-from-dateTime fn:minutes-from-dateTime return minutes integer value from datetime argument
fn:minutes-from-time fn:minutes-from-time return minutes integer value from time argument
fn:month-from-date fn:month-from-date return month integer value from date argument
fn:month-from-dateTime fn:month-from-dateTime return month integer value from datetime argument
fn:seconds-from-dateTime fn:seconds-from-dateTime return seconds integer value from datetime argument
fn:seconds-from-time fn:seconds-from-time return seconds integer value from time argument
fn:year-from-date fn:year-from-date return year integer value from date argument
fn:year-from-dateTime fn:year-from-dateTime return year integer value from datetime argument

Functions on QNames

Tamino XQuery W3C XQuery Draft Short Description
fn:expanded-QName fn:expanded-QName return a constructed QName
fn:get-local-name-from-QName fn:get-local-name-from-QName return local part of QName argument
fn:get-namespace-from-QName fn:get-namespace-from-QName return namespace URI of QName argument

Functions on Nodes

Tamino XQuery W3C XQuery Draft Short Description
fn:local-name fn:local-name return local name of node
fn:namespace-uri fn:namespace-uri return namespace URI from node
fn:root fn:root return root of tree with argument node

Functions on Sequences

Tamino XQuery W3C XQuery Draft Short Description
fn:avg fn:avg return average of a sequence of numbers
fn:boolean fn:boolean (Draft of November 12, 2003) compute effective Boolean value of a sequence of items
fn:count fn:count return number of items in the argument's value.
fn:deep-equal fn:deep-equal (Draft of October 29, 2004) check for items in two arguments that compare equal in corresponding positions
fn:distinct-values fn:distinct-values (Draft of November 12, 2003) return sequence with distinct values
fn:max fn:max return object with maximum value from item sequence
fn:min fn:min return object with minimum value from item sequence
fn:reverse fn:reverse reverse the order of items in a sequence
fn:subsequence fn:subsequence return subsequence of a sequence
fn:sum fn:sum return sum of a sequence of numbers

Functions that Generate Sequences

Tamino XQuery W3C XQuery Draft Short Description
fn:collection fn:collection (Draft of November 12, 2003) return input sequence from specified collection
fn:id fn:id (Draft of October 29, 2004) return sequence of element nodes referenced by IDREF values
fn:idref fn:idref (Draft of October 29, 2004) return sequence of attribute nodes with IDREF values containing at least a specified ID value

Context Functions

Tamino XQuery W3C XQuery Draft Short Description
fn:current-date fn:current-date (Draft of October 29, 2004) return current date
fn:current-dateTime fn:current-dateTime (Draft of October 29, 2004) return current date and time
fn:current-time fn:current-time (Draft of October 29, 2004) return current time
fn:last fn:last return number of items in the current sequence
fn:position fn:position return position of context item in current sequence

Top of page