Mode templates

Templates based on modes are frequently found across constituent files, so they are collated here separately, one entry per mode.

1 element: TAN-core-functions.xsl

We ignore, but retain, tails throughout

No variables, keys, functions, or named templates depend upon this xsl:template.

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-class-2-functions.xsl

Used by template ŧ add-lm-to-tok

Used by function tan:get-src-1st-da-with-lms()

Relies upon ŧ add-lm-to-tok .

2 elements: TAN-LM-functions.xsl

Used by function tan:add-tok-val()

Does not rely upon global variables, keys, functions, or templates.

4 elements: TAN-A-tok-functions.xsl TAN-class-2-functions.xsl

Used by template ŧ analysis-stamp ŧ analysis-stamp

Used by function tan:get-src-1st-da-analysis-stamped()

Relies upon ŧ analysis-stamp .

2 elements: TAN-class-2-functions.xsl

Used by function tan:analyze-ref()

Does not rely upon global variables, keys, functions, or templates.

5 elements: TAN-class-1-and-2-functions.xsl TAN-class-2-functions.xsl TAN-core-functions.xsl

The companion <xsl:template> to this, treating *[@ref], is in TAN-class-2-functions

<xsl:param name="treat-ambiguous-a-or-i-type-as-roman-numeral" as="xs:boolean?" tunnel="yes"/>

<xsl:param name="warn-on-ambiguous-numerals" as="xs:boolean?" tunnel="yes"/>

For the companion template, treating *[@n], see TAN-class-1-and-2-functions

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc()

Relies upon tan:normalize-text tan:analyze-elements-with-numeral-attributes tan:error $n-type $separator-hierarchy ŧ arabic-numerals .

1 element: TAN-class-1-functions.xsl

Used by template ŧ mark-splits

Used by function tan:compare-copies() tan:mark-splits()

Does not rely upon global variables, keys, functions, or templates.

3 elements: TAN-class-1-and-2-functions.xsl

Used by template ŧ class-1-errors

Used by function tan:remodel-div-ref() tan:div-to-div-transfer() tan:analyze-string-length()

Relies upon tan:string-length tan:text-join .

1 element: TAN-class-1-and-2-functions.xsl

Used by template ŧ class-1-errors

Used by function tan:div-to-div-transfer() tan:analyze-string-length()

Does not rely upon global variables, keys, functions, or templates.

3 elements: TAN-class-2-functions.xsl

Used by template ŧ char-setup

Used by function tan:get-src-1st-da-chars-picked() tan:analyze-tok-chars()

Relies upon tan:chop-string ŧ char-setup .

3 elements: TAN-class-1-errors.xsl TAN-core-errors.xsl

Used by variable $self-class-1-errors-marked

Used by template ŧ class-1-copy-errors

Relies upon tan:error ŧ class-1-copy-errors .

5 elements: TAN-class-1-errors.xsl TAN-core-errors.xsl

Used by variable $self-class-1-errors-marked

Used by template ŧ class-1-errors ŧ class-1-errors ŧ class-1-errors

Relies upon $see-alsos-resolved tan:resolve-doc tan:get-1st-doc tan:prep-resolved-class-1-doc tan:text-join tan:diff tan:has-relationship tan:merge-sources $self-prepped tan:error tan:normalize-text $regex-characters-not-permitted $self-leaf-div-flatref-duplicates ŧ c1-stamp-string-length ŧ c1-stamp-string-pos ŧ class-1-errors .

3 elements: TAN-class-2-errors.xsl

Used by template ŧ class-2-errors ŧ class-2-errors ŧ class-2-errors

Used by function tan:prep-resolved-class-2-doc()

Relies upon tan:group-tok-elements tan:error ŧ class-2-errors .

2 elements: TAN-class-1-functions.xsl

Used by template ŧ mark-splits

Used by function tan:compare-copies() tan:mark-splits()

Relies upon tan:escape tan:normalize-div-text .

2 elements: TAN-LM-functions.xsl

Used by function tan:expand-per-lm() tan:convert-code-to-features()

Relies upon $morphologies-prepped .

2 elements: TAN-core-functions.xsl

Used by template ŧ strip-all-attributes-except ŧ strip-specific-attributes ŧ strip-text

Used by function tan:div-to-div-transfer() tan:copy-of-except() tan:stamp-id()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-core-errors.xsl

Used by variable $self-class-1-errors-marked $self-core-errors-marked

Used by template ŧ class-1-errors ŧ class-1-errors ŧ class-1-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-attribute-errors ŧ referenced-doc-errors

Relies upon tan:dateTime-to-decimal $id-idrefs tan:help-requested $head tan:idrefs tan:error tan:help $doc-uri $duplicate-ids $now ŧ core-attribute-errors .

10 elements: TAN-core-errors.xsl

Used by variable $self-class-1-errors-marked $self-core-errors-marked

Used by template ŧ class-1-errors ŧ class-1-errors ŧ class-1-errors ŧ class-1-copy-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ referenced-doc-errors

Relies upon tan:error $doc-uri tan:class-number $TAN-keywords $doc-id $inclusions-resolved $keys-resolved $sources-resolved $see-alsos-resolved tan:resolve-doc tan:get-1st-doc $empty-doc tan:has-relationship tan:get-doc-hist $root tan:dateTime-to-decimal $keys-1st-da tan:normalize-text $head tan:info tan:idrefs $primary-agent $doc-namespace tan:must-refer-to-external-tan-file $duplicate-iris ŧ core-errors .

2 elements: TAN-A-div-functions.xsl

Used by template ŧ count-tokenized-class-1 ŧ count-tokenized-class-1

Used by function tan:get-src-1st-da-statted()

Relies upon ŧ count-tokenized-class-1 .

3 elements: TAN-core-functions.xsl

Used by function tan:tokenize-leaf-div()

Does not rely upon global variables, keys, functions, or templates.

1 element: TAN-class-2-functions.xsl

Used by function tan:cull-prepped-class-1-data()

Does not rely upon global variables, keys, functions, or templates.

3 elements: diff-for-xslt2.xsl

Used by template ŧ diff-rectify

Used by function tan:diff-loop()

Relies upon ŧ diff-rectify .

3 elements: TAN-A-div-functions.xsl

Used by function tan:merge-tan-a-div-prepped() tan:remodel-div-ref() tan:process-splits()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-LM-functions.xsl

Used by function tan:expand-per-lm() tan:convert-code-to-features()

Relies upon tan:get-lm-ids .

2 elements: TAN-core-functions.xsl

The first-stamp mode ensures that when a document is handed over to a variable,

the original document URI is not lost. It also provides (1) the breadcrumbing service, so that

errors occurring downstream, in an inclusion or TAN-key file can be diagnosed, and (2) the option

for @src to be imprinted on the root element, so that a class 1 TAN file can be tethered to a

class 2 file that uses it as a source.

Used by function tan:resolve-doc()

Relies upon tan:base-uri .

4 elements: TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Relies upon ŧ get-div-hierarchy-fragment .

2 elements: TAN-class-1-functions.xsl

Used by template ŧ mark-splits

Used by function tan:compare-copies() tan:mark-splits()

Relies upon tan:normalize-div-text tan:flatref .

1 element: TAN-core-functions.xsl

Used by variable $TAN-keywords

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc() tan:strip-duplicates()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-class-1-and-2-functions.xsl

Used by template ŧ class-1-errors

Used by function tan:remodel-div-ref() tan:div-to-div-transfer() tan:analyze-string-length()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-class-1-and-2-functions.xsl

Used by template ŧ class-1-errors

Used by function tan:remodel-div-ref() tan:div-to-div-transfer() tan:analyze-string-length()

Does not rely upon global variables, keys, functions, or templates.

4 elements: TAN-A-div-functions.xsl TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment

Relies upon tan:error tan:sequence-expand ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment .

2 elements: TAN-class-1-functions.xsl

Used by template ŧ mark-splits

Used by function tan:compare-copies() tan:mark-splits()

Relies upon ŧ mark-splits .

3 elements: TAN-A-div-functions.xsl

Used by function tan:merge-tan-a-div-prepped() tan:remodel-div-ref() tan:process-splits()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-class-2-functions.xsl

Used by function tan:expand-tok()

Relies upon tan:chop-string tan:sequence-expand tan:sequence-error .

2 elements: TAN-class-1-functions.xsl

Used by function tan:normalize-doc-space()

Does not rely upon global variables, keys, functions, or templates.

1 element: TAN-class-2-functions.xsl

Used by function tan:pick-prepped-class-1-data()

Does not rely upon global variables, keys, functions, or templates.

3 elements: TAN-core-functions.xsl

Used by function tan:pluck()

Does not rely upon global variables, keys, functions, or templates.

5 elements: TAN-class-1-and-2-functions.xsl

Homogenize tei:TEI to tan:TAN-T

Makes sure the tei:body rises rootward one level, as is customary in TAN and HTML

Used by function tan:prep-resolved-class-1-doc()

Relies upon tan:normalize-text $separator-hierarchy tan:help-requested tan:help .

6 elements: TAN-class-2-functions.xsl

This template takes an element that allows @src, supplies it if it doesn't exist, then iterates that element across multiple values of @src; this excludes elements that use @work, i.e., <div-ref>, which are resolved only after works are equated and resolved

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Relies upon tan:normalize-text tan:help-requested tan:help .

6 elements: TAN-class-2-functions.xsl

<xsl:param name="src-docs" as="document-node(()*" tunnel="yes"/>

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Relies upon tan:get-n-types tan:error tan:normalize-text tan:help-requested tan:help ŧ prep-class-2-doc-pass-2 .

3 elements: TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Relies upon tan:normalize-text tan:help-requested tan:convert-ref-to-div-fragment .

2 elements: TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Does not rely upon global variables, keys, functions, or templates.

3 elements: TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Relies upon tan:expand-tok .

3 elements: TAN-class-2-functions.xsl

Used by function tan:get-context-prepped()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-class-2-functions.xsl

Used by function tan:get-context-prepped()

Does not rely upon global variables, keys, functions, or templates.

1 element: TAN-A-div-functions.xsl

Used by template ŧ prep-verbosely prep-srcs-verbosely

Used by function tan:prep-verbosely()

Relies upon ŧ prep-verbosely .

2 elements: TAN-class-2-functions.xsl

Used by template ŧ insert-seg-into-leaf-divs-in-hierarchy-fragment ŧ prep-class-2-doc-pass-2 ŧ get-div-hierarchy-fragment

Used by function tan:prep-resolved-class-2-doc() tan:expand-src-and-div-type-ref() tan:prep-class-2-doc-pass-2() tan:prep-class-2-doc-pass-3() tan:prep-class-2-doc-pass-4()

Does not rely upon global variables, keys, functions, or templates.

7 elements: TAN-A-div-functions.xsl

goal: flag errors in @seg; if it's a <realign>, make a copy of the entire <div>

We make a copy of the referenced <div> only if it is a <realign>, so that we can save work for a later process that adjusts the sources

Used by function tan:prep-resolved-tan-a-div-doc() tan:get-src-1st-da-segmented()

Relies upon tan:help-requested tan:help tan:sequence-expand tan:sequence-error tan:error .

2 elements: TAN-A-div-functions.xsl

Goal: redistribute contents of aligns and realigns

Used by function tan:prep-resolved-tan-a-div-doc() tan:get-src-1st-da-segmented()

Relies upon tan:error tan:value-of .

3 elements: TAN-class-2-and-3-functions.xsl

Used by variable $self-prepped

Used by template ŧ prep-tan-mor ŧ prep-tan-mor ŧ prep-tan-mor

Used by function tan:prep-TAN-claims() tan:prep-TAN-mor()

Relies upon tan:error tan:data-type-check .

5 elements: TAN-key-functions.xsl

Used by variable $self-prepped

Used by template ŧ prep-tan-key ŧ prep-tan-key ŧ prep-tan-key ŧ prep-tan-key ŧ tan-key-errors

Relies upon $TAN-keywords $TAN-namespace tan:error $body ŧ prep-tan-key .

3 elements: TAN-LM-functions.xsl

Used by template ŧ prep-tan-lm

Used by function tan:prep-TAN-LM-doc-prepped()

Relies upon tan:normalize-text tan:help-requested tan:escape tan:error $morphologies-prepped tan:obeyed-by-m ŧ prep-tan-lm .

4 elements: TAN-class-2-and-3-functions.xsl

Used by variable $self-prepped

Used by template ŧ prep-tan-mor ŧ prep-tan-mor ŧ prep-tan-mor

Used by function tan:prep-TAN-claims() tan:prep-TAN-mor()

Relies upon $inclusions-resolved tan:normalize-text tan:error tan:duplicate-values tan:feature-test-to-groups tan:sequence-expand ŧ prep-tan-mor .

4 elements: TAN-A-div-functions.xsl

Used by template ŧ prep-verbosely prep-srcs-verbosely

Used by function tan:prep-verbosely()

Relies upon tan:info $sources-prepped tan:duplicate-values tan:error ŧ prep-verbosely .

7 elements: TAN-class-1-and-2-functions.xsl

This template is long, because it deals with cases where individual <div>s have been realigned by a TAN-A-div file. <div>s that must be realigned are best done so in this method, since one cannot predict where in a hierarchy an anchor and anchoree are to be found

Used by function tan:prep-tan-a-div-sources-for-merge() tan:merge-sources()

Does not rely upon global variables, keys, functions, or templates.

1 element: TAN-core-functions.xsl

Used by function tan:prepend-id-or-idrefs()

Relies upon $id-idrefs .

3 elements: TAN-A-div-functions.xsl

Used by function tan:merge-tan-a-div-prepped() tan:remodel-div-ref() tan:process-splits()

Does not rely upon global variables, keys, functions, or templates.

1 element: TAN-A-div-functions.xsl

Used by function tan:prep-resolved-tan-a-div-doc() tan:get-src-1st-da-segmented()

Does not rely upon global variables, keys, functions, or templates.

3 elements: TAN-core-errors.xsl

Used by variable $self-class-1-errors-marked $self-core-errors-marked

Used by template ŧ class-1-errors ŧ class-1-errors ŧ class-1-errors ŧ class-1-copy-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ core-errors ŧ referenced-doc-errors

Relies upon $errors ŧ referenced-doc-errors .

2 elements: TAN-core-functions.xsl

Used by variable $TAN-keywords

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc() tan:strip-duplicates()

Relies upon tan:normalize-text tan:prepend-id-or-idrefs tan:error .

2 elements: TAN-core-functions.xsl

Used by variable $TAN-keywords

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc() tan:strip-duplicates()

Relies upon tan:base-uri .

2 elements: TAN-core-functions.xsl

Used by variable $TAN-keywords

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc() tan:strip-duplicates()

Relies upon tan:normalize-text $help-trigger-regex tan:get-attr-which-definition tan:error tan:help .

2 elements: TAN-A-div-functions.xsl

Used by function tan:prep-resolved-tan-a-div-doc() tan:get-src-1st-da-segmented()

Relies upon tan:duplicate-values tan:error .

1 element: TAN-A-div-functions.xsl

No variables, keys, functions, or named templates depend upon this xsl:template.

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-core-functions.xsl

Used by template ŧ strip-all-attributes-except ŧ strip-specific-attributes ŧ strip-text

Used by function tan:div-to-div-transfer() tan:copy-of-except() tan:stamp-id()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-core-functions.xsl

Used by template ŧ strip-all-attributes-except ŧ strip-specific-attributes ŧ strip-text

Used by function tan:div-to-div-transfer() tan:copy-of-except() tan:stamp-id()

Relies upon ŧ strip-all-attributes-except .

2 elements: TAN-core-functions.xsl

Used by variable $TAN-keywords

Used by template ŧ arabic-numerals ŧ arabic-numerals

Used by function tan:resolve-doc() tan:strip-duplicates()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-core-functions.xsl

Used by template ŧ strip-all-attributes-except ŧ strip-specific-attributes ŧ strip-text

Used by function tan:div-to-div-transfer() tan:copy-of-except() tan:stamp-id()

Relies upon ŧ strip-specific-attributes .

2 elements: TAN-core-functions.xsl

Used by template ŧ strip-all-attributes-except ŧ strip-specific-attributes ŧ strip-text

Used by function tan:div-to-div-transfer() tan:copy-of-except() tan:stamp-id()

Relies upon ŧ strip-text .

3 elements: TAN-class-1-and-2-functions.xsl

Used by template ŧ synthesize-merged-sources

Used by function tan:merge-source-loop()

Relies upon tan:synthesize-merged-group ŧ synthesize-merged-sources .

4 elements: TAN-A-div-errors.xsl

Used by template ŧ TAN-A-div-errors

Used by function tan:prep-resolved-tan-a-div-doc()

Relies upon tan:group-tok-elements tan:duplicate-values tan:error ŧ TAN-A-div-errors .

4 elements: TAN-A-div-functions.xsl

We assume that the user of the resultant file wants little or no recourse to the original source files, so we add select metadata

Used by function tan:merge-tan-a-div-prepped() tan:remodel-div-ref() tan:process-splits()

Does not rely upon global variables, keys, functions, or templates.

2 elements: TAN-key-functions.xsl

Used by variable $self-prepped

Used by template ŧ prep-tan-key ŧ prep-tan-key ŧ prep-tan-key ŧ prep-tan-key ŧ tan-key-errors

Relies upon tan:normalize-text $TAN-elements-that-take-the-attribute-which tan:error ŧ tan-key-errors .

2 elements: TAN-class-2-functions.xsl

tan:ver is part of the calculus, because of TAN-A-div merges, which require the introduction of <ver> at the leafmost parts of a document

Used by function tan:remodel-div-ref() tan:get-src-1st-da-tokenized() tan:tokenize-div()

Relies upon tan:copy-of-except tan:text-join tan:tokenize-leaf-div .

3 elements: TAN-class-2-functions.xsl

Used by template ŧ unconsolidate-anas

Used by function tan:unconsolidate-tan-lm()

Relies upon tan:normalize-refs tan:sequence-expand ŧ unconsolidate-anas .