Definition: tan:prep-resolved-class-2-doc($self-core-errors-marked)
Used by variable $self-and-sources-prepped
Used by function tan:prep-resolved-tan-a-div-doc
()
Relies upon tan:prep-resolved-class-2-doc
$self-core-errors-marked
.
tan:get-src-1st-da-segmented($self-expanded-3 as document-node()?, $src-1st-da-tokenized as document-node()*) as document-node()*
Input: Any sources for a TAN-A-div, preliminarily prepped (via class 2 operation)
Output: the same sources, selectively segmented
Segmentation here means inserting into only those leaf <div>
s that have been split a new <div type="#seg" ref="[ANCESTRAL @REF
+ ' #' + SEGMENT NUMBER]">
Used by function tan:prep-resolved-tan-a-div-doc
()
Relies upon ŧ segment-tokd-prepped-class-1
.
tan:get-src-1st-da-statted($src-1st-da-tokenized as document-node()*) as document-node()*
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon ŧ count-tokenized-class-1
.
Option 1 (TAN-A-div-functions)
tan:merge-tan-a-div-prepped($tan-a-div-prepped as document-node()?, $tan-a-div-sources-prepped as document-node()*, $prioritize-source-order-over-conciseness as xs:boolean?) as document-node()*
shortened version of the fuller function, below
Used by function tan:merge-tan-a-div-prepped
()
Relies upon tan:merge-tan-a-div-prepped
.
Option 2 (TAN-A-div-functions)
tan:merge-tan-a-div-prepped($tan-a-div-prepped as document-node()?, $tan-a-div-sources-prepped as document-node()*, $prioritize-source-order-over-conciseness as xs:boolean?, $work-filter as xs:string?) as document-node()*
Input: TAN-A-div prepped; its sources, prepped; a boolean indicating whether source order should be prioritized; an optional filter to pick only certain works
Output: the TAN-A-div file, with the following changes: (a) one <work>
per work chosen is placed after <body>
; (b) each <work>
contains a merger of the <div>
s of all sources that contain that work; (c) @ref
in <div>
s in unanchored realignments are moved to @pre-realign-ref
and @ref
takes the @id
value of the realignment; (d) @ref
in <div>
s in anchored realignments are moved to @pre-realign-ref
and @ref
takes the @ref
of the anchor
See tan:merge-source-loop
() for more documentation
Used by function tan:merge-tan-a-div-prepped
()
Relies upon tan:prep-tan-a-div-sources-for-merge
tan:merge-source-loop
tan:copy-of-except
ŧ tan-a-div-merge-pass1
.
tan:prep-resolved-tan-a-div-doc($self-and-sources-prepped-class-2 as document-node()*) as document-node()*
Input: a TAN-A-div document and its sources, as prepared by tan:prep-resolved-class-2-doc
()
Output: the same documents, prepared with TAN-A-div specific considerations
FOCUS ALTERATIONS
======= =============================================================================================
sources Segment sources
self Expand <div-ref>
and <anchor-div-ref>
on @seg
, making in <realign>
a deep copy of the <div>
s and <seg>
s referred to
self Distribute <align>
and <realign>
; signal errors of realignment
self Mark errors
Note, because this function is designed to expedite validation, it does not realign the sources, which must be done through tan:merge-tan-a-div-prepped
()
Used by variable $self-and-sources-prepped
Relies upon $self-and-sources-prepped-prelim
tan:prep-TAN-claims
ŧ TAN-A-div-errors
ŧ prep-tan-a-div-pass-b
ŧ prep-tan-a-div-pass-a
tan:get-src-1st-da-segmented
.
tan:prep-tan-a-div-sources-for-merge($tan-a-div-prepped as document-node()?, $src-1st-da-prepped-or-segmented as document-node()*) as document-node()*
Input: A TAN-A-div file that has reached at least level four of preparation (<realign>
has @id
); the sources of that TAN-A-div file, prepared
Output: The sources, realigned.
The function traverses each source, div by div via a template. If in a given source ($this-src
) in a given div ($this-div
) the ref ($this-ref
) is found in the TAN-A-div's <realign>
(in realign/div-ref/div/@ref
), then if the realignment is anchored then the anchor's @ref
is adopted. In an unanchored realignment, the id of the <realign>
, e.g., #realign1-1, is adopted. Whether a simple or complex realignment, @pre-realign-ref
is added with the old @ref
, and @src
is added (to anticipate merges between sources). Whether simple or complex, a realigned <div>
passes on its new @ref
value to its children, whose @ref
values are revised accordingly.
Used by function tan:merge-tan-a-div-prepped
()
Relies upon ŧ prepare-class-1-doc-for-merge
.
tan:prep-verbosely($TAN-A-div-prepped as document-node()?, $TAN-A-div-sources-prepped as document-node()*) as document-node()*
Input: a TAN-A-div file prepped and its sources, also prepped
Output: the same files, with information marked of relevance to the validation process.
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:get-src-skeleton
ŧ prep-verbosely
.
tan:process-splits($elements-to-process) as element()*
Input: any document fragment with <split/> inserted in leaf elements representing where there should be a deep, top-level split
Output: A sequence of <fragment>
s (the number of <split/>s plus one containing a deep copy of the fragment chosen
Used by function tan:remodel-div-ref
() tan:process-splits
()
Relies upon tan:process-splits
ŧ process-splits
.
tan:remodel-div-ref($div-ref-to-remodel as element(tan:div-ref)?, $model-div-ref as element()?, $allocate-deeply as xs:boolean?) as element()?
Input: (1) a <div-ref>
containing one or more <div>
s of unknown complexity, to be fused into (2) another <div-ref>
or <anchor-div-ref>
containing a <div>
structure to be treated as a structural model of the first; a boolean indicating whether allocation should be shallow (top-level <div>
only) or deep
Output: the deep or shallow element structure of (2), but with the text of each leaf div being replaced by the proportionally appropriate leaf divs (fragmentary or whole) of (1); in that structure, all copies of (2)'s attributes are retained, except for @src
, which is replaced by the value of @src
in (1)
This function is written for proportional realignments
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:analyze-string-length
tan:process-splits
$tokenization-nonspace
ŧ infuse-tokenized-div
ŧ mark-splits-in-fragment
ŧ tokenize-prepped-class-1
.