Table of Contents
ŧ #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
()
ŧ 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
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
.
This variable has a complex definition. See stylesheet for definiton.
Used by function tan:letter-to-number
()
Does not rely upon global variables, keys, functions, or templates.
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 variable $nonlatin-letter-numeral-pattern
Used by function tan:ara-to-int
() tan:letter-to-number
()
Does not rely upon global variables, keys, functions, or templates.
Definition: ('ref', 'n', 'new')
Used by template ŧ core-resolution-arabic-numerals
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: substring-before(substring-after($doc-id, 'tag:'), ':')
Used by variable $primary-agent
Used by template ŧ core-expansion-terse
Relies upon $doc-id
.
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.
Definition: $all-head-iris[index-of($all-head-iris, .)[2]]
Used by template ŧ check-referred-doc
ŧ core-expansion-terse
Relies upon $all-head-iris
.
Definition: $all-ids[index-of($all-ids, .)[2]]
Used by template ŧ core-expansion-terse-attributes
ŧ catalog-expansion-terse
ŧ catalog-expansion-terse
Relies upon $all-ids
.
Definition: ('morphology', 'inclusion', 'key')
Used by function tan:must-refer-to-external-tan-file
()
Does not rely upon global variables, keys, functions, or templates.
Definition: ('person', 'agent', 'scriptum', 'work', 'version', 'source')
Used by template ŧ core-expansion-terse
Does not rely upon global variables, keys, functions, or templates.
This variable has a complex definition. See stylesheet for definiton.
Used by template ŧ check-referred-doc
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.
This variable has a complex definition. See stylesheet for definiton.
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon tan:error
.
Definition: '͵?([α-θΑ-ΘϛϚ]?[ρ-ωΡ-ΩϠϡ]?[ι-πΙ-ΠϘϙϞϟ]?[α-θΑ-ΘϛϚ]|[α-θΑ-ΘϛϚ]?[ρ-ωΡ-ΩϠϡ]?[ι-πΙ-ΠϘϙϞϟ][α-θΑ-ΘϛϚ]?|[α-θΑ-ΘϛϚ]?[ρ-ωΡ-ΩϠϡ][ι-πΙ-ΠϘϙϞϟ]?[α-θΑ-ΘϛϚ]?)ʹ?'
Used by variable $nonlatin-letter-numeral-pattern
Does not rely upon global variables, keys, functions, or templates.
Definition: $self-resolved/*/tan:head
Used by variable $src-ids
$source-ids
$all-ids
$all-head-iris
$primary-agent
$keys-1st-da
$sources-1st-da
$sources-must-be-altered
$see-alsos-1st-da
$morphologies-1st-da
$morphologies-resolved
Used by template ŧ check-referred-doc
ŧ core-expansion-terse-attributes
Used by function tan:definition
() tan:diff-loop
()
Relies upon $self-resolved
.
Definition: doc('TAN-idrefs.xml')
Used by template ŧ core-expansion-terse-attributes
ŧ prepend-id-or-idrefs
Used by function tan:definition
()
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: tan:expand-doc($keys-resolved)
Used by variable $all-keywords
Relies upon tan:expand-doc
$keys-resolved
.
Definition: tan:resolve-doc($keys-1st-da)
Used by variable $keys-expanded
Used by template ŧ check-referred-doc
Relies upon tan:resolve-doc
$keys-1st-da
.
Definition: 'a+|b+|c+|d+|e+|f+|g+|h+|i+|j+|k+|l+|m+|n+|o+|p+|q+|r+|s+|t+|u+|v+|w+|x+|y+|z+'
Used by variable $n-type-pattern
Used by function tan:aaa-to-int
()
Does not rely upon global variables, keys, functions, or templates.
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: ('i', '1', '1a', 'a', 'a1', 'α', '$', 'i-or-a')
Used by template ŧ string-to-numerals
Does not rely upon global variables, keys, functions, or templates.
Definition: ('Roman numerals', 'Arabic numerals', 'Arabic numerals + alphabet numeral', 'alphabet numeral', 'alphabet numeral + Arabic numeral', 'non-Latin-alphabet numeral', 'string', 'Roman or alphabet numeral')
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
Definition: (concat('^(', $roman-numeral-pattern, ')$'), '^(\d+)$', concat('^(\d+)(', $latin-letter-numeral-pattern, ')$'), concat('^(', $latin-letter-numeral-pattern, ')$'), concat('^(', $latin-letter-numeral-pattern, ')(\d+)$'), concat('^(', $nonlatin-letter-numeral-pattern, ')$'), '(.)')
Used by template ŧ string-to-numerals
Relies upon $roman-numeral-pattern
$latin-letter-numeral-pattern
$nonlatin-letter-numeral-pattern
.
Definition: string-join(($arabic-indic-numeral-pattern, $greek-letter-numeral-pattern, $syriac-letter-numeral-pattern), '|')
Used by variable $n-type-pattern
Relies upon $arabic-indic-numeral-pattern
$greek-letter-numeral-pattern
$syriac-letter-numeral-pattern
.
Definition: tan:dateTime-to-decimal(current-dateTime())
Used by template ŧ core-expansion-terse-attributes
Relies upon tan:dateTime-to-decimal
.
Definition: ('3gpp', 'adid', 'alert', 'bbf', 'broadband-forum-org', 'cablelabs', 'ccsds', 'cgi', 'clei', 'dgiwg', 'dslforum-org', 'dvb', 'ebu', 'eidr', 'epc', 'epcglobal', 'eurosystem', 'example', 'fdc', 'fipa', 'geant', 'globus', 'gsma', 'hbbtv', 'ieee', 'ietf', 'iptc', 'isan', 'isbn', 'iso', 'issn', 'ivis', 'liberty', 'mace', 'mef', 'mpeg', 'mrn', 'nato', 'nbn', 'nena', 'newsml', 'nfc', 'nzl', 'oasis', 'ogc', 'ogf', 'oid', 'oipf', 'oma', 'pin', 'publicid', 's1000d', 'schac', 'service', 'smpte', 'swift', 'tva', 'uci', 'ucode', 'uuid', 'web3d', 'xmlorg', 'xmpp', 'urn-1', 'urn-2', 'urn-3', 'urn-4', 'urn-5', 'urn-6', 'urn-7')
Used by template ŧ core-expansion-terse
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: ('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:glossary('relationship', (), 'TAN files')
Used by function tan:must-refer-to-external-tan-file
()
Relies upon tan:glossary
.
Definition: 'm{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(ix|iv|v?i{0,3})'
Used by variable $n-type-pattern
Used by function tan:rom-to-int
()
Does not rely upon global variables, keys, functions, or templates.
Definition: tan:get-1st-doc($head/tan:see-also)
Used by variable $see-alsos-resolved
Relies upon tan:get-1st-doc
$head
.
Definition: tan:resolve-doc($see-alsos-1st-da)
Used by template ŧ class-1-expansion-verbose
ŧ check-referred-doc
ŧ core-expansion-terse
Relies upon tan:resolve-doc
$see-alsos-1st-da
.
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: tan:resolve-doc(/)
Used by variable $self-expanded
$head
$body
$doc-class
Relies upon tan:resolve-doc
.
Definition: ' '
Used by template ŧ core-expansion-terse
dependency-expansion-terse-no-alter ŧ dependency-expansion-terse
ŧ dependencies-tokenized-selectively
ŧ merge-divs
ŧ only-misfit-divs
ŧ reconstruct-div-hierarchy
ŧ string-to-numerals
Used by function tan:analyze-sequence
() tan:analyze-ref-loop
()
Does not rely upon global variables, keys, functions, or templates.
Definition: '#'
Used by template ŧ string-to-numerals
Does not rely upon global variables, keys, functions, or templates.
Definition: '##'
No variables, keys, functions, or named templates depend upon this xsl:variable.
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: tan:get-1st-doc($head/tan:source)
Used by variable $sources-resolved
Relies upon tan:get-1st-doc
$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: tan:resolve-doc($sources-1st-da, $sources-must-be-altered, 'src', $source-ids, (), ())
Used by template ŧ check-referred-doc
Used by function tan:expand-doc
()
Relies upon tan:resolve-doc
$sources-1st-da
$sources-must-be-altered
$source-ids
.
This variable has a complex definition. See stylesheet for definiton.
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
Definition: '[ܐܒܓܕܗܘܙܚܛ]?\p{Mc}?(ܬ?[ܩܪܫܬ]|[ܢܣܥܦܨ]\p{Mc})?\p{Mc}?[ܝܟܠܡܢܣܥܦܨ]?\p{Mc}?[ܐܒܓܕܗܘܙܚܛ]\p{Mc}?|[ܐܒܓܕܗܘܙܚܛ]?\p{Mc}?(ܬ?[ܩܪܫܬ]|[ܢܣܥܦܨ]\p{Mc})?\p{Mc}?[ܝܟܠܡܢܣܥܦܨ]\p{Mc}?[ܐܒܓܕܗܘܙܚܛ]?\p{Mc}?|[ܐܒܓܕܗܘܙܚܛ]?\p{Mc}?(ܬ?[ܩܪܫܬ]|[ܢܣܥܦܨ]\p{Mc})\p{Mc}?[ܝܟܠܡܢܣܥܦܨ]?\p{Mc}?[ܐܒܓܕܗܘܙܚܛ]?\p{Mc}?'
Used by variable $nonlatin-letter-numeral-pattern
Does not rely upon global variables, keys, functions, or templates.
Definition: 'tag:([\-a-zA-Z0-9._%+]+@)?[\-a-zA-Z0-9.]+\.[A-Za-z]{2,4},\d{4}(-(0\d|1[0-2]))?(-([0-2]\d|3[01]))?:\S+'
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
This variable has a complex definition. See stylesheet for definiton.
Used by function tan:class-number
()
Does not rely upon global variables, keys, functions, or templates.
Definition: collection('../../TAN-key/collection.xml')
Used by variable $TAN-keywords
Does not rely upon global variables, keys, functions, or templates.
This variable has a complex definition. See stylesheet for definiton.
We do not put dependency TAN-key files through the customary tan:expand-doc
(), which relies upon $TAN-keywords
Used by variable $all-keywords
$token-definitions-reserved
Used by template ŧ core-expansion-terse
ŧ check-referred-doc
Used by function tan:glossary
()
Relies upon $TAN-keyword-files
ŧ expand-tan-key-dependencies
.
Definition: 'tag:textalign.net,2015'
Used by template ŧ core-expansion-terse
Does not rely upon global variables, keys, functions, or templates.
Definition: '2018'
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
Definition: $token-definitions-reserved[1]
Used by function tan:tokenize-text
() tan:tokenize-text
()
Relies upon $token-definitions-reserved
.
Definition: $TAN-keywords//tan:token-definition
Used by variable $tokenization-nonspace
$token-definition-default
Relies upon $TAN-keywords
.
Definition: ('terse', 'normal', 'verbose')
No variables, keys, functions, or named templates depend upon this xsl:variable.
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.
tan:aaa-to-int($arg as xs:string*) as xs:integer*
Input: any alphabet numerals
Output:the integer equivalent
Sequence goes a, b, c, ... z, aa, bb, ..., aaa, bbb, .... E.g., 'ccc' - > 55
Used by template ŧ string-to-numerals
Relies upon $latin-letter-numeral-pattern
.
tan:analyze-numbers-in-string($string-to-analyze as xs:string, $ambig-is-roman as xs:boolean?) as element()*
Companion function to the above, this function returns the analysis in element form
Used by template ŧ class-1-expansion-verbose
Used by function tan:string-to-numerals
()
Relies upon ŧ string-to-numerals
.
tan:analyze-ref-loop($elements-to-process as element()*, $number-of-ns-in-last-item-processed as xs:integer?, $current-contextual-ref as element()?) as element()*
Input: elements from tan:analyze-sequence
() that should be evaluated as a ref
Output: the likely resolution of those refs
Used by function tan:analyze-sequence
() tan:analyze-ref-loop
()
Relies upon $separator-hierarchy
tan:analyze-ref-loop
.
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
.
tan:ara-to-int($arabic-indic-numerals as xs:string*) as xs:integer*
Input: Arabic-indic numerals
Output: Integer values, if the input conforms to the correct pattern
Used by function tan:letter-to-number
()
Relies upon $arabic-indic-numeral-pattern
.
tan:base-uri($any-node as node()?) as xs:anyURI?
Input: any node
Output: the base uri of the node's document
NB, this function differs from fn:base-uri in that it first looks for a @base-uri
stamped at the document node. This is important because many TAN documents will be transformed, bound to variables, and so divorced from an original context dectable only through @base-uri.
Used by template ŧ core-expansion-verbose
ŧ first-stamp
expand-tan-key-dependencies ŧ first-stamp
ŧ resolve-href
expand-tan-key-dependencies
Used by function tan:cfn
() tan:get-1st-doc
()
Does not rely upon global variables, keys, functions, or templates.
tan:cfn($item as item()*) as xs:string*
Input: any items
Output: the Current File Name, without extension, of the host document node of each item
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:base-uri
.
tan:class-number($nodes as node()*) as xs:integer*
Input: any nodes of a TAN document
Output: one digit per node, specifying which TAN class the file fits, based on the name of the root element. If no match is found in the root element, 0 is returned
Used by variable $doc-class
Used by template ŧ check-referred-doc
Used by function tan:expand-doc
() tan:must-refer-to-external-tan-file
() tan:get-1st-doc
()
Relies upon tan:tan-type
$tan-classes
.
tan:condition-evaluation-loop($elements-with-condition-attributes-to-be-evaluated as element()*, $context-to-evaluate-against as item()*) as xs:boolean
Companion function to the one above, indicating whether the conditions in the attributes hold
Used by function tan:conditions-hold
() tan:condition-evaluation-loop
()
Relies upon tan:condition-evaluation-loop
ŧ evaluate-conditions
.
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
.
tan:copy-of($doc-fragment as item()*, $exclude-elements-beyond-what-depth as xs:integer?) as item()*
Input: any document fragment, and an optional integer specifying the depth of copy requested
Output: a copy of the fragment to the depth specified
This function depends upon the full version of tan:copy-of-except
(); it is particularly useful for diagnostics, e.g., retrieving a long document's root element and its children, without descendants
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:copy-of-except
.
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:dateTime-to-decimal($time-or-dateTime as item()*) as xs:decimal*
Input: any xs:date or xs:dateTime
Output: decimal between 0 and 1 that acts as a proxy for the date and time. These decimal values can then be sorted and compared.
Example: (2015-05-10) - > 0.2015051
If input is not castable as a date or dateTime, 0 is returned
Used by variable $now
Used by template ŧ check-referred-doc
ŧ core-expansion-terse-attributes
Used by function tan:most-recent-dateTime
() tan:get-doc-hist
()
Does not rely upon global variables, keys, functions, or templates.
tan:definition($ref-nodes as node()*) as element()*
Input: an attribute or element that contains a text value
Output: the corresponding definitions. If a value does not exist, an <error>
is returned.
Assumes space normalization, and ignores help requests
Used by template ŧ class-1-expansion-verbose
ŧ class-1-expansion-verbose
ŧ check-referred-doc
ŧ core-expansion-terse
Relies upon $head
$id-idrefs
tan:error
.
tan:distinct-items($items as item()*) as item()*
Input: any sequence of items
Output: Those items that are not deeply equal to any other item in the sequence
This function is parallel to distinct-values(
), but handles non-string input
No variables, keys, functions, or named templates depend upon this xsl:function.
Does not rely upon global variables, keys, functions, or templates.
tan:duplicate-items($sequence as item()*) as item()*
Input: any sequence of items
Output: those items that appear in the sequence more than once
This function parallels the standard fn:distinct-values(
)
Used by template ŧ core-expansion-terse
ŧ dependencies-tokenized-selectively
ŧ core-expansion-normal
ŧ core-expansion-normal
ŧ dependency-expansion-terse
core-expansion-terse ŧ core-expansion-terse-attributes
ŧ catalog-expansion-terse
ŧ core-expansion-terse
Does not rely upon global variables, keys, functions, or templates.
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:expand-pos-or-chars($elements as element()*, $max as xs:integer?) as xs:integer*
Input: any elements that are <pos>
, <chars>
, or <range>
s; an integer representing what 'max' means
Output: the elements converted to integers they represent
Because the results are normally positive integers, the following should be treated as error codes:
0 = value that falls below 1
-1 = value that cannot be converted to an integer
-2 = ranges that call for negative steps, e.g., '4 - 2'
Used by template ŧ dependencies-tokenized-selectively
ŧ class-2-expansion-terse
Does not rely upon global variables, keys, functions, or templates.
tan:first-loc-available($elements-that-are-locations-or-parents-of-locations as element()*) as xs:string?
Input: An element that contains one or more tan:location elements
Output: the value of the first tan:location/@href
to point to a document available, resolved If no location is available nothing is returned.
Used by function tan:get-1st-doc
()
Relies upon tan:resolve-href
.
tan:get-1st-doc($TAN-elements as element()*) as document-node()*
Input: any TAN elements naming files (e.g., <source>
, <see-also>
, <inclusion>
, <key>
; an indication whether some basic errors should be checked if the retrieved file is a TAN document
Output: the first document available for each element, plus/or any relevant error messages.
Used by variable $inclusions-1st-da
$keys-1st-da
$sources-1st-da
$see-alsos-1st-da
$morphologies-1st-da
Used by template ŧ class-1-expansion-verbose
ŧ class-2-expansion-verbose
ŧ check-referred-doc
ŧ core-expansion-normal
ŧ core-expansion-terse
Used by function tan:expand-doc
() tan:resolve-doc
()
Relies upon tan:error
ŧ resolve-href
tan:class-number
tan:tan-type
tan:first-loc-available
tan:uri-relative-to
tan:resolve-href
tan:base-uri
.
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
.
tan:get-via-q-ref($q-ref as xs:string*, $q-reffed-document as document-node()*) as node()*
Input: any number of qrefs, any number of q-reffed documents
Output: the elements corresponding to the q-refs
This function is used by the core validation routine, especially to associate errors in included elements with the primary including element
Used by template ŧ class-2-expansion-terse
ŧ class-2-expansion-normal
Does not rely upon global variables, keys, functions, or templates.
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:group-elements-by-shared-node-values-loop($elements-to-group as element()*, $regex-of-names-of-nodes-to-group-by as xs:string?, $groups-so-far as element()*) as element()*
Supporting loop function of the one above.
Used by function tan:group-elements-by-shared-node-values
() tan:group-elements-by-shared-node-values-loop
()
Relies upon tan:group-elements-by-shared-node-values-loop
.
tan:letter-to-number($numerical-letters as xs:anyAtomicType*) as xs:integer*
Input: any sequence of strings that represent alphabetic numerals
Output: those numerals
Works only for letter patterns that have been defined; anything else produces null results
Used by template ŧ string-to-numerals
Used by function tan:grc-to-int
() tan:syr-to-int
()
Relies upon $arabic-indic-numeral-pattern
tan:ara-to-int
$alphabet-numeral-key
.
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:most-recent-dateTime($dateTimes as item()*) as item()?
Input: a series of ISO-compliant date or dateTimes
Output: the most recent one
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:dateTime-to-decimal
.
tan:must-refer-to-external-tan-file($node as node()) as xs:boolean
Input: node in a TAN document.
Output: boolean value indicating whether the node or its parent must name or refer to a TAN file.
Used by template ŧ core-expansion-terse
Relies upon tan:class-number
$elements-that-must-always-refer-to-tan-files
$relationship-keywords-for-tan-files
.
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:pluck($fragment as item()*, $pluck-beyond-level as xs:integer, $keep-short-branch-leaves as xs:boolean) as item()*
Input: any document fragment or element; a number indicating a level in the hierarchy of the fragment; a boolean indicating whether leaf elements that fall short of the previous parameter should be included
Output: the fragment of the tree that is beyond the point indicated, and perhaps (depending upon the third parameter) with other leafs that are not quite at that level
This function was written primarily to serve tan:convert-ref-to-div-fragment(
), to get a slice of divs that correspond to a range, without the ancestry of those divs
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon ŧ pluck
.
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.
tan:rom-to-int($arg as xs:string*) as xs:integer*
Input: any roman numeral less than 5000
Output: the numeral converted to an integer
Used by template ŧ string-to-numerals
Relies upon $roman-numeral-pattern
.
tan:sequence-collapse($integers as xs:integer*) as xs:string?
Input: a sequence of integers
Output: a string that puts them in a TAN-like compact string
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
.
tan:tan-type($nodes as node()*) as xs:string*
Input: any nodes
Output: the names of the root elements; if not present, a zero-length string is returned
Used by function tan:class-number
() tan:get-1st-doc
() tan:merge-expanded-docs
()
Does not rely upon global variables, keys, functions, or templates.
tan:uri-directory($uris as xs:string*) as xs:string*
Input: any URIs, as strings
Output: the file path
NB, this function does not assume any URIs have been resolved
Used by variable $doc-parent-directory
Does not rely upon global variables, keys, functions, or templates.
tan:uri-relative-to($uri-to-revise as xs:string?, $uri-to-revise-against as xs:string?) as xs:string?
Input: two strings representing URIs
Output: the first string resolved relative to the second string
This function looks for common paths within two absolute URIs and tries to convert the first URI as a relative path
Used by template ŧ core-expansion-terse-attributes
Used by function tan:get-1st-doc
()
Does not rely upon global variables, keys, functions, or templates.
tan:value-of($items as item()*) as xs:string?
Input: any sequence of items
Output: the value of each item
Proxy for <xsl:value-of/>. Useful as a function in XPath expressions
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: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
.