TAN-core-expand-functions
tan:build-parent-ref-tree($parent-refs as element()*, $level-to-build as xs:integer, $ref-so-far as xs:string?) as element()*
Input: any elements that are parents of <ref>
s; an integer
Output: the parent refs built into a tree; the integer is used to loop through the tree
This assumes that there is only one<ref>
, with constituent<n>
s and a singletext()
that joins them into a reference
If any<ref>
lacks the requisite number of<n>
s (2nd parameter) it will be ignored
Used by function tan:expand-doc()
, tan:build-parent-ref-tree()
.
Relies upon $separator-hierarchy
, tan:build-parent-ref-tree()
.
Option 1 (TAN-core-expand-functions)
tan:expand-doc($tan-doc as document-node()?) as document-node()*
one-parameter version of the fuller one below
Used by variable $morphologies-expanded
, $self-expanded
.
Used by template ŧ core-expansion-verbose
, ŧ class-1-expansion-verbose-pass-1
.
Used by function tan:expand-doc()
.
Relies upon tan:expand-doc()
.
Option 2 (TAN-core-expand-functions)
tan:expand-doc($tan-doc as document-node()?, $target-phase as xs:string) as document-node()*
two-parameter version of the fuller one below
Used by variable $morphologies-expanded
, $self-expanded
.
Used by template ŧ core-expansion-verbose
, ŧ class-1-expansion-verbose-pass-1
.
Used by function tan:expand-doc()
.
Relies upon tan:expand-doc()
.
Option 3 (TAN-core-expand-functions)
tan:expand-doc($tan-doc as document-node()?, $target-phase as xs:string, $use-validation-mode as xs:boolean)
Input: a resolved TAN document, a string indicating a phase of expansion, a boolean indicating whether the function is intended to serve validation
Output: the document and its dependencies expanded to the phase indicated.
If validation mode is true, then the results will be stripped down to root element and the bare markers for errors, warnings, and fixes. If validation mode is false, then the complete, expanded document and its dependencies will be returned.
Because class 2 files are expanded hand-in-glove with the class 1 files they depend
upon, expansion is necessarily synchronized with its dependent sources. The expanded
form of the original class-2 document is the first document of the result, and the
expanded class-1 or -3 files follow. A TAN-A file expanded verbosely will return as its last
document one TAN-A_merge file per work detected. TAN-A_merge files collate into a single
master reference system all <source>
s of the TAN-A file that are versions of that work.
Used by variable $morphologies-expanded
, $self-expanded
.
Used by template ŧ core-expansion-verbose
, ŧ class-1-expansion-verbose-pass-1
.
Used by function tan:expand-doc()
.
Relies upon $doc-id
, $morphologies-resolved
, $sources-resolved
, $validation-phase-names
, tan:build-parent-ref-tree()
, tan:class-number()
, tan:expand-doc()
, tan:get-and-resolve-dependency()
, tan:tan-type()
, tan:xml-to-string()
, ŧ catalog-expansion-terse
, ŧ class-1-expansion-verbose-pass-1
, ŧ class-1-expansion-verbose-pass-2
, ŧ class-1-expansion-verbose-pass-3
, ŧ class-2-expansion-normal
, ŧ class-2-expansion-terse
, ŧ class-2-expansion-terse-for-validation
, ŧ class-2-expansion-verbose
, ŧ core-expansion-ad-hoc-pre-pass
, ŧ core-expansion-normal
, ŧ core-expansion-terse
, ŧ core-expansion-terse-attributes
, ŧ core-expansion-verbose
, ŧ dependency-adjustments-pass-1
, ŧ dependency-adjustments-pass-2
, ŧ mark-dependencies-pass-1
, ŧ mark-dependencies-pass-2
, ŧ mark-dependencies-pass-2-for-validation
, ŧ remove-first-token
, ŧ reset-hierarchy
, ŧ strip-dependencies-to-markers
, ŧ strip-for-validation
, ŧ tan-a-lm-expansion-terse
.
TAN-core-expand-functions
tan:expand-doc-test($tan-doc as document-node()?, $target-phase as xs:string, $use-validation-mode as xs:boolean) as document-node()*
Input: a TAN document, a string specifying a target phase, and a boolean specifying whether validation should be used
Output: select diagnostic output, testing the sequences of the expansion process
In most cases, the output will be simple or non-existent. The function can be used to tailor specific conditions, to test the accuracy and speed of the expansion process.
No variables, keys, functions, or named templates depend upon this xsl:function.
Does not rely upon global variables, keys, functions, or templates.