Chapter 11. TAN variables, keys, functions, and templates

Table of Contents

TAN-core global variables, keys, and functions summarized
variables
keys
functions
TAN-core-errors global variables, keys, and functions summarized
variables
functions
TAN-core-resolve global variables, keys, and functions summarized
functions
TAN-core-expand global variables, keys, and functions summarized
functions
TAN-core-string global variables, keys, and functions summarized
variables
functions
TAN-class-1 global variables, keys, and functions summarized
variables
keys
functions
TAN-class-2 global variables, keys, and functions summarized
variables
keys
TAN-A-div global variables, keys, and functions summarized
functions
TAN-A-lm global variables, keys, and functions summarized
variables
TAN-class-3 global variables, keys, and functions summarized
functions
TAN-extra global variables, keys, and functions summarized
variables
functions
TAN-function global variables, keys, and functions summarized
variables
functions
regex-ext-tan global variables, keys, and functions summarized
variables
functions
templates
TAN-schema global variables, keys, and functions summarized
variables
functions
Mode templates
ŧ #all
ŧ add-square-brackets
ŧ analyze-string-length-pass-1
ŧ analyze-string-length-pass-2
ŧ catalog-expansion-terse
ŧ check-referred-doc
ŧ class-1-expansion-verbose
ŧ class-2-expansion-normal
ŧ class-2-expansion-terse
ŧ class-2-expansion-terse-pass-2
ŧ class-2-expansion-verbose
ŧ copy-of-except
ŧ core-expansion-normal
ŧ core-expansion-terse
ŧ core-expansion-terse-alias
ŧ core-expansion-terse-attributes
ŧ core-expansion-verbose
ŧ core-resolution-arabic-numerals
ŧ dependencies-tokenized-selectively
ŧ dependency-expansion-normal
ŧ dependency-expansion-terse
ŧ dependency-expansion-terse-no-alter
ŧ dependency-expansion-verbose
ŧ diff-to-collation
ŧ divs-excluding-what-qs
ŧ element-to-error
ŧ evaluate-conditions
ŧ expand-tan-key-dependencies
ŧ first-stamp
ŧ fragment-to-text
ŧ infuse-tokenized-div
ŧ infuse-tokenized-text
ŧ merge-divs
ŧ merge-expanded-docs-prep
ŧ no-misfit-divs-or-anchors
ŧ normalize-tei-space
ŧ normalize-xml-fragment-space
ŧ only-misfit-divs
ŧ only-misfit-divs-and-anchors
ŧ pluck
ŧ prepend-id-or-idrefs
ŧ reconstruct-div-hierarchy
ŧ reset-hierarchy
ŧ resolve-attr-include
ŧ resolve-href
ŧ resolve-keyword
ŧ snap-to-word-pass-1
ŧ string-to-numerals
ŧ strip-all-attributes-except
ŧ strip-duplicate-children-by-attribute-value
ŧ strip-duplicates
ŧ strip-specific-attributes
ŧ strip-text
ŧ text-join
ŧ text-only
ŧ tokenize-div

The 87 global variables, 5 keys, 121 functions, and 57 templates (Ŧ = named template; ŧ = template mode) defined in the TAN function library, are the following (ʞ = key):

ŧ #all

tan:aaa-to-int() ŧ add-square-brackets $all-functions $all-head-iris $all-ids $all-keywords $alphabet-numeral-key tan:analyze-leaf-div-string-length() tan:analyze-leaf-div-text-length-loop() tan:analyze-numbers-in-string() tan:analyze-ref-loop() tan:analyze-sequence() tan:analyze-stats() tan:analyze-string-length() ŧ analyze-string-length-pass-1 ŧ analyze-string-length-pass-2 $apos tan:ara-to-int() $arabic-indic-numeral-pattern tan:atomize-string() $attributes-that-take-non-arabic-numerals

tan:base-uri() tan:batch-replace() tan:blob-to-regex() $body

ŧ catalog-expansion-terse tan:cfn() $char-reg-exp ŧ check-referred-doc tan:chop-string() ŧ class-1-expansion-verbose ŧ class-2-expansion-normal ŧ class-2-expansion-terse ŧ class-2-expansion-terse-pass-2 ŧ class-2-expansion-verbose tan:class-number() tan:codepoints-to-string() tan:collate() tan:collate-loop-inner() tan:collate-loop-outer() tan:condition-evaluation-loop() tan:conditions-hold() tan:copy-of() tan:copy-of-except() ŧ copy-of-except ŧ core-expansion-normal ŧ core-expansion-terse ŧ core-expansion-terse-alias ŧ core-expansion-terse-attributes ŧ core-expansion-verbose ŧ core-resolution-arabic-numerals tan:counts-to-firsts() tan:counts-to-lasts()

tan:data-type-check() tan:dateTime-to-decimal() tan:dec-to-hex() tan:definition() ŧ dependencies-tokenized-selectively ŧ dependency-expansion-normal ŧ dependency-expansion-terse ŧ dependency-expansion-terse-no-alter ŧ dependency-expansion-verbose $dhy tan:diff() tan:diff-loop() ŧ diff-to-collation tan:distinct-items() tan:div-to-div-transfer() ʞ div-via-orig-ref') ʞ div-via-ref') ŧ divs-excluding-what-qs $doc-class $doc-id $doc-namespace $doc-parent-directory $doc-type $doc-uri $duplicate-head-iris $duplicate-ids tan:duplicate-items()

ŧ element-to-error $elements-that-must-always-refer-to-tan-files $elements-that-refer-to-textual-items $empty-doc $empty-element $erroneously-looped-doc tan:error() tan:error-report() $errors tan:errors-checked-where() $errors-to-squelch tan:escape() tan:evaluate() ŧ evaluate-conditions tan:expand-doc() tan:expand-numerical-sequence() tan:expand-pos-or-chars() tan:expand-search() ŧ expand-tan-key-dependencies

tan:feature-test-to-groups() tan:first-loc-available() ŧ first-stamp tan:fix() ŧ fragment-to-text

tan:get-1st-doc() tan:get-doc-hist() tan:get-parent-elements() tan:get-ucd-decomp() tan:get-via-q-ref() tan:glossary() tan:grc-to-int() $greek-letter-numeral-pattern tan:group-adjacent-elements() tan:group-elements() tan:group-elements-by-shared-node-values() tan:group-elements-by-shared-node-values-loop()

$head tan:help() tan:help-extracted() tan:help-or-info() $help-trigger-regex $hex-key tan:hex-to-dec()

$id-idrefs $inclusions-1st-da $inclusions-resolved tan:info() tan:infuse-divs() ŧ infuse-tokenized-div ŧ infuse-tokenized-text ʞ item-via-node-name')

$keys-1st-da $keys-expanded $keys-resolved

$latin-letter-numeral-pattern tan:letter-to-number()

tan:matches() tan:median() tan:merge-analyzed-stats() tan:merge-divs() ŧ merge-divs tan:merge-expanded-docs() ŧ merge-expanded-docs-prep $morphologies-1st-da $morphologies-expanded $morphologies-resolved tan:most-common-item() tan:most-recent-dateTime() tan:must-refer-to-external-tan-file()

$n-type $n-type-label $n-type-pattern tan:namespace() $namespaces-and-prefixes ŧ no-misfit-divs-or-anchors tan:no-outliers() $nonlatin-letter-numeral-pattern tan:normalize-div-text() tan:normalize-sequence() ŧ normalize-tei-space tan:normalize-text() tan:normalize-xml-element-space() ŧ normalize-xml-fragment-space $now tan:number-sort()

$official-urn-namespaces ŧ only-misfit-divs ŧ only-misfit-divs-and-anchors tan:ordinal() $orig-self tan:outliers()

tan:pluck() ŧ pluck tan:possible-bibliography-id() ŧ prep-regex-char-class tan:prepend-id-or-idrefs() ŧ prepend-id-or-idrefs $previous-TAN-versions $primary-agent tan:process-regex-escape-u() tan:product() tan:product-loop()

ʞ q-ref') tan:q-ref() $quot

ŧ reconstruct-div-hierarchy tan:regex() $regex-characters-not-permitted $regex-escaping-characters $relationship-keywords-for-tan-files tan:replace() tan:reset-hierarchy() ŧ reset-hierarchy tan:resolve-alias() tan:resolve-alias-loop() ŧ resolve-attr-include tan:resolve-doc() tan:resolve-href() ŧ resolve-href tan:resolve-idref() tan:resolve-keyword() ŧ resolve-keyword $rng-collection $rng-collection-without-TEI tan:rom-to-int() $roman-numeral-pattern

$schema-collection $see-alsos-1st-da $see-alsos-resolved $self-expanded $self-resolved $separator-hierarchy $separator-hierarchy-minor $separator-major tan:sequence-collapse() tan:sequence-error() tan:shallow-copy() ŧ snap-to-word-pass-1 $source-ids $sources-1st-da $sources-must-be-altered $sources-resolved $special-end-div-chars $special-end-div-chars-regex $src-ids $stated-validation-phase tan:string-base() tan:string-composite() tan:string-length() tan:string-to-int() tan:string-to-numerals() ŧ string-to-numerals ŧ strip-all-attributes-except ŧ strip-duplicate-children-by-attribute-value tan:strip-duplicates() ŧ strip-duplicates ŧ strip-specific-attributes ŧ strip-text tan:syr-to-int() $syriac-letter-numeral-pattern

$tag-urn-regex-pattern $tan-classes tan:tan-type() tan:text-join() ŧ text-join ŧ text-only ʞ tok-via-ref') $token-definition-default $token-definitions-reserved $tokenization-nonspace tan:tokenize() tan:tokenize-div() ŧ tokenize-div tan:tokenize-text() tan:true()

$TAN-elements-that-take-the-attribute-which $TAN-keyword-files $TAN-keywords $TAN-namespace $TAN-version

tan:uri-directory() tan:uri-relative-to()

$validation-phase-names tan:value-of() tan:variables-checked-where()

tan:xml-to-string() $xpath-pattern

tan:zip-uris() $zwj

The contents of this chapter have been generated automatically. Although much effort has been spent to ensure accurate representation of the schemas and function library, you may find errors or inconsistencies. In such cases, the functions and schemas (particularly the RELAX-NG, compact syntax) are to be given priority.

Definition: $head//tan:IRI[not(ancestor::tan:error)]

Used by variable $duplicate-head-iris

Relies upon $head .

Definition: ($head//(@xml:id, @id), /tei:TEI//descendant-or-self::tei:*/@xml:id)

Used by variable $duplicate-ids

Used by template ŧ core-expansion-terse-attributes

Relies upon $head .

Definition: ($keys-expanded, $TAN-keywords)

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

Relies upon $keys-expanded $TAN-keywords .

Definition: "'"

Used by function tan:errors-checked-where() tan:variables-checked-where()

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

Definition: $self-resolved/*/(tan:body, tei:text/tei:body)

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

Relies upon $self-resolved .

Definition: '­'

Used by variable $special-end-div-chars

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

Definition: tan:class-number($self-resolved)

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

Relies upon tan:class-number $self-resolved .

Definition: /*/@id

Used by variable $doc-namespace

Used by template ŧ core-expansion-terse dependency-expansion-terse ŧ check-referred-doc

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

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

Definition: tan:uri-directory($doc-uri)

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

Relies upon tan:uri-directory $doc-uri .

Definition: name(/*)

Used by variable $morphologies-1st-da $morphologies-resolved

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

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

Definition: base-uri(/*)

Used by variable $doc-parent-directory

Used by template ŧ core-expansion-terse-attributes

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

This variable has a complex definition. See stylesheet for definiton.

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

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

Definition: tan:get-1st-doc(/*/tan:head/tan:inclusion)

Used by variable $inclusions-resolved

Relies upon tan:get-1st-doc .

Definition: tan:resolve-doc($inclusions-1st-da, false(), 'incl', /*/tan:head/tan:inclusion/@xml:id, (), ())

Used by template ŧ check-referred-doc

Relies upon tan:resolve-doc $inclusions-1st-da .

Definition: tan:get-1st-doc($head/tan:key)

Used by variable $keys-resolved

Used by template ŧ check-referred-doc

Used by function tan:glossary()

Relies upon tan:get-1st-doc $head .

Definition: if ($doc-type = 'TAN-A-lm') then tan:get-1st-doc($head/tan:definitions/tan:morphology) else ()

Used by variable $morphologies-resolved

Relies upon $doc-type tan:get-1st-doc $head .

Definition: if ($doc-type = 'TAN-A-lm') then tan:resolve-doc($morphologies-1st-da, false(), 'morphology', $head/tan:definitions/tan:morphology/@xml:id, (), ()) else ()

Used by variable $morphologies-expanded

Used by function tan:expand-doc()

Relies upon $doc-type tan:resolve-doc $morphologies-1st-da $head .

Definition: /

Used by template ŧ core-expansion-normal

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

Definition: ('1 dev')

Used by template ŧ core-expansion-terse

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

Definition: ($head/tan:definitions/(tan:person, tan:organization, tan:algorithm)[tan:IRI[matches(., concat('^tag:', $doc-namespace))]])[1]

Used by template ŧ core-expansion-terse

Relies upon $head $doc-namespace .

Definition: '"'

Used by function tan:errors-checked-where() tan:variables-checked-where()

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

Definition: '[  - ]'

Used by template ŧ core-expansion-normal

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

Definition: tan:expand-doc($self-resolved)

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

Relies upon tan:expand-doc $self-resolved .

Definition: '#'

Used by template ŧ string-to-numerals

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

Definition: if (exists($head/tan:source/@xml:id)) then $head/tan:source/@xml:id else for $i in (1 to count($head/tan:source)) return string($i)

Used by variable $sources-resolved

Relies upon $head .

Definition: exists($head/tan:alter/(tan:equate, tan:rename, tan:reassign, tan:skip))

Used by variable $sources-resolved

Used by function tan:expand-doc()

Relies upon $head .

Definition: 'tag:textalign.net,2015'

Used by template ŧ core-expansion-terse

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

Definition: '‍'

Used by variable $special-end-div-chars

Used by template ŧ class-1-expansion-verbose

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

Looks for elements matching tan:item

Used by template ŧ core-expansion-terse

Used by function tan:glossary()

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

Looks for elements matching *

Used by function tan:get-via-q-ref()

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

Option 1 (TAN-core-functions)

tan:analyze-sequence($sequence-string as xs:string, $name-of-attribute as xs:string?) as element()

two-parameter version of the fuller function below

Used by template ŧ core-expansion-terse dependency-expansion-terse-no-alter ŧ dependency-expansion-terse ŧ core-expansion-terse-attributes

Used by function tan:analyze-sequence()

Relies upon tan:analyze-sequence .

Option 2 (TAN-core-functions)

tan:analyze-sequence($sequence-string as xs:string, $name-of-attribute as xs:string?, $expand-ranges as xs:boolean) as element()

Input: any value of a sequence; a string of the name of the attribute for the sequence (default 'ref'); a boolean indicating whether ranges should be expanded

Output: <analysis> with children elements that have the name of the second parameter (with @attr and an empty value inserted); those children are grouped by <range> if items are detected to be part of a range.

If a request for help is detected, the flag will be removed and @help will be inserted at the appropriate place.

If ranges are requested to be expanded, it is expected to apply only to integers, and will not operate on values of 'max' or 'last'

This function normalizes strings ahead of time; no need to run that function beforehand

Used by template ŧ core-expansion-terse dependency-expansion-terse-no-alter ŧ dependency-expansion-terse ŧ core-expansion-terse-attributes

Used by function tan:analyze-sequence()

Relies upon tan:expand-numerical-sequence tan:error tan:normalize-sequence $separator-hierarchy tan:sequence-error tan:help-extracted tan:analyze-ref-loop .

Option 1 (TAN-core-functions)

tan:conditions-hold($element-with-condition-attributes as element()?, $context-to-evaluate-against as item()*) as xs:boolean?

2-param version of the master one, below

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

Used by function tan:conditions-hold()

Relies upon tan:conditions-hold .

Option 2 (TAN-core-functions)

tan:conditions-hold($element-with-condition-attributes as element()?, $context-to-evaluate-against as item()*, $test-sequence as xs:string*) as xs:boolean*

Input: a TAN element with attributes that should be checked for their truth value; a context against which the check the values

Output: the input elements, with the relevant attributes replaced by a value indicating whether the condition holds

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

Used by function tan:conditions-hold()

Relies upon tan:condition-evaluation-loop .

Option 1 (TAN-core-functions)

tan:copy-of-except($doc-fragment as item()*, $exclude-elements-named as xs:string*, $exclude-attributes-named as xs:string*, $exclude-elements-with-attributes-named as xs:string*) as item()*

short version of the full function, below

Used by template ŧ core-expansion-normal

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

Relies upon tan:copy-of-except .

Option 2 (TAN-core-functions)

tan:copy-of-except($doc-fragment as item()*, $exclude-elements-named as xs:string*, $exclude-attributes-named as xs:string*, $exclude-elements-with-attributes-named as xs:string*, $exclude-elements-beyond-what-depth as xs:integer?, $shallow-skip-elements-named as xs:string*) as item()*

Input: any document fragment; sequences of strings specifying names of elements to exclude, names of attributes to exclude, and names of attributes whose parent elements should be excluded; an integer beyond which depth copies should not be made

Output: the same fragment, altered

This function was written primarily to service the merge of TAN-A-div sources, where realigned divs could be extracted from their source documents

Used by template ŧ core-expansion-normal

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

Relies upon ŧ copy-of-except .

tan:expand-numerical-sequence($selector as xs:string?, $max as xs:integer?) as xs:integer*

Input: a string representing a TAN selector (used by @pos, @char), and an integer defining the value of 'last'

Output: a sequence of numbers representing the positions selected, unsorted, and retaining duplicate values.

Example: ("2 - 4, last-5 - last, 36", 50) -> (2, 3, 4, 45, 46, 47, 48, 49, 50, 36)

Errors will be flagged as follows:

0 = value that falls below 1

-1 = value that surpasses the value of $max

-2 = ranges that call for negative steps, e.g., '4 - 2'

Used by function tan:analyze-sequence()

Relies upon tan:normalize-sequence .

tan:get-doc-hist($TAN-doc as document-node()*) as element()*

Input: any TAN document

Output: a sequence of elements with @when, @ed-when, and @when-accessed, sorted from most recent to least; each element includes @when-sort, a decimal that represents the value of the most recent time-date stamp in that element

Used by template ŧ check-referred-doc ŧ core-expansion-normal

Relies upon tan:dateTime-to-decimal .

Option 1 (TAN-core-functions)

tan:glossary($element-that-takes-attribute-which as item()) as element()*

one-parameter version of the master one, below

Used by variable $relationship-keywords-for-tan-files

Used by template ŧ resolve-keyword

Used by function tan:glossary()

Relies upon tan:glossary $keys-1st-da .

Option 2 (TAN-core-functions)

tan:glossary($element-that-takes-attribute-which as item(), $extra-TAN-keys-expanded as document-node()*, $group-name-alter as xs:string?) as element()*

Input: any element that has @which (or a string value of the name of an element that takes @which); any TAN-key documents (expanded) other than the standard TAN ones; and an optional name that restricts the search to a particular group

Output: the keyword <items> (most of which contain <IRI>, <name>, and <desc>) that are valid definitions for the element in question, filtered by matches on @which, if present in the first parameter

Used by variable $relationship-keywords-for-tan-files

Used by template ŧ resolve-keyword

Used by function tan:glossary()

Relies upon $TAN-keywords .

Option 1 (TAN-core-functions)

tan:group-elements-by-shared-node-values($elements-to-group as element()*) as element()*

One-parameter version of the fuller one below.

Used by template ŧ core-expansion-terse ŧ merge-divs ŧ merge-divs

Used by function tan:group-elements-by-shared-node-values()

Relies upon tan:group-elements-by-shared-node-values .

Option 2 (TAN-core-functions)

tan:group-elements-by-shared-node-values($elements-to-group as element()*, $regex-of-names-of-nodes-to-group-by as xs:string?) as element()*

Input: a sequence of elements; an optional string representing the name of children in the elements

Output: the same elements, but grouped in <group> according to whether the text contents of the child elements specified are equal

Each <group> will have an @n stipulating the position of the first element put in the group. That way the results can be sorted in order of their original elements

Transitivity is assumed. If suppose elements X, Y, and Z have children values A and B; B and C; and C and D, respectively. All three elements will be grouped, even though Y and Z do not share children values directly.

Used by template ŧ core-expansion-terse ŧ merge-divs ŧ merge-divs

Used by function tan:group-elements-by-shared-node-values()

Relies upon tan:group-elements-by-shared-node-values-loop .

tan:merge-expanded-docs($expanded-docs as document-node()*) as document-node()?

Input: Any TAN documents that have been expanded at least tersely

Output: A document that is a collation of the documents. There is one <head> per source, but only one <body>, with contents merged.

Class 1 merging: All <div>s with the same <ref> values are grouped together. If the class 1 files are sources of a class 2 file, it is assumed that all actions in the <alter> have been performed.

Class 2 merging: TBD

Class 3 merging: TBD

NB: Class 1 files should have their hierarchies in proper order; use reset-hierarchy beforehand if you're unsure

Used by template ŧ class-1-expansion-verbose

Relies upon tan:tan-type ŧ merge-expanded-docs-prep ŧ merge-divs .

tan:normalize-sequence($sequence-string as xs:string?, $attribute-name as xs:string) as xs:string?

Input: any string representing a sequence; the name of the attribute whence the value, i.e., @ref, @pos, @chars, @n

Output: the string, normalized such that items may be found by tokenizing on ' , ' and parts of ranges on ' - '

Note, this function does nothing to analyze or convert types of numerals, and all help requests are left intact

Here we're targeting tan:analyze-elements-with-numeral-attributes() template mode arabic-numerals, prelude to tan:sequence-expand(), tan:normalize-refs()

Used by function tan:analyze-sequence() tan:expand-numerical-sequence()

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

tan:q-ref($elements as element()*) as xs:string*

Input: any elements

Output: the q-ref of each element

A q-ref is defined as a concatenated string consisting of, for each ancestor and self, the name plus the number indicating which sibling it is of that type of element.

This function is useful when trying to correlate an unbreadmarked file (an original TAN file) against its breadcrumbed counterpart (e.g., $self-resolved), to check for errors. If any changes in element names, e.g., TEI - > TAN-T, are made during the standard preparation process, those changes are made here as well.

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

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

Option 1 (TAN-core-functions)

tan:sequence-error($results-of-sequence-expand as xs:integer*) as element()*

Used by function tan:analyze-sequence() tan:sequence-error()

Relies upon tan:sequence-error .

Option 2 (TAN-core-functions)

tan:sequence-error($results-of-sequence-expand as xs:integer*, $message as xs:string?) as element()*

Input: any results of the function tan:sequence-expand()

Output: error nodes, if any

Used by function tan:analyze-sequence() tan:sequence-error()

Relies upon tan:error .

Option 1 (TAN-core-functions)

tan:shallow-copy($elements as element()*) as element()*

one-parameter version of the fuller one, below

Used by template ŧ dependency-expansion-terse ŧ dependencies-tokenized-selectively

Used by function tan:shallow-copy() tan:error()

Relies upon tan:shallow-copy .

Option 2 (TAN-core-functions)

tan:shallow-copy($elements as element()*, $keep-attributes as xs:boolean) as element()*

Input: any document fragment; boolean indicating whether attributes should be kept

Output: a shallow copy of the fragment, perhaps with attributes

Used by template ŧ dependency-expansion-terse ŧ dependencies-tokenized-selectively

Used by function tan:shallow-copy() tan:error()

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

tan:string-to-int($string as xs:string?) as xs:integer*

Companion fonction to tan:string-to-numerals()

Returns only those results that can be evaluated as integers

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

Relies upon tan:string-to-numerals .

Option 1 (TAN-core-functions)

tan:string-to-numerals($string-to-analyze as xs:string?) as xs:string*

one-parameter version of the function below

Used by template ŧ class-1-expansion-verbose ŧ core-resolution-arabic-numerals

Used by function tan:string-to-numerals() tan:string-to-int()

Relies upon tan:string-to-numerals .

Option 2 (TAN-core-functions)

tan:string-to-numerals($string-to-analyze as xs:string?, $ambig-is-roman as xs:boolean?, $return-only-numerals as xs:boolean?) as xs:string*

Input: a string thought to contain numerals of some type (e.g., Roman); a boolean indicating whether ambiguous letters should be treated as Roman numerals or letter numerals; a boolean indicating whether only numeral matches should be returned

Output: the string with parts that look like numerals converted to Arabic numerals

Does not take into account requests for help

Used by template ŧ class-1-expansion-verbose ŧ core-resolution-arabic-numerals

Used by function tan:string-to-numerals() tan:string-to-int()

Relies upon tan:analyze-numbers-in-string .

Option 1 (TAN-core-functions)

tan:xml-to-string($fragment as item()*) as xs:string?

Used by template ŧ core-expansion-normal

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

Relies upon tan:xml-to-string .

Option 2 (TAN-core-functions)

tan:xml-to-string($fragment as item()*, $ignore-whitespace-text-nodes as xs:boolean) as xs:string?

Input: any fragment of XML; boolean indicating whether whitespace nodes should be ignored

Output: a string representation of the fragment

This function is used to represent XML fragments in a plain text message, useful in validation reports or in generating guidelines

Used by template ŧ core-expansion-normal

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

Relies upon ŧ fragment-to-text .