TAN-core-resolve-functions
tan:get-and-resolve-dependency($TAN-elements as element()*) as document-node()*
Input: elements for a dependency, e.g.,<source>
,<morphology>
,<vocabulary>
Output: documents, if available, minimally resolved
This function was written principally to expedite the processing of class-2 sources
Used by variable $inclusions-resolved
, $vocabularies-resolved
.
Used by function tan:expand-doc()
, tan:get-and-resolve-dependency()
.
Relies upon $empty-doc
, tan:element-vocabulary()
, tan:get-1st-doc()
, tan:get-and-resolve-dependency()
, tan:resolve-doc()
.
TAN-core-resolve-functions
tan:resolve-alias($aliases as element()*) as element()*
Input: one or more <alias>
es
Output: those elements with children <idref>
, each containing a single value that
the alias stands for
It is assumed that<alias>
es are still embedded in an XML structure that allows one to reference sibling<alias>
es
Note, this function only resolves idrefs, but does not check to see if they target anything
Used by function tan:resolve-doc-loop()
, tan:resolve-alias()
.
Relies upon tan:resolve-alias()
, tan:resolve-alias-loop()
.
TAN-core-resolve-functions
tan:resolve-alias-loop($idrefs-to-process as xs:string*, $alias-ids-already-processed as xs:string*, $other-aliases as element()*, $loop-counter as xs:integer) as element()*
Function associated with the master one, above; returns only<id-ref>
and<error>
children
Used by function tan:resolve-alias()
, tan:resolve-alias-loop()
.
Relies upon tan:error()
, tan:help-extracted()
, tan:resolve-alias-loop()
.
Option 1 (TAN-core-resolve-functions)
tan:resolve-doc($TAN-document as document-node()?) as document-node()?
Used by variable $annotations-resolved
, $see-alsos-resolved
, $predecessors-resolved
, $successors-resolved
, $redivisions-resolved
, $model-resolved
, $self-resolved
, $sources-resolved
, $morphologies-resolved
.
Used by template ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ class-1-expansion-verbose-pass-1
, ŧ core-expansion-verbose
.
Used by function tan:resolve-doc()
, tan:resolve-doc-loop()
, tan:get-and-resolve-dependency()
.
Relies upon tan:resolve-doc()
.
Option 2 (TAN-core-resolve-functions)
tan:resolve-doc($TAN-document as document-node()?, $add-q-ids as xs:boolean, $attributes-to-add-to-root-element as attribute()*) as document-node()?
Input: any TAN document; a boolean indicating whether each element should be
stamped with a unique id in @q
; attributes that should be added to the root element
Output: the TAN document, resolved, as explained in the associated loop function below
Used by variable $annotations-resolved
, $see-alsos-resolved
, $predecessors-resolved
, $successors-resolved
, $redivisions-resolved
, $model-resolved
, $self-resolved
, $sources-resolved
, $morphologies-resolved
.
Used by template ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ class-1-expansion-verbose-pass-1
, ŧ core-expansion-verbose
.
Used by function tan:resolve-doc()
, tan:resolve-doc-loop()
, tan:get-and-resolve-dependency()
.
Relies upon tan:resolve-doc-loop()
.
TAN-core-resolve-functions
tan:resolve-doc-loop($TAN-document as document-node()?, $add-q-ids as xs:boolean, $attributes-to-add-to-root-element as attribute()*, $urls-already-visited as xs:string*, $doc-ids-already-visited as xs:string*, $relationship-to-prev-doc as xs:string?, $element-filters as element()*, $loop-counter as xs:integer) as document-node()?
Input: any TAN document and a variety of other parameters
Output: the document resolved according to specifications
$element-filters
is sequence of elements specifying conditions for whether an element should be fetched, e.g.,: <filter type="vocabulary"><element-name>
item</element-name><element-name>
verb</element-name> <name norm="">vocab name</name> </filter> <filter inclusion="idref"><element-name>
license</element-name><element-name>
div</element-name> </filter>
Used by template ŧ resolve-critical-dependencies-loop
.
Used by function tan:resolve-doc()
, tan:resolve-doc-loop()
.
Relies upon $TAN-namespace
, $TEI-namespace
, $names-of-attributes-that-take-idrefs
, tan:base-uri()
, tan:class-number()
, tan:error()
, tan:normalize-name()
, tan:resolve-alias()
, tan:resolve-doc()
, tan:resolve-doc-loop()
, tan:target-element-names()
, ŧ apply-inclusions-and-adjust-vocabulary
, ŧ first-stamp-shallow-copy
, ŧ first-stamp-shallow-skip
, ŧ resolve-critical-dependencies-loop
, ŧ resolve-numerals
.
Option 1 (TAN-core-resolve-functions)
tan:resolve-href($xml-node as node()?) as node()?
One-parameter version of the full one, below
Used by function tan:resolve-href()
, tan:get-1st-doc()
.
Relies upon tan:resolve-href()
.
Option 2 (TAN-core-resolve-functions)
tan:resolve-href($xml-node as node()?, $add-q-ids as xs:boolean) as node()?
Two-parameter version of the full one, below
Used by function tan:resolve-href()
, tan:get-1st-doc()
.
Relies upon tan:base-uri()
, tan:resolve-href()
.
Option 3 (TAN-core-resolve-functions)
tan:resolve-href($xml-node as node()?, $add-q-ids as xs:boolean, $this-base-uri as xs:string) as node()?
Input: any XML node, a boolean, a string
Output: the same node, but with@href
in itself and all descendant elements resolved to absolute form, with@orig-href
inserted preserving the original if there is a change
The second parameter is provided because this function works closely with
tan:resolve-doc()
.
Used by function tan:resolve-href()
, tan:get-1st-doc()
.
Relies upon ŧ resolve-href
.