Retrieve non-XML text content from a non-XML document.
The following construct(s) refer to this construct:
tf:text-content(documentNode $doc) => string?
The content of a persistent pure non-XML text document can be accessed
via its XML view; however, this does not work for a non-XML text document that
has a shadow XML document, because the shadow XML document obstructs the view
of the text content. Also any text content of a transient non-XML text document
is not accessible this way, because the root element is not present for a
transient non-XML document. Use the function
tf:text-content
to retrieve non-XML text
content.
The function returns:
the non-XML text content; if $doc
is a text
non-XML document;
the empty sequence, if $doc
is a binary non-XML
document;.
otherwise, a type error.
$doc |
The document |
---|
tf:text-content(document{"ABC"})
Returns the string "ABC" that was previously constructed as a non-XML text content.