Table of Contents
ŧ #all
ŧ add-collation-pos-offset
ŧ add-tok-pos
ŧ analyze-string-length-pass-1
ŧ analyze-string-length-pass-2
ŧ apply-inclusions-and-adjust-vocabulary
ŧ batch-replace-advanced
ŧ build-grouping-key
ŧ build-morpheus-ana
ŧ build-morpheus-lex
ŧ catalog-expansion-terse
ŧ check-and-expand-ranges
ŧ check-referred-doc
ŧ claims-morpheus
ŧ claims-morpheus-desc
ŧ class-1-expansion-verbose-pass-1
ŧ class-1-expansion-verbose-pass-2
ŧ class-1-expansion-verbose-pass-3
ŧ class-2-expansion-normal
ŧ class-2-expansion-terse
ŧ class-2-expansion-terse-for-validation
ŧ class-2-expansion-verbose
ŧ clean-reset-divs-1
ŧ clean-reset-divs-2
ŧ clean-up-collation-pass-1
ŧ clean-up-collation-pass-2
ŧ collation-to-strings
ŧ copy-of-except
ŧ core-expansion-ad-hoc-pre-pass
ŧ core-expansion-normal
ŧ core-expansion-terse
ŧ core-expansion-terse-attributes
ŧ core-expansion-terse-attributes-to-elements
ŧ core-expansion-verbose
ŧ cut-faulty-hrefs
ŧ dependency-adjustments-pass-1
ŧ dependency-adjustments-pass-2
ŧ dependency-expansion-normal
ŧ dependency-expansion-verbose
ŧ diff-to-collation
ŧ element-fingerprint
ŧ element-to-error
ŧ evaluate-conditions
ŧ expand-reassigns
ŧ expand-standard-tan-voc
ŧ first-stamp-shallow-copy
ŧ first-stamp-shallow-skip
ŧ fragment-to-text
ŧ get-doc-history
ŧ get-IRI-name
ŧ get-undefined-idrefs
ŧ imitate-validation
ŧ imprint-adjustment-action
ŧ imprint-vocabulary
ŧ indent-items
ŧ infuse-tokenized-div-end-check
ŧ infuse-tokenized-text
ŧ infuse-tokenized-text-cleanup
ŧ insert-content
ŧ integers-to-sequence
ŧ itemize-lms
ŧ mark-dependencies-for-validation
ŧ mark-dependencies-for-validation-skip-divs
ŧ mark-dependencies-pass-1
ŧ mark-dependencies-pass-2
ŧ mark-dependencies-pass-2-for-validation
ŧ mark-reassigns
ŧ mark-tok-chars
ŧ mark-tok-pos
ŧ merge-divs
ŧ merge-tan-doc-leaf-divs
ŧ merge-tan-docs
ŧ normalize-tei-space
ŧ normalize-xml-fragment-space
ŧ pluck
ŧ prefix-attr-include
ŧ prep-div-refs-pass-1
ŧ prep-div-refs-pass-2
ŧ prepend-line-break
ŧ process-appended-div
ŧ process-merged-div
ŧ remove-duplicate-siblings
ŧ remove-first-token
ŧ remove-inclusions
ŧ reset-hierarchy
ŧ resolve-critical-dependencies
ŧ resolve-critical-dependencies-loop
ŧ resolve-href
ŧ resolve-numerals
ŧ revise-hrefs
ŧ selective-shallow-skip
ŧ sequence-to-tree
ŧ shallow-copy
ŧ snap-to-word-pass-1
ŧ stamp-q-id
ŧ stamp-with-src-attr
ŧ string-to-numerals
ŧ strip-all-attributes-except
ŧ strip-dependencies-to-markers
ŧ strip-divs-to-reset
ŧ strip-duplicate-children-by-attribute-value
ŧ strip-for-validation
ŧ strip-specific-attributes
ŧ strip-text
ŧ tan-a-lm-expansion-terse
ŧ text-join
ŧ text-only
ŧ title-case
ŧ tokenize-div
ŧ tree-to-sequence
ŧ trim-long-text
ŧ trim-or-add-text
ŧ unmark-tokens
ŧ uri-relative-to
ŧ vocabulary-all-vals
ŧ vocabulary-by-id
ŧ vocabulary-by-name
The 162 global variables, 9 keys (ʞ = key), 215 functions, and 117 templates (Ŧ = named template; ŧ = template mode) defined in the TAN function library, are the following:
Dependencies refer exclusively to components of the TAN function library, both the
core validation procedures and the extra functions. A variable, function, or template
listed as not being relied upon may have dependencies in the files in the
subdirectory applications
.
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.
ŧ #all
tan:aaa-to-int()
tan:acronym()
tan:add-attribute()
ŧ add-collation-pos-offset
ŧ add-tok-pos
tan:adjust-diff()
tan:all-conditions-hold()
tan:all-conditions-hold-evaluation-loop()
$all-functions
$all-head-iris
$all-ids
$all-ids-not-in-inclusions
$all-selector
$all-vocabularies
$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()
rgx:analyze-string()
tan:analyze-string-length()
ŧ analyze-string-length-pass-1
ŧ analyze-string-length-pass-2
$annotations-1st-da
$annotations-resolved
$apos
$applications-collection
$applications-uri-collection
ŧ apply-inclusions-and-adjust-vocabulary
tan:ara-to-int()
$arabic-indic-numeral-pattern
tan:atomize-string()
tan:attr()
tan:attribute-vocabulary()
ʞ attrs-by-name
$base-marker-regex
tan:base-uri()
$base64-key
tan:base64-to-bin()
tan:base64-to-dec()
tan:batch-replace()
tan:batch-replace-advanced()
ŧ batch-replace-advanced
rgx:best-unicode-version()
tan:blend-alpha-value()
tan:blend-color-channel-value()
tan:blend-colors()
$body
rgx:build-char-replacement-guide()
ŧ build-grouping-key
ŧ build-morpheus-ana
ŧ build-morpheus-lex
tan:build-parent-ref-tree()
ŧ catalog-expansion-terse
tan:catalog-uris()
tan:catalogs()
tan:cfn()
tan:cfne()
$char-reg-exp
$characters-allowed-in-ucd-names-regex
$characters-to-escape-when-converting-string-to-regex
ŧ check-and-expand-ranges
ŧ check-referred-doc
tan:chop-string()
ŧ claims-morpheus
ŧ claims-morpheus-desc
ŧ class-1-expansion-verbose-pass-1
ŧ class-1-expansion-verbose-pass-2
ŧ class-1-expansion-verbose-pass-3
ŧ class-2-expansion-normal
ŧ class-2-expansion-terse
ŧ class-2-expansion-terse-for-validation
ŧ class-2-expansion-verbose
tan:class-number()
ŧ clean-reset-divs-1
ŧ clean-reset-divs-2
ŧ clean-up-collation-pass-1
ŧ clean-up-collation-pass-2
$close-group-symbols-regex
rgx:codepoints-to-string()
tan:collate()
tan:collate-loop-inner()
tan:collate-loop-outer()
tan:collate-pair-of-sequences()
tan:collate-sequence-loop()
tan:collate-sequences()
tan:collation-to-strings()
ŧ collation-to-strings
tan:collection()
tan:commas-and-ands()
tan:common-end-string()
tan:common-start-or-end-string()
tan:common-start-string()
$composite-marker-regex
tan:copy-indentation()
tan:copy-of()
tan:copy-of-except()
ŧ copy-of-except
ŧ core-expansion-ad-hoc-pre-pass
ŧ core-expansion-normal
ŧ core-expansion-terse
ŧ core-expansion-terse-attributes
ŧ core-expansion-terse-attributes-to-elements
ŧ core-expansion-verbose
tan:counts-to-lasts()
ŧ cut-faulty-hrefs
tan:data-type-check()
$datatypes-that-require-unit-specification
tan:dateTime-to-decimal()
tan:dec-to-bin()
rgx:dec-to-hex()
rgx:dec-to-n()
$default-ucd-decomp-db
$default-ucd-decomp-simple-db
$default-ucd-names-db
ŧ dependency-adjustments-pass-1
ŧ dependency-adjustments-pass-2
ŧ dependency-expansion-normal
ŧ dependency-expansion-verbose
$dhy
tan:diff()
tan:diff-cache()
tan:diff-inner-loop()
tan:diff-outer-loop()
tan:diff-to-collation()
ŧ diff-to-collation
tan:distinct-items()
tan:div-to-div-transfer()
ʞ div-via-ref
ʞ divs-to-reset
$doc-catalog-uris
$doc-catalogs
$doc-class
$doc-filename
$doc-history
$doc-id
tan:doc-id-namespace()
$doc-id-namespace
$doc-is-error-test
$doc-namespace
$doc-parent-directory
$doc-type
$doc-uri
$doc-vocabulary
$duplicate-head-iris
$duplicate-ids
tan:duplicate-items()
tan:duplicate-values()
tan:element-fingerprint()
ŧ element-fingerprint
ŧ element-to-error
tan:element-vocabulary()
ʞ elements-by-name
$elements-supported-by-TAN-vocabulary-files
ʞ elements-with-attrs-named
tan:ellipses()
$empty-doc
$empty-element
$english-articles
$english-prepositions
$erroneously-looped-doc
tan:error()
tan:error-codes()
$error-markers
tan:error-report()
$error-tests
$errors
tan:errors-checked-where()
$errors-to-squelch
rgx:escape()
$escapes-in-regex
tan:evaluate()
ŧ evaluate-conditions
tan:expand-doc()
tan:expand-doc-test()
tan:expand-numerical-sequence()
tan:expand-pos-or-chars()
ŧ expand-reassigns
ŧ expand-standard-tan-voc
$extra-vocabulary-files
tan:fill()
tan:first-loc-available()
tan:first-loc-available-loop()
ŧ first-stamp-shallow-copy
ŧ first-stamp-shallow-skip
tan:fix()
ŧ fragment-to-text
tan:get-1st-doc()
ʞ get-ana
tan:get-and-resolve-dependency()
rgx:get-chars-by-name()
tan:get-doc-history()
ŧ get-doc-history
ŧ get-IRI-name
tan:get-parent-elements()
rgx:get-ucd-decomp-db()
rgx:get-ucd-decomp-simple-db()
rgx:get-ucd-names-db()
ŧ get-undefined-idrefs
tan:get-via-q-ref()
tan:giant-diff()
tan:glob-to-regex()
tan:grc-to-int()
$grc-tokens-without-accents
$greek-hundreds-regex
$greek-letter-numeral-pattern
$greek-tens-regex
$greek-unit-regex
tan:group-divs()
tan:group-divs-by-ref()
tan:group-elements()
tan:group-elements-by-IRI()
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
rgx:hex-to-dec()
$id-idrefs
ŧ imitate-validation
ŧ imprint-adjustment-action
tan:imprint-adjustment-locator()
ŧ imprint-vocabulary
$inclusions-resolved
ŧ indent-items
tan:indent-value()
tan:info()
tan:infuse-divs()
ŧ infuse-tokenized-div-end-check
ŧ infuse-tokenized-text
ŧ infuse-tokenized-text-cleanup
tan:initial-upper-case()
tan:insert-as-first-child()
tan:insert-as-last-child()
ŧ insert-content
tan:int-to-aaa()
tan:int-to-grc()
tan:integers-to-sequence()
ŧ integers-to-sequence
$internet-available
tan:is-valid-uri()
$iso-639-3
ʞ item-via-node-name
ŧ itemize-lms
tan:lang-catalog()
tan:lang-code()
tan:lang-name()
$languages-supported
tan:last-change-agent()
$latin-letter-numeral-pattern
tan:lengths-to-positions()
tan:letter-to-number()
tan:lm-data()
$local-catalog
$local-TAN-collection
$local-TAN-voc-collection
tan:longest-ascending-subsequence()
ŧ mark-dependencies-for-validation
ŧ mark-dependencies-for-validation-skip-divs
ŧ mark-dependencies-pass-1
ŧ mark-dependencies-pass-2
ŧ mark-dependencies-pass-2-for-validation
ŧ mark-reassigns
ŧ mark-tok-chars
ŧ mark-tok-pos
rgx:matches()
tan:median()
tan:merge-analyzed-stats()
tan:merge-anas()
tan:merge-divs()
ŧ merge-divs
tan:merge-expanded-docs()
ŧ merge-tan-doc-leaf-divs
ŧ merge-tan-docs
$model-1st-da
$model-resolved
$morphologies-expanded
$morphologies-resolved
$most-common-indentations
tan:most-common-item()
tan:most-common-item-count()
tan:most-recent-dateTime()
tan:must-refer-to-external-tan-file()
rgx:n-to-dec()
$n-type
$n-type-label
$n-type-pattern
$name-marker-regex
$names-of-attributes-that-are-case-indifferent
$names-of-attributes-that-may-take-multiple-space-delimited-values
$names-of-attributes-that-permit-keyword-last
$names-of-attributes-that-take-idrefs
$names-of-elements-that-describe-text-bearers
$names-of-elements-that-describe-text-creators
$names-of-elements-that-describe-textual-entities
$names-of-elements-that-make-adjustments
$names-of-elements-that-must-always-refer-to-tan-files
$names-of-elements-that-take-idrefs
tan:namespace()
$namespaces-and-prefixes
$nested-phrase-close-marker-regex
tan:nested-phrase-loop()
$nested-phrase-marker-regex
$nested-phrase-markers
tan:no-outliers()
tan:node-before()
tan:node-type()
$nonlatin-letter-numeral-pattern
tan:normalize-div-text()
tan:normalize-name()
tan:normalize-sequence()
ŧ normalize-tei-space
tan:normalize-text()
tan:normalize-xml-element-space()
ŧ normalize-xml-fragment-space
$now
tan:number-sort()
$objects-target-what-elements-names
$official-urn-namespaces
tan:open-file()
$open-group-symbols-regex
tan:ordinal()
$orig-self
$orig-self-validated
tan:outliers()
rgx:parse-flags()
rgx:parse-regex()
tan:parse-urls()
tan:path()
tan:pluck()
ŧ pluck
tan:possible-bibliography-id()
$predecessors-1st-da
$predecessors-resolved
ŧ prefix-attr-include
ŧ prep-div-refs-pass-1
ŧ prep-div-refs-pass-2
ŧ prepend-line-break
$previous-TAN-versions
$primary-agents
ŧ process-appended-div
ŧ process-merged-div
rgx:process-regex-escape-u()
tan:product()
tan:product-loop()
$redivisions-1st-da
$redivisions-resolved
rgx:regex()
$regex-characters-not-permitted
rgx:regex-is-valid()
$regex-name-space-characters
tan:remove-duplicate-siblings()
ŧ remove-duplicate-siblings
ŧ remove-first-token
ŧ remove-inclusions
rgx:replace()
rgx:replace-by-char-name()
tan:reset-hierarchy()
ŧ reset-hierarchy
tan:reset-hierarchy-loop()
tan:resolve-alias()
tan:resolve-alias-loop()
ŧ resolve-critical-dependencies
ŧ resolve-critical-dependencies-loop
tan:resolve-doc()
tan:resolve-doc-loop()
tan:resolve-href()
ŧ resolve-href
ŧ resolve-numerals
tan:revise-hrefs()
ŧ revise-hrefs
$rng-collection
$rng-collection-without-TEI
tan:rom-to-int()
$roman-numeral-pattern
$schema-collection
$schema-uri-collection
tan:search-for-entities()
tan:search-for-persons()
tan:search-for-scripta()
tan:search-morpheus()
tan:search-results-to-claims()
tan:search-results-to-IRI-name-pattern()
$search-services
tan:search-wikipedia()
$see-alsos-1st-da
$see-alsos-resolved
ŧ selective-shallow-skip
$self-expanded
$self-resolved
$separator-hierarchy
$separator-hierarchy-minor
$separator-major
tan:sequence-collapse()
tan:sequence-error()
tan:sequence-to-tree()
ŧ sequence-to-tree
tan:shallow-copy()
ŧ shallow-copy
$shy
ŧ snap-to-word-pass-1
$source-ids
$sources-resolved
$special-end-div-chars
$special-end-div-chars-regex
$src-ids
tan:stamp-q-id()
ŧ stamp-q-id
ŧ stamp-with-src-attr
$stated-validation-phase
rgx:string-base()
tan:string-length()
rgx:string-to-components()
rgx:string-to-composites()
tan:string-to-int()
tan:string-to-numerals()
ŧ string-to-numerals
ŧ strip-all-attributes-except
ŧ strip-dependencies-to-markers
ŧ strip-divs-to-reset
ŧ strip-duplicate-children-by-attribute-value
ŧ strip-for-validation
ŧ strip-specific-attributes
ŧ strip-text
$subjects-target-what-elements-names
$successors-1st-da
$successors-resolved
tan:syr-to-int()
$syriac-hundreds-regex
$syriac-letter-numeral-pattern
$syriac-tens-regex
$syriac-unit-regex
$tag-urn-regex-pattern
tan:takes-idrefs()
ŧ tan-a-lm-expansion-terse
$tan-classes
tan:tan-type()
tan:target-element-names()
tan:text-join()
ŧ text-join
ŧ text-only
tan:title-case()
ŧ title-case
$today-iso
ʞ tok-via-val
$token-definition-default
$token-definition-letters-and-punctuation
$token-definition-letters-only
$token-definition-nonspace
$token-definitions-reserved
rgx:tokenize()
tan:tokenize-div()
ŧ tokenize-div
tan:tokenize-text()
tan:tree-to-sequence()
ŧ tree-to-sequence
tan:trim-long-text()
ŧ trim-long-text
ŧ trim-or-add-text
tan:true()
$TAN-elements-that-take-the-attribute-which
$TAN-feature-vocabulary
$TAN-id-namespace
$TAN-namespace
$TAN-version
$TAN-version-is-under-development
$TAN-vocabularies
$TAN-vocabularies-vocabulary
$TAN-vocabulary-files
$TEI-namespace
$u-item-delimiter-regex
$unicode-versions-supported
tan:unique-char()
ŧ unmark-tokens
tan:uri-directory()
tan:uri-is-relative()
tan:uri-is-resolved()
tan:uri-relative-to()
ŧ uri-relative-to
tan:url-is-local()
$url-regex
$validation-phase-names
tan:value-of()
tan:variables-checked-where()
tan:vertical-stops()
$vocabularies-resolved
tan:vocabulary()
ŧ vocabulary-all-vals
ŧ vocabulary-by-id
ŧ vocabulary-by-name
tan:xml-to-string()
$xpath-pattern
TAN-core-functions
Definition: $head/(* except (tan:inclusion | tan:vocabulary | tan:tan-vocabulary))//tan:IRI[not(ancestor::tan:error)]
Used by variable $duplicate-head-iris
.
Relies upon $head
.
TAN-core-functions
Definition: key('attrs-by-name', ('id', 'xml:id'), $self-resolved)
Used by variable $all-ids-not-in-inclusions
, $duplicate-ids
.
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Relies upon $self-resolved
.
TAN-core-functions
Definition: $all-ids[not(ancestor-or-self::tan:inclusion)]
Used by variable $duplicate-ids
.
Relies upon $all-ids
.
TAN-core-functions
Definition: '*'
Used by template ŧ dependency-adjustments-pass-2
, ŧ core-expansion-terse
dependency-adjustments-pass-1.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: ($vocabularies-resolved, $TAN-vocabularies)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $TAN-vocabularies
, $vocabularies-resolved
.
TAN-core-functions
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.
TAN-core-functions
Definition: '
Used by function tan:errors-checked-where()
, tan:variables-checked-where()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: '[٠١٢٣٤٥٦٧٨٩]+'
Used by variable $nonlatin-letter-numeral-pattern
.
Used by function tan:letter-to-number()
, tan:ara-to-int()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: if ($doc-namespace = $TAN-namespace) then $self-resolved/*/(tan:body, tei:text/tei:body) else //*:body
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $TAN-namespace
, $doc-namespace
, $self-resolved
.
TAN-core-functions
Definition:
Used by variable $special-end-div-chars
, $shy
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:catalog-uris(/)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon tan:catalog-uris()
.
TAN-core-functions
Definition: tan:catalogs(/, $validation-phase = 'verbose')
Used by variable $local-catalog
.
Used by template ŧ check-referred-doc
.
Relies upon tan:catalogs()
.
TAN-core-functions
Definition: tan:class-number($self-resolved)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $self-resolved
, tan:class-number()
.
TAN-core-functions
Definition: /*/@id
Used by variable $doc-is-error-test
.
Used by template ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ resolve-critical-dependencies-loop
, ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ class-1-expansion-verbose-pass-1
.
Used by function tan:expand-doc()
, tan:resolve-doc-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:doc-id-namespace($self-resolved)
Used by template ŧ core-expansion-terse
.
Relies upon $self-resolved
, tan:doc-id-namespace()
.
TAN-core-functions
Definition: matches($doc-id, '^tag:textalign.net,\d+:error-test')
Used by template ŧ core-expansion-terse
.
Relies upon $doc-id
.
TAN-core-functions
Definition: namespace-uri(/*)
Used by variable $body
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:uri-directory(string($doc-uri))
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $doc-uri
, tan:uri-directory()
.
TAN-core-functions
Definition: name(/*)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: base-uri(/*)
Used by variable $local-TAN-collection
, $doc-parent-directory
.
Used by template ŧ core-expansion-terse-attributes-to-elements
, ŧ core-expansion-terse
.
Used by function tan:catalog-uris()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:vocabulary((), (), ($head, $self-resolved/(tan:TAN-A, tan:TAN-voc)/tan:body))
Used by function tan:vocabulary()
.
Relies upon $head
, $self-resolved
, tan:vocabulary()
.
TAN-core-functions
Definition: tan:duplicate-items($all-head-iris)
Used by template ŧ core-expansion-terse
, ŧ check-referred-doc
.
Relies upon $all-head-iris
, tan:duplicate-items()
.
TAN-core-functions
Definition: tan:duplicate-items($all-ids-not-in-inclusions)
Used by template ŧ catalog-expansion-terse
, ŧ core-expansion-terse-attributes-to-elements
.
Relies upon $all-ids-not-in-inclusions
, tan:duplicate-items()
.
TAN-core-functions
Definition: ('bitext-relation', 'div-type', 'feature', 'group-type', 'license', 'modal', 'normalization', 'reuse-type', 'role', 'token-definition', 'verb', 'vocabulary')
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
This variable has a complex definition. See stylesheet for definiton.
Used by template ŧ check-referred-doc
.
Used by function tan:get-and-resolve-dependency()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
This variable has a complex definition. See stylesheet for definiton.
Used by template ŧ dependency-adjustments-pass-1
, ŧ check-referred-doc
, ŧ core-expansion-terse
.
Used by function tan:giant-diff()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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()
.
TAN-core-functions
Definition: for $i in $TAN-vocabularies-vocabulary/tan:TAN-voc/tan:body/tan:item[tan:location] return tan:get-1st-doc($i)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $TAN-vocabularies-vocabulary
, tan:get-1st-doc()
.
TAN-core-functions
Definition: '[ρ-ωΡ-ΩϠϡ]'
Used by variable $greek-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: concat('͵', $greek-unit-regex, '?(', $greek-hundreds-regex, '?', $greek-tens-regex, '?', $greek-unit-regex, '|', $greek-unit-regex, '?', $greek-hundreds-regex, '?', $greek-tens-regex, $greek-unit-regex, '?|', $greek-unit-regex, '?', $greek-hundreds-regex, $greek-tens-regex, '?', $greek-unit-regex, '?)ʹ?')
Used by variable $nonlatin-letter-numeral-pattern
.
Relies upon $greek-hundreds-regex
, $greek-tens-regex
, $greek-unit-regex
.
TAN-core-functions
Definition: '[ι-πΙ-ΠϘϙϞϟ]'
Used by variable $greek-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: '[α-θΑ-ΘϛϚ]'
Used by variable $greek-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: if (exists(/*/tan:head)) then $self-resolved/*/tan:head else /*/*:head
Used by variable $annotations-1st-da
, $see-alsos-1st-da
, $predecessors-1st-da
, $successors-1st-da
, $redivisions-1st-da
, $model-1st-da
, $source-ids
, $all-head-iris
, $primary-agents
, $vocabularies-resolved
, $doc-vocabulary
, $sources-resolved
, $morphologies-resolved
, $src-ids
.
Used by function tan:diff-outer-loop()
.
Relies upon $self-resolved
.
TAN-core-functions
Definition: doc('TAN-idrefs.xml')
Used by variable $subjects-target-what-elements-names
, $objects-target-what-elements-names
, $names-of-attributes-that-take-idrefs
, $names-of-elements-that-take-idrefs
.
Used by function tan:target-element-names()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:get-and-resolve-dependency(/*/tan:head/tan:inclusion)
Used by template ŧ check-referred-doc
.
Relies upon tan:get-and-resolve-dependency()
.
TAN-core-functions
This variable has a complex definition. See stylesheet for definiton.
Used by template ŧ core-expansion-terse-attributes-to-elements
, ŧ check-referred-doc
.
Used by function tan:search-for-entities()
, tan:get-1st-doc()
, tan:first-loc-available-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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.
TAN-core-functions
Definition: $doc-catalogs[1]
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $doc-catalogs
.
TAN-core-functions
Definition: for $i in $head/tan:vocabulary-key/tan:morphology return tan:resolve-doc(tan:get-1st-doc($i), true(), tan:attr('morphology', ($i/@xml:id, '1')[1]))
Used by variable $morphologies-expanded
.
Used by function tan:expand-doc()
.
Relies upon $head
, tan:attr()
, tan:get-1st-doc()
, tan:resolve-doc()
.
TAN-core-functions
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.
TAN-core-functions
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.
TAN-core-functions
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 $latin-letter-numeral-pattern
, $nonlatin-letter-numeral-pattern
, $roman-numeral-pattern
.
TAN-core-functions
Definition: ('code', 'n', 'ref', 'affects-element', 'affects-attribute', 'item-type', 'in-lang')
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Used by function tan:normalize-sequence()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $names-of-attributes-that-take-idrefs, ('n', 'affects-element', 'affects-attribute', 'item-type')
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Used by function tan:normalize-sequence()
.
Relies upon $names-of-attributes-that-take-idrefs
.
TAN-core-functions
Definition: ('pos', 'chars', 'm-has-how-many-features')
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $id-idrefs/tan:id-idrefs/tan:id/tan:idrefs/@attribute
Used by variable $names-of-attributes-that-may-take-multiple-space-delimited-values
.
Used by template ŧ core-expansion-terse-attributes
.
Used by function tan:resolve-doc-loop()
.
Relies upon $id-idrefs
.
TAN-core-functions
Definition: ('scriptum', 'work', 'version', 'source')
Used by variable $names-of-elements-that-describe-textual-entities
.
Used by template ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: ('person', 'organization')
Used by variable $names-of-elements-that-describe-textual-entities
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $names-of-elements-that-describe-text-creators, $names-of-elements-that-describe-text-bearers
Used by template ŧ core-expansion-terse
.
Relies upon $names-of-elements-that-describe-text-bearers
, $names-of-elements-that-describe-text-creators
.
TAN-core-functions
Definition: ('skip', 'rename', 'equate', 'reassign')
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: ('morphology', 'inclusion', 'vocabulary', 'redivision', 'model', 'successor', 'predecessor', 'annotation')
Used by function tan:must-refer-to-external-tan-file()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $id-idrefs/tan:id-idrefs/tan:id/tan:idrefs/@element
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $id-idrefs
.
TAN-core-functions
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
.
TAN-core-functions
Definition: tan:dateTime-to-decimal(current-dateTime())
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Relies upon tan:dateTime-to-decimal()
.
TAN-core-functions
Definition: ('3gpp', '3gpp2', 'adid', 'alert', 'bbf', 'broadband-forum-org', 'cablelabs', 'ccsds', 'cgi', 'clei', 'dgiwg', 'dslforum-org', 'dvb', 'ebu', 'eidr', 'epc', 'epcglobal', 'etsi', 'eurosystem', 'example', 'fdc', 'fipa', 'geant', 'globus', 'gsma', 'hbbtv', 'ieee', 'ietf', 'iptc', 'isan', 'isbn', 'iso', 'issn', 'itu', 'ivis', 'liberty', 'mace', 'mef', 'mpeg', 'mrn', 'nato', 'nbn', 'nena', 'newsml', 'nfc', 'nzl', 'oasis', 'ogc', 'ogf', 'oid', 'oipf', 'oma', 'onf', '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.
TAN-core-functions
Definition: /
Used by variable $doc-history
, $orig-self-validated
.
Used by template ŧ core-expansion-normal
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: ('1 dev', '2018')
Used by template ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $head/tan:file-resp
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $head
.
TAN-core-functions
Definition: "
Used by function tan:errors-checked-where()
, tan:variables-checked-where()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: [ - ]
Used by template ŧ core-expansion-normal
.
Used by function tan:normalize-text()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: [_-]
Used by function tan:normalize-text()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: 'm{0,4}(cm|cd|d?c{0,3})(xc|xl|l?x{0,3})(im|ic|il|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.
TAN-core-functions
Definition: tan:expand-doc($self-resolved)
Used by template ŧ imitate-validation
.
Relies upon $self-resolved
, tan:expand-doc()
.
TAN-core-functions
Definition: tan:resolve-doc(/)
Used by variable $self-expanded
, $head
, $body
, $doc-class
, $all-ids
, $doc-id-namespace
, $doc-vocabulary
.
Relies upon tan:resolve-doc()
.
TAN-core-functions
Definition: ' '
Used by template ŧ merge-tan-docs
, ŧ dependency-adjustments-pass-1
, ŧ check-and-expand-ranges
, ŧ core-expansion-terse
, ŧ string-to-numerals
, ŧ process-appended-div
, ŧ merge-tan-docs
merge-tan-doc-leaf-divs, ŧ merge-divs
.
Used by function tan:build-parent-ref-tree()
, tan:analyze-ref-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: '#'
Used by template ŧ string-to-numerals
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: '##'
No variables, keys, functions, or named templates depend upon this xsl:variable.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $dhy
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $dhy
.
TAN-core-functions
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)
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $head
.
TAN-core-functions
Definition: for $i in $head/tan:source return tan:resolve-doc(tan:get-1st-doc($i), true(), tan:attr('src', ($i/@xml:id, '1')[1]))
Used by template ŧ check-referred-doc
.
Used by function tan:expand-doc()
.
Relies upon $head
, tan:attr()
, tan:get-1st-doc()
, tan:resolve-doc()
.
TAN-core-functions
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.
TAN-core-functions
Definition: 'ܬ?[ܩܪܫܬ]|[ܢܣܥܦܨ]'
Used by variable $syriac-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: concat($syriac-unit-regex, '?\p{Mc}?(', $syriac-hundreds-regex, '\p{Mc})?\p{Mc}?', $syriac-tens-regex, '?\p{Mc}?', $syriac-unit-regex, '\p{Mc}?|', $syriac-unit-regex, '?\p{Mc}?(', $syriac-hundreds-regex, '\p{Mc})?\p{Mc}?', $syriac-tens-regex, '\p{Mc}?', $syriac-unit-regex, '?\p{Mc}?|', $syriac-unit-regex, '?\p{Mc}?(', $syriac-hundreds-regex, '\p{Mc})\p{Mc}?', $syriac-tens-regex, '?\p{Mc}?', $syriac-unit-regex, '?\p{Mc}?')
Used by variable $nonlatin-letter-numeral-pattern
.
Relies upon $syriac-hundreds-regex
, $syriac-tens-regex
, $syriac-unit-regex
.
TAN-core-functions
Definition: '[ܝܟܠܡܢܣܥܦܨ]'
Used by variable $syriac-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: '[ܐܒܓܕܗܘܙܚܛ]'
Used by variable $syriac-letter-numeral-pattern
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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.
TAN-core-functions
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.
TAN-core-functions
Definition: 'tag:textalign.net,2015'
Used by template ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: 'tag:textalign.net,2015:ns'
Used by variable $body
.
Used by template ŧ core-expansion-terse
, ŧ check-referred-doc
.
Used by function tan:resolve-doc-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: 2020
Used by template ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ resolve-critical-dependencies-loop
, ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: false()
Used by template ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
This variable has a complex definition. See stylesheet for definiton.
Used by variable $TAN-feature-vocabulary
, $all-vocabularies
, $TAN-vocabularies-vocabulary
, $extra-vocabulary-files
, $token-definitions-reserved
.
Used by template ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ resolve-critical-dependencies-loop
, ŧ first-stamp-shallow-copy
.
Relies upon $TAN-vocabulary-files
, ŧ expand-standard-tan-voc
.
TAN-core-functions
Definition: $TAN-vocabularies[tan:TAN-voc/tan:body[@affects-element = 'vocabulary']]
Used by variable $extra-vocabulary-files
.
Relies upon $TAN-vocabularies
.
TAN-core-functions
Definition: collection('../../vocabularies/collection.xml')
Used by variable $TAN-vocabularies
.
Used by template ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: 'http://www.tei-c.org/ns/1.0'
Used by function tan:resolve-doc-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: $token-definitions-reserved[1]
Used by template ŧ dependency-adjustments-pass-2
, ŧ mark-dependencies-pass-1
, ŧ core-expansion-terse
.
Used by function tan:tokenize-text()
.
Relies upon $token-definitions-reserved
.
TAN-core-functions
Definition: $token-definitions-reserved[../tan:name = 'letters and punctuation']
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $token-definitions-reserved
.
TAN-core-functions
Definition: $token-definitions-reserved[../tan:name = 'letters only']
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $token-definitions-reserved
.
TAN-core-functions
Definition: $token-definitions-reserved[../tan:name = 'nonspace']
No variables, keys, functions, or named templates depend upon this xsl:variable.
Relies upon $token-definitions-reserved
.
TAN-core-functions
Definition: $TAN-vocabularies//tan:token-definition
Used by variable $token-definition-letters-only
, $token-definition-letters-and-punctuation
, $token-definition-nonspace
, $token-definition-default
.
Relies upon $TAN-vocabularies
.
TAN-core-functions
Definition: ('terse', 'normal', 'verbose')
Used by function tan:expand-doc()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition: tan:get-and-resolve-dependency($head/(tan:vocabulary, tan:key[tan:location]))
Used by variable $all-vocabularies
.
Used by template ŧ check-referred-doc
.
Relies upon $head
, tan:get-and-resolve-dependency()
.
TAN-core-functions
Definition:
Used by variable $special-end-div-chars
.
Used by template ŧ infuse-tokenized-div-end-check
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Definition:
Used by variable $special-end-div-chars
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Looks for elements matching @*
Used by variable $all-ids
.
Used by template ŧ core-expansion-terse-attributes
.
Used by function tan:expand-doc()
, tan:resolve-doc-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Looks for elements matching *
Used by template ŧ apply-inclusions-and-adjust-vocabulary
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Looks for elements matching *
Used by function tan:resolve-doc-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Looks for elements matching tan:item
Used by template ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
Looks for elements matching *
Used by template ŧ class-2-expansion-terse
class-2-expansion-terse-for-validation.
Used by function tan:get-via-q-ref()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:aaa-to-int($arg as xs:string*) as xs:integer*
Input: any numerals in the supported letter numeral system
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
.
Option 1 (TAN-core-functions)
tan:all-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 ŧ tan-a-lm-expansion-terse
.
Used by function tan:all-conditions-hold()
.
Relies upon tan:all-conditions-hold()
.
Option 2 (TAN-core-functions)
tan:all-conditions-hold($element-with-condition-attributes as element()?, $context-to-evaluate-against as item()*, $evaluation-sequence as xs:string*, $default-value as xs:boolean) as xs:boolean
Input: a TAN element with attributes that should be checked for their truth value; a context against which to check the values; an optional sequence of strings indicates the names of elements that should be processed and in what order; a boolean indicating what value to return by default
Output: true, if every condition holds; false otherwise
If no conditions are found, the output reverts to the default
Used by template ŧ tan-a-lm-expansion-terse
.
Used by function tan:all-conditions-hold()
.
Relies upon tan:all-conditions-hold-evaluation-loop()
.
TAN-core-functions
tan:all-conditions-hold-evaluation-loop($elements-with-condition-attributes-to-be-evaluated as element()*, $context-to-evaluate-against as item()*, $current-value as xs:boolean) as xs:boolean
Companion function to the one above, indicating whether every condition holds
This loop function iterates through elements with condition attributes and checks each against the context; if a false is found, the loop ends returning false; if no conditions are found the default value is returned; otherwise it returns true
We use a loop function to avoid evaluating conditions that might be time-consuming
Used by function tan:all-conditions-hold()
, tan:all-conditions-hold-evaluation-loop()
.
Relies upon tan:all-conditions-hold-evaluation-loop()
, ŧ evaluate-conditions
.
TAN-core-functions
tan:analyze-numbers-in-string($string-to-analyze as xs:string, $ambig-is-roman as xs:boolean?, $n-alias-items as element()*) as element()*
Companion function to tan:string-to-numerals()
, to analyze the string as an XML
fragment
Used by template ŧ class-1-expansion-verbose-pass-2
, ŧ core-expansion-terse
.
Used by function tan:string-to-numerals()
.
Relies upon ŧ string-to-numerals
.
TAN-core-functions
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()
Output: each<ref>
is supplied with any missing, and calculable,<n>
s
This function takes a string such as "1.3-5, 8, 4.2-3" and converts it to "1.3, 1.5, 1.8, 4.2, 4.3"
If the function moves from one<ref>
to one with greater than or equal number of<n>
s, the new one becomes the context; otherwise, the new<ref>
attracts from the context any missing<n>
s at its head
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 ŧ dependency-adjustments-pass-1
, ŧ core-expansion-terse-attributes-to-elements
, ŧ core-expansion-terse
.
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()
three-parameter version of the fuller function below
Used by template ŧ dependency-adjustments-pass-1
, ŧ core-expansion-terse-attributes-to-elements
, ŧ core-expansion-terse
.
Used by function tan:analyze-sequence()
.
Relies upon tan:analyze-sequence()
.
Option 3 (TAN-core-functions)
tan:analyze-sequence($sequence-string as xs:string?, $name-of-attribute as xs:string?, $expand-ranges as xs:boolean, $ambig-is-roman as xs:boolean?) as element()
Input: any string representing a sequence; the name of the attribute that held the sequence (default 'ref'); should ranges should be expanded?; are ambiguous numerals roman?
Output:<analysis>
with an expansion of the sequence placed in children elements that have the name of the second parameter (with@attr
); those children have@from
or@to
if part of a range.
If a sequence has a numerical value no numerals other than Arabic should be used. That means@pos
and@chars
in their original state, but also if@n
, then it needs to have been normalized to Arabic numerals before entering this function
The exception is @ref
, which cannot be accurately converted to Arabic numerals
before being studied in the context of a class 1 source
This function expands only those@refs
that are situated within an<adjustments>
, which needs to be calculated before being applied to a class 1 source.
If this function is asked to expand ranges within a@ref
sequence, it will do so under the strict assumption that all ranges consist of numerically calculable sibling@ns
that share the same mother reference.
Matt 1 4-7 is ok. These are not: Matt-Mark, Matt 1:3-Matt 2, Matt 1:3-4:7
If a request for help is detected, the flag will be removed and @help
will be inserted
in the appropriate child element.
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 input numerals and strings.
Used by template ŧ dependency-adjustments-pass-1
, ŧ core-expansion-terse-attributes-to-elements
, ŧ core-expansion-terse
.
Used by function tan:analyze-sequence()
.
Relies upon tan:analyze-ref-loop()
, tan:analyze-sequence()
, tan:help-extracted()
, tan:normalize-sequence()
, tan:string-to-numerals()
, ŧ check-and-expand-ranges
.
TAN-core-functions
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-core-functions
tan:attr($attribute-name as xs:string?, $attribute-value as xs:string?) as attribute()?
Input: two strings
Output: an attribute by the name of the first string, with the value of the second
Used by variable $annotations-resolved
, $see-alsos-resolved
, $predecessors-resolved
, $successors-resolved
, $redivisions-resolved
, $model-resolved
, $sources-resolved
, $morphologies-resolved
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:attribute-vocabulary($attributes as attribute()*) as element()*
Input: attributes, assumed to be still tethered to their resolved document context
Output: the vocabulary items for that element's attributes (@which
, etc.)
See full tan:vocabulary()
function below
Used by template ŧ core-expansion-terse
.
Used by function tan:element-vocabulary()
, tan:attribute-vocabulary()
.
Relies upon tan:attribute-vocabulary()
, tan:base-uri()
, tan:distinct-items()
, tan:normalize-name()
, tan:shallow-copy()
, tan:takes-idrefs()
, tan:target-element-names()
, tan:vocabulary()
, ŧ remove-inclusions
.
TAN-core-functions
tan:base-uri($any-node as node()?) as xs:anyURI
Input: any node
Output: the base uri of the node's document
An explicit@xml:base
has the highest priority over any nativebase-uri()
. If the node is a fragment and has no declared or detected base uri, thestatic-base-uri()
will be returned
Used by template ŧ resolve-critical-dependencies-loop
, ŧ check-referred-doc
, ŧ uri-relative-to
, ŧ resolve-href
expand-standard-tan-voc, ŧ resolve-href
first-stamp-shallow-copy.
Used by function tan:lm-data()
, tan:resolve-href()
, tan:resolve-doc-loop()
, tan:collection()
, tan:catalog-uris()
, tan:attribute-vocabulary()
, tan:cfn()
, tan:cfne()
, tan:get-1st-doc()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:catalog-uris($input-node as node()?) as xs:string*
Input: a node from an XML file
Output: URLs for locally available TAN catalog files, beginning with the immediate subdirectory and proceeding rootward
Used by variable $doc-catalog-uris
.
Used by function tan:catalogs()
.
Relies upon tan:base-uri()
.
TAN-core-functions
tan:catalogs($input-node as node()?, $strip-bad-hrefs as xs:boolean) as document-node()*
Input: a node from an XML file; a boolean indicating whether bad @hrefs
should be
stripped
Output: the TAN catalog documents available, beginning with the most local path and proceeding rootward
Used by variable $doc-catalogs
.
Used by template ŧ check-referred-doc
, ŧ core-expansion-verbose
.
Relies upon tan:catalog-uris()
, tan:is-valid-uri()
, ŧ cut-faulty-hrefs
.
TAN-core-functions
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, or of the input string if detected as a uri
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:base-uri()
.
TAN-core-functions
tan:cfne($item as item()*) as xs:string*
Input: any items
Output: the Current File Name, with Extension, of the host document node of each item, or of the input string if detected as a uri
Used by variable $doc-filename
.
Relies upon tan:base-uri()
.
TAN-core-functions
tan:class-number($nodes as node()*) as xs:integer*
Input: any nodes of a TAN document
Output: one integer per node, specifying the TAN class for the file, 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:must-refer-to-external-tan-file()
, tan:expand-doc()
, tan:resolve-doc-loop()
, tan:get-1st-doc()
.
Relies upon $tan-classes
, tan:tan-type()
.
TAN-core-functions
tan:collate-pair-of-sequences($string-sequence-1 as xs:string*, $string-sequence-2 as xs:string*) as element()*
Input: two sequences of strings
Output: an element sequence that collates the two sequences as a single sequence, attempting to preserve the longest common subsequence.
This function has been written for two different scenarios: 1.@n
values in two sets of<div>
s that must be collated; 2. pre-processing two long strings that need to be compared. Although the primary context are two sets of unique string-sequences, one could imagine situations where one or both input strings have repetition, in which case it is best to retain information about the sequence. Hence the output is a sequence of elements, with@p1
,@p2
, or both signifying the position of the original input. Hence the transformation is lossless, and the original input can be reconstructed if needed.
Used by function tan:collate-pair-of-sequences()
, tan:collate-sequence-loop()
, tan:diff()
.
Relies upon tan:collate-pair-of-sequences()
, tan:longest-ascending-subsequence()
.
TAN-core-functions
tan:collate-sequence-loop($elements-with-elements as element()*, $results-so-far as xs:string*) as xs:string*
This companion function to tan:collate-sequences()
takes a pair of sequences and
merges them.
Used by function tan:collate-sequences()
, tan:collate-sequence-loop()
.
Relies upon tan:collate-pair-of-sequences()
, tan:collate-sequence-loop()
.
TAN-core-functions
tan:collate-sequences($elements-with-elements as element()*) as xs:string*
Input: a series of elements with child elements that have text nodes, representing sequences of string sequences
Output: a series of strings representing the sequences, collated
Used by function tan:group-divs()
, tan:collate-sequences()
.
Relies upon tan:collate-sequence-loop()
, tan:collate-sequences()
.
Option 1 (TAN-core-functions)
tan:collection($catalog-docs as document-node()*) as document-node()*
One-parameter version of the master one, below
Used by template ŧ core-expansion-verbose
.
Used by function tan:collection()
.
Relies upon tan:collection()
.
Option 2 (TAN-core-functions)
tan:collection($catalog-docs as document-node()*, $root-names as xs:string*, $id-matches as xs:string?, $href-matches as xs:string?) as document-node()*
Input: one or more catalog.tan.xml files; filtering parameters
Output: documents that are available
Used by template ŧ core-expansion-verbose
.
Used by function tan:collection()
.
Relies upon tan:base-uri()
, tan:error()
.
TAN-core-functions
tan:copy-indentation($items-to-indent as item()*, $model-element as element()) as item()*
Input: items that should be indented; an element whose indentation should be imitated
Output: the items, indented according to the pattern
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:indent-value()
, ŧ indent-items
.
Option 1 (TAN-core-functions)
tan:copy-of($doc-fragment as item()*) as item()*
1-parameter version of function below
No variables, keys, functions, or named templates depend upon this xsl:function.
Does not rely upon global variables, keys, functions, or templates.
Option 2 (TAN-core-functions)
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 ŧ mark-reassigns
, ŧ apply-inclusions-and-adjust-vocabulary
, ŧ core-expansion-normal
, ŧ class-1-expansion-verbose-pass-1
.
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 sources, where realigned divs could be extracted from their source documents
Used by template ŧ mark-reassigns
, ŧ apply-inclusions-and-adjust-vocabulary
, ŧ core-expansion-normal
, ŧ class-1-expansion-verbose-pass-1
.
Used by function tan:copy-of()
, tan:copy-of-except()
.
Relies upon ŧ copy-of-except
.
TAN-core-functions
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-to-elements
, ŧ get-doc-history
.
Used by function tan:most-recent-dateTime()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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
Used by template ŧ merge-tan-docs
, ŧ check-referred-doc
, ŧ core-expansion-terse
.
Used by function tan:merge-anas()
, tan:vocabulary()
, tan:attribute-vocabulary()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:doc-id-namespace($TAN-doc as item()?) as xs:string?
Input: an item from a TAN file
Output: the namespace of the doc's @id
Used by variable $doc-id-namespace
.
Used by template ŧ core-expansion-terse
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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 variable $duplicate-ids
, $duplicate-head-iris
.
Used by template ŧ core-expansion-terse-attributes
, ŧ dependency-adjustments-pass-2
, ŧ class-2-expansion-terse
class-2-expansion-terse-for-validation, ŧ core-expansion-terse
, ŧ catalog-expansion-terse
, ŧ dependency-adjustments-pass-1
core-expansion-terse.
Used by function tan:duplicate-values()
, tan:group-elements-by-shared-node-values()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:duplicate-values($sequence as item()*) as item()*
synonym for tan:duplicate-items()
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Relies upon tan:duplicate-items()
.
TAN-core-functions
tan:element-fingerprint($element as element()*) as xs:string*
Input: any elements
Output: for each element the string value of its name, its namespace, its attributes, and all descendant nodes
This function is useful for determining whether any number of elements are deeply equal
The built-in function deep-equal()
works for pairs of elements; this looks for a way
to evaluate sequences of elements
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon ŧ element-fingerprint
.
TAN-core-functions
tan:element-vocabulary($element as element()*) as element()*
Input: elements, assumed to be tethered to their resolved document context
Output: the vocabulary items for that element's attributes (@which
, etc.)
See full tan:vocabulary()
function below
Used by template ŧ check-referred-doc
, ŧ apply-inclusions-and-adjust-vocabulary
, ŧ core-expansion-terse
.
Used by function tan:get-and-resolve-dependency()
, tan:get-1st-doc()
.
Relies upon tan:attribute-vocabulary()
.
TAN-core-functions
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
,@chars
), 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'.
This function assumes that all numerals are Arabic.
Used by template ŧ core-expansion-terse-attributes-to-elements
, ŧ check-and-expand-ranges
, ŧ mark-dependencies-pass-2-for-validation
, ŧ evaluate-conditions
.
Relies upon tan:normalize-sequence()
.
TAN-core-functions
tan:expand-pos-or-chars($elements as element()*, $max as xs:integer?) as xs:integer*
Input: any elements that are<pos>
or<chars>
; an integer value for 'max'
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 ŧ expand-reassigns
, ŧ mark-tok-pos
, ŧ mark-dependencies-pass-2
, ŧ mark-tok-chars
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:first-loc-available($element-with-href-in-self-or-descendants as element()?) as xs:string?
Input: An element that is or 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()
, tan:first-loc-available-loop()
.
Relies upon tan:first-loc-available-loop()
.
TAN-core-functions
tan:first-loc-available-loop($href-attributes as attribute()*, $loop-counter as xs:integer) as xs:string?
Used by function tan:first-loc-available()
, tan:first-loc-available-loop()
.
Relies upon $internet-available
, tan:first-loc-available()
, tan:first-loc-available-loop()
, tan:url-is-local()
.
TAN-core-functions
tan:get-1st-doc($TAN-elements as element()*) as document-node()*
Input: any TAN elements naming files (e.g.,<source>
,<see-also>
,<inclusion>
,<vocabulary>
Output: the first document available for each element, plus any relevant error messages.
Used by variable $annotations-1st-da
, $see-alsos-1st-da
, $predecessors-1st-da
, $successors-1st-da
, $redivisions-1st-da
, $model-1st-da
, $extra-vocabulary-files
, $sources-resolved
, $morphologies-resolved
.
Used by template ŧ resolve-critical-dependencies-loop
, ŧ core-expansion-terse
, ŧ class-2-expansion-verbose
, ŧ check-referred-doc
, ŧ class-1-expansion-verbose-pass-1
, ŧ core-expansion-normal
.
Used by function tan:get-and-resolve-dependency()
, tan:get-1st-doc()
.
Relies upon $internet-available
, tan:base-uri()
, tan:class-number()
, tan:element-vocabulary()
, tan:error()
, tan:first-loc-available()
, tan:get-1st-doc()
, tan:resolve-href()
, tan:shallow-copy()
, tan:tan-type()
, tan:uri-relative-to()
, tan:url-is-local()
, tan:xml-to-string()
, ŧ resolve-href
.
TAN-core-functions
tan:get-doc-history($TAN-doc as document-node()*) as element()*
Input: any TAN document
Output: a sequence of elements with@when
,@ed-when
,@accessed-when
,@claim-when
, 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 variable $doc-history
.
Used by template ŧ check-referred-doc
, ŧ core-expansion-normal
.
Used by function tan:last-change-agent()
.
Relies upon ŧ get-doc-history
.
TAN-core-functions
tan:get-via-q-ref($q-ref as xs:string*, $q-reffed-document as document-node()*) as node()*
Input: any number of q-refs, any number of q-reffed documents
Output: the elements corresponding to the q-refs
This function is used by the core validation routine, mainly to find errors in expanded output
Used by template ŧ imitate-validation
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:group-divs-by-ref($elements-to-group as element()*) as element()*
One-parameter version of the fuller one below.
Used by template ŧ merge-tan-docs
.
Relies upon tan:group-elements-by-shared-node-values()
.
TAN-core-functions
tan:group-elements-by-IRI($elements-to-group as element()*) as element()*
One-parameter version of the fuller one below.
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:group-elements-by-shared-node-values()
.
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-normal
, ŧ core-expansion-terse
.
Used by function tan:group-elements-by-shared-node-values()
, tan:group-elements-by-IRI()
, tan:group-divs-by-ref()
, tan:group-divs()
.
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()*
Two-parameter version of the fuller one below
Used by template ŧ core-expansion-normal
, ŧ core-expansion-terse
.
Used by function tan:group-elements-by-shared-node-values()
, tan:group-elements-by-IRI()
, tan:group-divs-by-ref()
, tan:group-divs()
.
Relies upon tan:group-elements-by-shared-node-values()
.
Option 3 (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?, $group-by-shallow-node-value as xs:boolean) 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. 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 directly share children values.
Used by template ŧ core-expansion-normal
, ŧ core-expansion-terse
.
Used by function tan:group-elements-by-shared-node-values()
, tan:group-elements-by-IRI()
, tan:group-divs-by-ref()
, tan:group-divs()
.
Relies upon tan:duplicate-items()
, tan:group-elements-by-shared-node-values()
, tan:group-elements-by-shared-node-values-loop()
, ŧ build-grouping-key
.
TAN-core-functions
tan:group-elements-by-shared-node-values-loop($items-to-group as element()*, $groups-so-far as element()*, $loop-count as xs:integer) as element()*
supporting loop for the function 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-core-functions
tan:indent-value($elements as element()*) as xs:integer*
Input: elements
Output: the length of their indentation
Used by function tan:copy-indentation()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:insert-as-first-child($items-to-be-changed as item()*, $items-to-insert-as-first-child as item()*, $names-of-elements-to-receive-action as xs:string*) as item()*
Input: items to be changed; items to be inserted; strings representing the names of the elements that should receive the insertion
Output: the first items, with the second items inserted in the appropriate place
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon ŧ insert-content
.
TAN-core-functions
tan:insert-as-last-child($items-to-be-changed as item()*, $items-to-insert-as-last-child as item()*, $names-of-elements-to-receive-action as xs:string*) as item()*
Input: items to be changed; items to be inserted; strings representing the names of the elements that should receive the insertion
Output: the first items, with the second items inserted in the appropriate place
This function was written in service to a 2019 version of tan:vocabulary()
, to allow
deeply nested vocabulary items to receive select insertions
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon ŧ insert-content
.
TAN-core-functions
tan:is-valid-uri($uri-to-check as xs:string?) as xs:boolean?
Input: a string
Output: a boolean indicating whether the string is syntactically a valid uri
This assumes not only absolute but relative uris will be checked, which means that a wide variety of characters could be fed in, but not ones disallowed in pathnames, and the string must not be zero length.
Used by template ŧ first-stamp-shallow-copy
, ŧ check-referred-doc
, ŧ resolve-critical-dependencies-loop
.
Used by function tan:uri-relative-to()
, tan:catalogs()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:last-change-agent($TAN-doc as document-node()*) as element()*
Input: any TAN document
Output: the<person>
,<organization>
, or<algorithm>
who made the last change
Used by template ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ check-referred-doc
, ŧ core-expansion-terse
.
Relies upon tan:get-doc-history()
, tan:vocabulary()
.
TAN-core-functions
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 $alphabet-numeral-key
, $arabic-indic-numeral-pattern
, tan:ara-to-int()
.
TAN-core-functions
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.
Templates will be placed in the appropriate function file, e.g., class 1 merge templates are in TAN-class-1-functions.xsl
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<adjustments>
have already been performed.
Class 2 merging: TBD
Class 3 merging: TBD
NB: Class 1 files must have their hierarchies in proper order; use reset-hierarchy beforehand if you're unsure
Used by template ŧ class-1-expansion-verbose-pass-1
.
Relies upon ŧ merge-tan-docs
.
TAN-core-functions
tan:most-common-item-count($sequence as item()*) as xs:integer?
Input: any sequence of items
Output: the count of the first item that appears most frequently
If two or more items appear equally frequently, only the first is returned
Written to help group<u>
elements intan:collate()
Used by function tan:collate()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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-core-functions
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 $names-of-elements-that-must-always-refer-to-tan-files
, tan:class-number()
.
TAN-core-functions
tan:node-before($node-sequence-1 as node()+, $node-sequence-2 as node()+) as xs:boolean
Input: two sequences of nodes
Output: a boolean indicating whether one of the nodes in the first sequence precedes all the nodes of the second
Used by template ŧ class-2-expansion-terse
class-2-expansion-terse-for-validation.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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 and sequenced into items; items that are ranges will have the beginning and end points separated by ' - '
Note, this function does not analyze or convert types of numerals, and all help requests are left intact; the function is most effective if numerals have been converted to Arabic ahead of time
Here we're targetingtan:analyze-elements-with-numeral-attributes()
template mode arabic-numerals, prelude totan:sequence-expand()
,tan:normalize-refs()
Used by function tan:analyze-sequence()
, tan:normalize-sequence()
, tan:expand-numerical-sequence()
.
Relies upon $names-of-attributes-that-are-case-indifferent
, $names-of-attributes-that-may-take-multiple-space-delimited-values
, tan:normalize-sequence()
.
TAN-core-functions
tan:ordinal($in as xs:integer*) as xs:string*
Input: one or more numerals
Output: one or more strings with the English form of the ordinal form of the input number
Example: (1, 4, 17) -> ('first', 'fourth', '17th')
Used by template ŧ class-2-expansion-terse
class-2-expansion-terse-for-validation.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:path($nodes as node()*) as xs:string*
Input: any nodes
Output: the path of each node
Used by template ŧ dependency-adjustments-pass-1
, ŧ core-expansion-terse-attributes-to-elements
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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-core-functions
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-core-functions
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 template ŧ core-expansion-terse-attributes-to-elements
, ŧ check-and-expand-ranges
, ŧ mark-dependencies-pass-2-for-validation
, ŧ mark-dependencies-pass-2
.
Used by function 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 template ŧ core-expansion-terse-attributes-to-elements
, ŧ check-and-expand-ranges
, ŧ mark-dependencies-pass-2-for-validation
, ŧ mark-dependencies-pass-2
.
Used by function tan:sequence-error()
.
Relies upon tan:error()
.
Option 1 (TAN-core-functions)
tan:shallow-copy($items as item()*) as item()*
one-parameter version of the fuller one, below
Used by template ŧ dependency-adjustments-pass-2
, ŧ mark-dependencies-pass-1
, ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ resolve-critical-dependencies-loop
, ŧ mark-dependencies-for-validation
, ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ class-1-expansion-verbose-pass-2
, ŧ mark-reassigns
, ŧ resolve-href
expand-standard-tan-voc, ŧ first-stamp-shallow-skip
, ŧ tan-a-lm-expansion-terse
.
Used by function tan:shallow-copy()
, tan:attribute-vocabulary()
, tan:get-1st-doc()
, tan:error()
.
Relies upon tan:shallow-copy()
.
Option 2 (TAN-core-functions)
tan:shallow-copy($items as item()*, $depth as xs:integer) as item()*
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-adjustments-pass-2
, ŧ mark-dependencies-pass-1
, ŧ core-expansion-terse
dependency-adjustments-pass-1, ŧ resolve-critical-dependencies-loop
, ŧ mark-dependencies-for-validation
, ŧ check-referred-doc
, ŧ core-expansion-terse
, ŧ class-1-expansion-verbose-pass-2
, ŧ mark-reassigns
, ŧ resolve-href
expand-standard-tan-voc, ŧ first-stamp-shallow-skip
, ŧ tan-a-lm-expansion-terse
.
Used by function tan:shallow-copy()
, tan:attribute-vocabulary()
, tan:get-1st-doc()
, tan:error()
.
Relies upon ŧ shallow-copy
.
Option 1 (TAN-core-functions)
tan:stamp-q-id($items-to-stamp as item()*) as item()*
1-param version of the full one below
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Used by function tan:stamp-q-id()
.
Relies upon tan:stamp-q-id()
.
Option 2 (TAN-core-functions)
tan:stamp-q-id($items-to-stamp as item()*, $stamp-shallowly as xs:boolean) as item()*
Input: any XML fragments
Output: the fragments with@q
added to each element viagenerate-id()
Used by template ŧ core-expansion-terse-attributes-to-elements
.
Used by function tan:stamp-q-id()
.
Relies upon ŧ stamp-q-id
.
TAN-core-functions
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 ŧ check-and-expand-ranges
, ŧ resolve-numerals
, ŧ class-1-expansion-verbose-pass-2
.
Used by function tan:string-to-numerals()
, tan:analyze-sequence()
, 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?, $n-alias-items as element()*) 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 ŧ check-and-expand-ranges
, ŧ resolve-numerals
, ŧ class-1-expansion-verbose-pass-2
.
Used by function tan:string-to-numerals()
, tan:analyze-sequence()
, tan:string-to-int()
.
Relies upon tan:analyze-numbers-in-string()
.
TAN-core-functions
tan:takes-idrefs($attributes as attribute()+) as xs:boolean+
Input: any attributes
Output: booleans, whether it takes idrefs or not
Used by function tan:attribute-vocabulary()
.
Relies upon tan:target-element-names()
.
TAN-core-functions
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 template ŧ check-referred-doc
.
Used by function tan:expand-doc()
, tan:class-number()
, tan:get-1st-doc()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
tan:target-element-names($items as item()*) as xs:string*
Input: any strings, attributes, or elements
Output: the names of the elements pointed to, if the name or the value of the input is the name of an element or attribute that takes idrefs
Used by template ŧ core-expansion-terse-attributes
, ŧ core-expansion-terse
.
Used by function tan:resolve-doc-loop()
, tan:attribute-vocabulary()
, tan:takes-idrefs()
.
Relies upon $id-idrefs
.
TAN-core-functions
tan:trim-long-text($xml-fragment as item()*, $too-long as xs:integer) as item()*
Input: an XML fragment; an integer
Output: the fragment with text nodes longer than the integer value abbreviated with an ellipsis
Used by function tan:collate()
, tan:diff()
, tan:diff-outer-loop()
, tan:diff-inner-loop()
, tan:collate-loop-outer()
.
Relies upon ŧ trim-long-text
.
TAN-core-functions
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-core-functions
tan:uri-is-relative($uri-to-test as xs:string?) as xs:boolean?
Input: a string representing a URI
Output: a boolean indicating whether it is relative
No variables, keys, functions, or named templates depend upon this xsl:function.
Relies upon tan:uri-is-resolved()
.
TAN-core-functions
tan:uri-is-resolved($uri-to-test as xs:string?) as xs:boolean?
Input: a string representing a URI
Output: a boolean indicating whether it is resolved
Used by function tan:uri-is-relative()
.
Does not rely upon global variables, keys, functions, or templates.
Option 1 (TAN-core-functions)
tan:uri-relative-to($uri-to-revise as xs:string?, $uri-to-revise-against as xs:string?) as xs:string?
2-parameter version of the one below
Used by template ŧ check-referred-doc
, ŧ uri-relative-to
, ŧ core-expansion-terse-attributes-to-elements
, ŧ revise-hrefs
.
Used by function tan:uri-relative-to()
, tan:get-1st-doc()
.
Relies upon tan:uri-relative-to()
.
Option 2 (TAN-core-functions)
tan:uri-relative-to($uri-to-revise as xs:string?, $uri-to-revise-against as xs:string?, $base-uri as xs:string?) as xs:string?
Input: two strings representing URIs; a third representing the base against which the first two should be resolved
Output: the first string in a form 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 ŧ check-referred-doc
, ŧ uri-relative-to
, ŧ core-expansion-terse-attributes-to-elements
, ŧ revise-hrefs
.
Used by function tan:uri-relative-to()
, tan:get-1st-doc()
.
Relies upon tan:is-valid-uri()
, tan:uri-relative-to()
.
TAN-core-functions
tan:url-is-local($url-to-test as xs:string?) as xs:boolean
Used by template ŧ core-expansion-terse-attributes-to-elements
, ŧ check-referred-doc
.
Used by function tan:get-1st-doc()
, tan:first-loc-available-loop()
.
Does not rely upon global variables, keys, functions, or templates.
TAN-core-functions
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:vocabulary($target-element-names as xs:string*, $target-values as xs:string*) as element()*
2-param version of fuller one below
Used by variable $doc-vocabulary
.
Used by template ŧ core-expansion-terse
, ŧ core-expansion-terse-attributes
, ŧ mark-dependencies-pass-1
, ŧ tan-a-lm-expansion-terse
.
Used by function tan:vocabulary()
, tan:attribute-vocabulary()
, tan:last-change-agent()
.
Relies upon $doc-vocabulary
, tan:vocabulary()
.
Option 2 (TAN-core-functions)
tan:vocabulary($target-element-names as xs:string*, $target-values as xs:string*, $resolved-vocabulary-ancestors as element()*) as element()*
Input: two sequences of zero or more strings; a sequence of elements representing the ancestor of vocabulary in a resolved TAN file
Output: the vocabulary items for the particular elements whose names match the first sequence and whose id, alias, or name values match the second sequence, found in descendants of the elements provided by the third sequence
If either of the first two sequences are empty, or have an *, it is assumed that all possible values are sought. Therefore if the first two parameters are empty, the entire vocabulary will be returned
The second parameter is assumed to have one value per item in the sequence. This is
mandatory because it is designed to take two different types of values: @which
(which is a
single value and permits spaces) and other attributes (which can be multiple values, and
spaces delimit values)
If you approach this function with an attribute that points to elements, and you must
first to retrieve that attribute's elements, you should run
tan:target-element-names()
beforehand to generate a list of element names that should be targeted
It is assumed that the elements are the result of a fully resolved TAN file.
If a value matches id or alias, no matches on name will be sought (locally redefined ids override name values)
This function does not mark apparant errors, e.g., vocabulary items missing, or more than one for a single value
If you are trying to work with vocabulary from an included document, the
$resolved-vocabulary-ancestors
should point exclusively to content (not self) of the appropriate resolved
tan:include
Used by variable $doc-vocabulary
.
Used by template ŧ core-expansion-terse
, ŧ core-expansion-terse-attributes
, ŧ mark-dependencies-pass-1
, ŧ tan-a-lm-expansion-terse
.
Used by function tan:vocabulary()
, tan:attribute-vocabulary()
, tan:last-change-agent()
.
Relies upon tan:distinct-items()
, tan:normalize-name()
, tan:vocabulary()
, ŧ vocabulary-all-vals
, ŧ vocabulary-by-id
, ŧ vocabulary-by-name
.
Option 1 (TAN-core-functions)
tan:xml-to-string($fragment as item()*) as xs:string?
Used by template ŧ mark-dependencies-pass-1
, ŧ mark-dependencies-for-validation
, ŧ tan-a-lm-expansion-terse
, ŧ class-1-expansion-verbose-pass-3
, ŧ core-expansion-normal
.
Used by function tan:xml-to-string()
, tan:expand-doc()
, tan:get-1st-doc()
.
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 a proxy of serialize()
, used to represent XML fragments in plain
text, useful in validation reports or in generating guidelines
Used by template ŧ mark-dependencies-pass-1
, ŧ mark-dependencies-for-validation
, ŧ tan-a-lm-expansion-terse
, ŧ class-1-expansion-verbose-pass-3
, ŧ core-expansion-normal
.
Used by function tan:xml-to-string()
, tan:expand-doc()
, tan:get-1st-doc()
.
Relies upon ŧ fragment-to-text
.