TAN-mor elements and attributes summarized

The element assert names a pattern that, if found to be false in any <m> in a dependent TAN-LM file, will return the enclosed message upon validation of the dependent file, along with an error or warning. Modeled on Schematron <report>.

Formal Definition
~test-pattern

Used by: ~TAN-R-mor-body

[Caution]Caution

@feature-test and @context must point to one or more feature @codes or @xml:ids a space or +

The element category groups a set of features that share a common grammatical trait such as gender, number, etc.

Formal Definition
~ed-stamp?, 
   (~inclusion | 
      (<comment>* & (<feature>, <feature>+)))

Used by: ~category-list

The element feature names, through its IRI + name pattern, a grammatical feature or concept (e.g., plural, subjunctive, 1st person) that is part of a language. In the context of <feature> a @code is always included. The first <feature> of a <category> never has @code, and refers to the grammatical feature that characterizes the category.

See main.xml# keywords-feature for a list of standard features, derived from OLiA.

Formal Definition
~feature-pattern~feature-pattern-no-code

Used by: ~feature-list, ~category

[Caution]Caution

Every <feature> inclusion must support every language that has been declared.


The element report names a pattern that, if found to be true in any <m> in a dependent TAN-LM file, will return the enclosed message upon validation of the dependent file, along with an error or warning. Modeled on Schematron <report>.

Formal Definition
~test-pattern

Used by: ~TAN-R-mor-body

[Caution]Caution

@feature-test and @context must point to one or more feature @codes or @xml:ids a space or +

The element TAN-mor specifies that the TAN file contains definitions for the parts of speech for a language, the codes for those parts, and the rules for combining them. Root element.

Formal Definition
~TAN-root
[Important]Important

Every validated TAN file will include the following message at its root. This version of TAN is unstable and unpublished. Use it at your own risk.


The attribute code contains a string that serves as an identifier for <feature>.

Formal Definition
string (pattern [^\-\+\s]|[^\+\s]+)

Used by: ~feature-pattern

[Caution]Caution

Codes for (@xml:id or @code) features must be case-indifferently unique within a given category.


The attribute context specifies under what conditions a particular <assert> or <report> should be enforced. When an <m> in a dependent TAN-LM file is validated, if it contains the codes for the features in question, the other conditions of the <assert> or <report> will be checked; otherwise, the <assert> or <report> will be ignored.

Formal Definition

Used by: ~test-pattern

[Caution]Caution

@feature-test and @context must point to one or more feature @codes or @xml:ids a space or +

The attribute feature-qty-test specifies a range or sequence of integers (e.g., 2-4). If the quantity of features in an <m> matches a number from that sequence, the condition is true, and false otherwise. If the keyword 'last' or 'max' is used, the number of features will be substituted.

This test is useful for non-category based languages to put a limit on the number of features that can be declared in an <m>. It is one of four tests for determining the truth value that will determine whether a <report> or <assert> will be acted upon.

Formal Definition
string (pattern ((last|max|all|\*)|((last|max)-\d+)|(\d+))(\s*-\s*(((last|max))|((last|max)-\d+)|(\d+)))?(\s*[, ]\s*(((last|max))|((last|max)-\d+)|(\d+))(\s+-\s+(((last|max))|((last|max)-\d+)|(\d+)))?)*|.*\?\?\?.*)

Used by: ~test-pattern

[Caution]Caution

Sequences may not include values less than 1.

[Caution]Caution

Sequences may not include values greater than the maximum allowed.

[Caution]Caution

Sequences may not include ranges that go from a larger value to a smaller, e.g., 4 - 2.

The attribute feature-test specifies one or more features separated by spaces or the padded + (a plus sign with surrounding spaces). A plain space is treated as meaning "or" and the padded + as meaning "and." If there is at least one match between the list and the value of the codes in an <m> then the condition will be treated as true. The padded plus sign specifies that all the items need to be found in the <m>.

For example, feature-test="A B + C D + E" means that the condition will be true for a given <m> only if that <m> has A or B and C or D and E present as values. This test is one of four tests for determining the truth value that will trigger the message in a <report> or <assert>

Formal Definition
string (pattern [^\s\+]+(\s(\+\s)?[^\s\+]+)*)

Used by: ~test-pattern

[Caution]Caution

@feature-test and @context must point to one or more feature @codes or @xml:ids a space or +

The attribute matches-m takes a regular expression. If an <m> matches the pattern, then the condition will be true.

One of four tests for determining the truth value that will trigger the message in a <report> or <assert>

Formal Definition

Used by: ~test-pattern

[Caution]Caution

Attributes that take a regular expression must use escape sequences recognized by XML schema or TAN escape extensions (\k{}). See http://www.w3.org/TR/xmlschema-2/#regexs for details.

The attribute matches-tok takes a regular expression. When validating a given <m>, a test will be made against each companion <tok> (i.e., those <tok>s that have the same ancestral <ana>). The condition will be treated as true only if there is a match with the resolved value of every such <tok>, and false if there is any nonmatch.

One of four tests for determining the truth value that will trigger the message in a <report> or <assert>

Formal Definition

Used by: ~test-pattern

[Caution]Caution

Attributes that take a regular expression must use escape sequences recognized by XML schema or TAN escape extensions (\k{}). See http://www.w3.org/TR/xmlschema-2/#regexs for details.