TAN-core-resolve global variables, keys, and functions summarized

tan:prepend-id-or-idrefs($elements-with-id-or-id-refs as element(), $string-to-prepend as xs:string?) as element()*

Input: any elements with @xml:id or an attribute that points to an element with an @xml:id value; some string that should be prepended to every value of every attribute found

Output: the same elements, but with each value prepended with the string and a double hyphen

This function is critical for disambiguating during the inclusion process.

Used by template ŧ resolve-attr-include

Relies upon ŧ prepend-id-or-idrefs .

Option 1 (TAN-core-resolve-functions)

tan:resolve-doc($TAN-documents as document-node()*) as document-node()*

one-parameter version of the fuller one, below

Used by variable $self-resolved $inclusions-resolved $keys-resolved $sources-resolved $see-alsos-resolved $morphologies-resolved

Used by template ŧ class-1-expansion-verbose ŧ check-referred-doc ŧ core-expansion-terse ŧ core-expansion-verbose

Used by function tan:expand-doc() tan:resolve-doc() tan:resolve-doc()

Relies upon tan:resolve-doc .

Option 2 (TAN-core-resolve-functions)

tan:resolve-doc($TAN-documents as document-node()*, $leave-breadcrumbs as xs:boolean, $add-attr-to-root-element-named-what as xs:string?, $add-what-val-to-new-root-attribute as xs:string*, $restrict-inclusion-to-what-element-names as xs:string*, $doc-ids-already-checked as xs:string*) as document-node()*

Input: any number of TAN documents; boolean indicating whether documents should be breadcrumbed or not; optional name of an attribute and a sequence of strings to stamp in each document's root element as a way of providing another identifier for the document; a list of element names to which any inclusion should be restricted; a list of ids for documents that should not be used to generate inclusions.

Output: those same documents, resolved, along the following steps:

a. Stamp each document with @base-uri and the optional root attribute; resolve @href, putting the original (if different) in @orig-href

b. Normalize @ref and @n, converting them whenever possible to Arabic numerals, and keeping the old versions as @orig-ref and @orig-n; if @n is a range or series, it will be expanded

c. Resolve every element that has @include.

d. Resolve every element that has @which.

e. If anything happened at #3, remove any duplicate elements.

This function and the functions connected with it are among the most important in the TAN library, since they provide critical stamping (for validation and diagnosing problems) and expand abbreviated parts (to explicitly state what is implied by @include and @which) of a TAN file. Perhaps more importantly, it is a recursive function that is used to resolve not only the beginning of the inclusion process but its middle and endpoints as well.

Used by variable $self-resolved $inclusions-resolved $keys-resolved $sources-resolved $see-alsos-resolved $morphologies-resolved

Used by template ŧ class-1-expansion-verbose ŧ check-referred-doc ŧ core-expansion-terse ŧ core-expansion-verbose

Used by function tan:expand-doc() tan:resolve-doc() tan:resolve-doc()

Relies upon tan:strip-duplicates ŧ resolve-keyword tan:normalize-text ŧ expand-tan-key-dependencies ŧ resolve-attr-include ŧ core-resolution-arabic-numerals ŧ first-stamp tan:get-1st-doc tan:resolve-doc tan:error .