XQuery Function Documentation

Search and Browse

i18n:apply

i18n:apply($content as node()+, $modules as element(), $model as item()*) as item()*

Start processing the provided content using the modules defined by $modules. $modules should be an XML fragment following the scheme: <modules> <module prefix="module-prefix" uri="module-uri" at="module location relative to apps module collection"/> </modules>

Parameters:
$content+ the sequence of nodes which will be processed
$modules modules to import
$model* a sequence of items which will be passed to all called template functions. Use this to pass information between templating instructions.
Returns:
item()*

i18n:getLanguageCollection

i18n:getLanguageCollection($node as node()*, $selectedLang as xs:string, $pathToCatalogues as xs:string, $defaultLang as xs:string?) as item()*

Parameters:
$node* $node*
$selectedLang $selectedLang
$pathToCatalogues $pathToCatalogues
$defaultLang? $defaultLang?
Returns:
item()*

i18n:getLocalizedText

i18n:getLocalizedText($textNode as node(), $selectedCatalogue as node()) as item()*

Parameters:
$textNode $textNode
$selectedCatalogue $selectedCatalogue
Returns:
item()*

i18n:getPathToCatalogues

i18n:getPathToCatalogues($node as node()*, $pathToCatalogues as xs:string) as item()*

Parameters:
$node* $node*
$pathToCatalogues $pathToCatalogues
Returns:
item()*

i18n:getSelectedLanguage

i18n:getSelectedLanguage($node as node()*, $selectedLang as xs:string) as item()*

Parameters:
$node* $node*
$selectedLang $selectedLang
Returns:
item()*

i18n:process

i18n:process($node as node(), $selectedCatalogue as node()) as item()*

recursive function to traverse through the document and to process all i18n prefixed nodes

Parameters:
$node node to analyse if is an i18n:* node
$selectedCatalogue $selectedCatalogue
Returns:
item()*

i18n:process

i18n:process($nodes as node()*, $selectedLang as xs:string, $pathToCatalogues as xs:string, $defaultLang as xs:string?) as item()*

Continue template processing on the given set of nodes. Call this function from within other template functions to enable recursive processing of templates.

Parameters:
$nodes* the nodes to process
$selectedLang $selectedLang
$pathToCatalogues $pathToCatalogues
$defaultLang? $defaultLang?
Returns:
item()*

i18n:replaceParam

i18n:replaceParam($node as node(), $param as node(), $paramKey as xs:string, $text as xs:string, $selectedCatalogue as node()) as item()*

function replacing the parameter with its (localized) value

Parameters:
$node i18n:translate node enclosing i18n:text and parameters to substitute
$param currently processed i18n:param as node()
$paramKey currently processed parameterKey (numerical or alphabetical)
$text the processed(!) content of i18n:text
$selectedCatalogue $selectedCatalogue
Returns:
item()*

i18n:translate

i18n:translate($node as node(), $text as xs:string, $selectedCatalogue as node()) as item()*

function implementing i18n:translate to enable localization of strings containing alphabetical or numerical parameters

Parameters:
$node i18n:translate node enclosing i18n:text and parameters to substitute
$text the processed(!) content of i18n:text
$selectedCatalogue $selectedCatalogue
Returns:
item()*

i18n:translateAttribute

i18n:translateAttribute($attribute as attribute(), $node as node(), $selectedCatalogue as node()) as item()*

Parameters:
$attribute $attribute
$node $node
$selectedCatalogue $selectedCatalogue
Returns:
item()*

i18n:translateAttributes

i18n:translateAttributes($node as node(), $selectedCatalogue as node()) as item()*

Parameters:
$node $node
$selectedCatalogue $selectedCatalogue
Returns:
item()*