The attribute m-has-how-many-features 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+)))?)*|.*\?\?\?.*)

Defined at: TAN-mor.rng

Used by: ~action-condition-attributes

Example 8.42. @m-has-how-many-features

      <rule m-matches=".+">
         <assert m-has-how-many-features="1">Features may not be combined.</assert>


Taken from eng.kalvesmaki.com,2014.2