fonto:curated-text-in-range

Type: Function

This function will return the curated text from a given range. Any text content under detached and removed nodes will be ignored. Newline characters will be inserted in places where a boundary from inline context to a block context is crossed. Newline characters will also be inserted for break elements.

This function will also resolve inclusions to get the curated-text of their target. If the document of the inclusion target is loading or is unloaded, then this function will return '…' for that inclusion. If the document of the inclusion target is in an error state, then this function will return '�' for that inclusion.

This function will return an empty sequence when the given range is invalid.

Note: Make sure to import this function's namespace before calling this function. Refer to the example below on how to do this.

XQuery

import module namespace fonto = "http://www.fontoxml.com/functions";
fonto:curated-text-in-range($startContainer, $startOffset, $endContainer, $endOffset)

Refer to the example on the XPath/XQuery Fonto specific examples page for a more detailed example on how to use this function.

Arguments

  1. $startContainer

    (Required)

    Type: Node

    The start node of the given range.

  2. $startOffset

    (Required)

    Type: Number

    The start offset of the given range.

  3. $endContainer

    (Required)

    Type: Node

    The end node of the given range.

  4. $endOffset

    (Required)

    Type: Number

    The end offset of the given range.

Returns

Type: String

A string containing the curated text.