tf:document

Document constructor.

Top of page

Related Syntax Constructs

The following construct(s) refer to this construct:


Syntax

tf:document(item* $content, string? $content-type) => documentNode
tf:document(item* $content, string? $content-type, element? $acl) => documentNode

Description

It is possible to construct a non-XML document node using the document constructor: document {$doc}; in this case, the document type is assigned automatically. If you need to specify the document type and/or an ACL for the document, you should use this function.

Arguments

$content

The content of the document.

$content-type

If non-empty, this argument specifies the content type of the newly-created document.

$acl

If non-empty, this argument specifies the access control list for the document.