Mode templates

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

6 elements: TAN-class-1-functions.xsl 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: regex-ext-tan-functions.xsl

Used by function tan:expand-search() tan:regex()

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

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

To process tan:diff() results

Used by function tan:infuse-divs() tan:analyze-string-length()

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

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

Used by function tan:infuse-divs() tan:analyze-string-length()

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

2 elements: TAN-core-expand-functions.xsl

Used by function tan:expand-doc()

Relies upon tan:error tan:duplicate-items $duplicate-ids .

2 elements: TAN-core-expand-functions.xsl

Look for errors in a document referred to

Used by template ŧ core-expansion-terse ŧ core-expansion-normal ŧ core-expansion-terse

Relies upon $keys-1st-da tan:error tan:class-number $duplicate-head-iris $doc-id $head tan:normalize-text $TAN-keywords tan:dateTime-to-decimal tan:get-doc-hist tan:definition $empty-doc tan:get-1st-doc tan:resolve-doc $see-alsos-resolved $sources-resolved $keys-resolved $inclusions-resolved .

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

Evaluate each alternatively divided edition (ade)

Used by function tan:expand-doc()

Relies upon tan:definition tan:error tan:string-to-numerals tan:analyze-numbers-in-string tan:help $zwj tan:chop-string tan:normalize-div-text tan:analyze-leaf-div-string-length $see-alsos-resolved tan:merge-expanded-docs tan:expand-doc tan:get-1st-doc tan:resolve-doc tan:string-length tan:diff tan:text-join .

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

If there's no specific reference, it's pointing to tokens anywhere in the source

<xsl:param name="dependencies" tunnel="yes"/>

Used by function tan:expand-doc()

Relies upon tan:matches tan:error tan:get-via-q-ref .

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

Used by function tan:expand-doc()

Relies upon tan:error ŧ class-2-expansion-terse-pass-2 tan:get-via-q-ref tan:help tan:matches tan:fix tan:expand-pos-or-chars tan:atomize-string .

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

Used by template ŧ class-2-expansion-terse

Relies upon tan:resolve-idref ŧ element-to-error tan:conditions-hold tan:error tan:escape .

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

Used by function tan:expand-doc()

Relies upon tan:get-1st-doc tan:error .

1 element: TAN-core-functions.xsl

Used by function tan:copy-of-except()

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

13 elements: TAN-A-div-functions.xsl TAN-key-functions.xsl TAN-class-1-functions.xsl TAN-class-2-functions.xsl TAN-core-expand-functions.xsl

Used by function tan:expand-doc()

Relies upon tan:xml-to-string ŧ check-referred-doc tan:error tan:normalize-text $regex-characters-not-permitted tan:copy-of-except tan:duplicate-items tan:get-doc-hist $orig-self tan:get-1st-doc .

31 elements: TAN-A-div-functions.xsl TAN-A-lm-functions.xsl TAN-key-functions.xsl TAN-class-1-functions.xsl TAN-class-2-functions.xsl TAN-class-3-functions.xsl TAN-core-expand-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

streamlined expansion of <div>s; applied to dependencies of class-2 files only when there are no more alter items to process

dependencies must be evaluated at the terse stage

In terse mode, we do only basic checks on <see also>. The deep checks we do for inclusions and keys are reserved for the normal mode.

Used by template ŧ core-expansion-terse dependency-expansion-terse

Used by function tan:expand-doc()

Relies upon tan:error tan:help-extracted tan:group-elements-by-shared-node-values ŧ check-referred-doc ŧ core-expansion-terse ŧ dependency-expansion-terse tan:normalize-text $doc-namespace $primary-agent tan:duplicate-items $official-urn-namespaces $duplicate-head-iris tan:must-refer-to-external-tan-file tan:definition tan:get-1st-doc tan:resolve-doc $see-alsos-resolved $previous-TAN-versions $elements-that-refer-to-textual-items $separator-hierarchy tan:analyze-sequence $empty-element $doc-id $TAN-namespace $TAN-keywords $TAN-elements-that-take-the-attribute-which tan:data-type-check .

2 elements: TAN-core-expand-functions.xsl

Used by function tan:expand-doc()

Relies upon tan:resolve-alias tan:error .

3 elements: TAN-class-1-functions.xsl TAN-core-expand-functions.xsl

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

Relies upon $now tan:help-extracted tan:dateTime-to-decimal tan:error $doc-uri tan:analyze-sequence tan:uri-relative-to $all-ids $duplicate-ids tan:duplicate-items tan:help tan:resolve-idref $head $id-idrefs .

1 element: TAN-core-expand-functions.xsl

Used by function tan:expand-doc()

Relies upon tan:base-uri tan:resolve-doc tan:expand-doc tan:error .

3 elements: TAN-class-1-functions.xsl TAN-core-resolve-functions.xsl

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

Relies upon $attributes-that-take-non-arabic-numerals tan:string-to-numerals .

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

<xsl:param name="class-2-doc" tunnel="yes" as="document-node()?"/>

<xsl:param name="src-id" tunnel="yes"/>

Used by function tan:expand-doc()

Relies upon tan:error tan:tokenize-text tan:duplicate-items tan:shallow-copy $separator-hierarchy tan:expand-pos-or-chars .

3 elements: TAN-class-1-functions.xsl TAN-core-expand-functions.xsl

Used by function tan:expand-doc()

Relies upon tan:error tan:tokenize-text .

8 elements: TAN-class-1-functions.xsl TAN-class-3-functions.xsl TAN-core-expand-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

This template serves to make adjustments declared in the <alter> of a class 2 file upon a dependency class 1 file.

In the course of <alter> adjustments, errors may be detected that should be reported to the dependent class 2 file. In those cases, the specific instruction is copied along with its @q value, and the error is embedded inside. That way when the normalized source file is returned to the class 2 file, the specific error can be matched with the specific instruction in the <alter>.

Used by template ŧ core-expansion-terse dependency-expansion-terse

Used by function tan:expand-doc()

Relies upon tan:error ŧ dependency-expansion-terse-no-alter $doc-id ŧ core-expansion-terse ŧ dependency-expansion-terse tan:resolve-alias tan:help-extracted tan:duplicate-items $empty-element tan:shallow-copy $separator-hierarchy tan:analyze-sequence .

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

streamlined expansion of <div>s; applied to dependencies of class-2 files only when there are no more alter items to process

Used by template ŧ core-expansion-terse dependency-expansion-terse ŧ dependency-expansion-terse

Used by function tan:expand-doc()

Relies upon $empty-element tan:analyze-sequence $separator-hierarchy tan:error .

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

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

Relies upon tan:matches tan:tokenize-text .

4 elements: TAN-core-string-functions.xsl

Used by function tan:collate()

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

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

Used by template ŧ reset-hierarchy

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

1 element: TAN-core-errors.xsl

This template turns any simple element (e.g., <report>, <assert>, <comment>, <change>) into an error report

Used by template ŧ class-2-expansion-terse-pass-2

Relies upon $errors .

6 elements: TAN-A-lm-functions.xsl TAN-core-functions.xsl

Used by function tan:condition-evaluation-loop()

Relies upon tan:escape .

3 elements: TAN-core-expand-functions.xsl TAN-core-resolve-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; (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; (3) the conversion of @href to an absolute URI, resolved against the document's base.

Used by variable $TAN-keywords

Used by template ŧ core-expansion-terse dependency-expansion-terse

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

Relies upon tan:normalize-text tan:error tan:base-uri .

2 elements: TAN-core-resolve-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; (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; (3) the conversion of @href to an absolute URI, resolved against the document's base.

Used by variable $TAN-keywords

Used by function tan:resolve-doc()

Relies upon tan:base-uri .

5 elements: TAN-core-functions.xsl

Used by function tan:xml-to-string()

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

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

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

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

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

Used by function tan:infuse-divs()

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

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

Special feature to itemize leaf divs, to differentiate them in a merge from <div>s of other versions

Used by function tan:merge-divs() tan:merge-expanded-docs()

Relies upon tan:group-elements-by-shared-node-values tan:text-join $separator-hierarchy ŧ strip-duplicate-children-by-attribute-value .

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

Used by function tan:merge-expanded-docs()

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

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

Used by template ŧ only-misfit-divs-and-anchors

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

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

Used by template ŧ core-expansion-terse dependency-expansion-terse

Used by function tan:expand-doc()

Relies upon tan:error .

1 element: TAN-extra-functions.xsl

Used by function tan:normalize-xml-element-space()

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

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

Used by template ŧ reset-hierarchy

Relies upon $separator-hierarchy .

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

Used by template ŧ reset-hierarchy

Relies upon ŧ no-misfit-divs-or-anchors .

3 elements: TAN-core-functions.xsl

Used by function tan:pluck()

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

1 element: TAN-core-resolve-functions.xsl

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

Relies upon $id-idrefs .

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

Used by template ŧ reset-hierarchy

Relies upon $separator-hierarchy .

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

<xsl:param name="test" tunnel="yes" select="false()"/>

Used by function tan:reset-hierarchy() tan:expand-doc()

Relies upon tan:merge-divs ŧ only-misfit-divs ŧ only-misfit-divs-and-anchors ŧ reconstruct-div-hierarchy ŧ divs-excluding-what-qs .

1 element: TAN-core-resolve-functions.xsl

Used by function tan:resolve-doc()

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

1 element: TAN-core-resolve-functions.xsl

Used by variable $TAN-keywords

Used by function tan:get-1st-doc() tan:resolve-doc() tan:resolve-href()

Relies upon tan:base-uri .

1 element: TAN-core-resolve-functions.xsl

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

Relies upon tan:help-extracted tan:glossary tan:error tan:help .

2 elements: TAN-core-string-functions.xsl

Used by function tan:diff()

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

1 element: TAN-core-functions.xsl

Used by function tan:analyze-numbers-in-string()

Relies upon tan:aaa-to-int tan:letter-to-number $n-type-pattern $n-type $separator-hierarchy-minor tan:rom-to-int .

1 element: TAN-core-functions.xsl

Used by function tan:infuse-divs()

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

1 element: TAN-core-functions.xsl

Used by template ŧ merge-divs

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

1 element: TAN-core-resolve-functions.xsl

Used by function tan:strip-duplicates()

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

1 element: TAN-core-functions.xsl

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

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

1 element: TAN-extra-functions.xsl

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

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

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

Used by template ŧ text-join

Used by function tan:text-join()

Relies upon tan:normalize-div-text ŧ text-join .

1 element: TAN-extra-functions.xsl

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

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

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

Used by function tan:tokenize-div()

Relies upon tan:tokenize-text .