tf:getDocname

Get document name for document element.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

tf:getDocname(documentNode $document) => string

Description

The function tf:getDocname is specific to Tamino. It takes a document node as argument. It returns the document name of the node if present; otherwise it returns the empty sequence. This is a unique identifier since document names are unique in Tamino.

In general, you should apply the function fn:root to a node before passing it the tf:getDocname.

Argument

$document

document node

Examples

for $i in collection("ino:etc")/*
return tf:getDocname(fn:root($i))