ACTF Validation Document Specification

In what follows, the actf prefix is associated with the URI http://www.eclipse.org/actf/validation. This URI is subject to change in the near future as the project matures.

Nonterminals and terminals


<actf:rulebase
    actf:name = #name
    actf:enable = true | false
    actf:scriptlang = #script_language
    actf:model = #model
    actf:version = #version>
  
    [<actf:metadata>
        [<actf:aliases>
            <actf:alias 
                actf:name = #alias_name 
                actf:value = [#field_name | #fully_qualified_field_name | #method_alias] />]+
        </actf:aliases>]?
        
        [<actf:scripts>
          [<actf:script
            actf:name = #script_name 
            actf:src = #source_file
          />]*
            #script_code
        </actf:scripts>]?
    </actf:metadata>]
  
    [<actf:ruleset>
        actf:name = #name
        actf:enable = true | false   
        actf:executionPoint = #exec_point_name
        actf:ruleFactory = #class_name> 
    
        [< [#alias_name | #class_name] >  
            [
                #actf:or |
                #actf:and |
                #actf:scripttest |
                #actf_rule
            ]?
            #script_code
        </[#alias_name | #class_name] >]+
    </actf:ruleset>]+        
            
    [<actf:executionPoint
        actf:name = #name 
        actf:validator = #class_name>
    
        [<actf:modelTransition 
            actf:regexp = #regular_expression
            actf:rulebase = #rule_base_name
            actf:executionPoint = #exec_point_name />]*
    
    </actf:executionPoint>]+         
            
</actf:rulebase>             


actf:or =  <actf:or 
                actf:id = #rule_id
                actf:name = #rule_name
                actf:message = string
                actf:severity = [ ERROR | INFO | WARNING ]
                actf:enable = [ true | false ]
                actf:ignoreifnull = [ true | false ]
            >
                [ #actf_rule ]+ 
            </actf:or>


actf:and = <actf:and 
                actf:id = #rule_id
                actf:name = #rule_name
                actf:message = string
                actf:severity = [ ERROR | INFO | WARNING ]
                actf:enable = [ true | false ]
                actf:ignoreifnull = [ true | false ]
            >
                [ #actf_rule ]+    
            </actf:and>
                
                        
	actf:scripttest =  <actf:scripttest
                actf:id = #rule_id
                actf:name = #rule_name
                actf:message = string
                actf:severity = [ ERROR | INFO | WARNING ]
                actf:enable = [ true | false ]
                actf:ignoreifnull = [ true | false ]
                actf:polymorphic = [ true | false ]
                #script_code
                    </actf:scripttest>


actf_rule = <[ #alias_name | #field_name | #method_name ]
                   actf:message = string
                   actf:severity = [ ERROR | INFO | WARNING ]
                   actf:enable = [ true | false ]
                   actf:ignoreifnull = [ true | false ]
                   actf:polymorphic = [ true | false ]
                [  
                   #actf:min |
                   #actf:max | 
                   #actf:range |
                   #actf:eq | 
                   #actf:neq | 
                   #actf:regexp | 
                   #actf:instanceof | 
                   #actf:iterator |
                   #actf:param
               ]?
            >
        
                [#script_code]?
                        
            </[ #alias_name | #field_name | #method_name ]>


                        
actf:min = <actf:min = #numeric_value/>

actf:max = <actf:max = #numeric_value/>

actf:range = <actf:range = #numeric_value, #numeric_value/>

actf:eq  = <actf:eq = #numeric_value/>

actf:neq  = <actf:neq = #numeric_value/>

actf:regexp = <actf:regexp = regular_expression/>

actf:instanceof = [#alias_name | #class_name]/>

actf:iterator = <actf:iterator = [ "none" | #iterator_class ]/>
        

script_language = ["javascript"]

model = ["swt" | "swing" | "mozdom" | "msaa" | "ia2" ]

script_code = language dependent script code

field_name = string representing field_name_of_class  (ex. "accessibleName")

fully_qualified_field_name = string representing field name of class in other package 
        (ex. "javax.accessibility.AccessibleRelation.LABELED_BY")

method_alias = string representing method sequence where methods are delineated by a "!"  
        (ex. "!getRootPane!getDefaultButton")

alias_name = string representing alias

class_name = string representing fully qualified class name

validator_class = string representing fully qualified validator class name

iterator_class = string representing fully qualified iterator class name

namespace = string representing a package name

name = string representing the name of entity

field_name = string representing the name of a class field

method_name = string representing the name of a class method

version = string representing version number        

numeric_value = string representing a valid numeric value

exec_point_name = string representing the name of execution point

rule_base_name = string representing the name of rulebase

Special symbols


"?" - 0 or 1 occurance
"*" - 0, 1, or any number of occurances
"+" - at least 1 occurance
"|" - either occurance

Validation Document Elements

actf:rulebase
xmlns:actf
Defines the actf prefix (required for all description and validation documents). (org.eclipse.actf.core)
actf:name
Defines the name of the rulebase.
actf:enable
Enables/disables the rulebase. (true | false)
actf:scriptlang
actf:model
Specifies the model of the GUI being described. (swing | awt | swt | mozdom | msaa | ia2)
actf:version
Defines the version of the validation document.
actf:metadata
actf:alias
actf:name
The alias name or token that will be used in the document. Any string with no white space.
actf:value
The alias value that is substituted by ACTF when evaluating rules. Typically a class name or method alias.
actf:file
A properties file the defines aliases. Values in the file will overwrite previously defined aliases.
actf:script
actf:name
The name of script for later reference in description or validation document. Any string with no white space.
actf:file
A file containing scripts external to the validation document. The effect is the same as including the contents of the file in the text content of the <actf:script> element using this attribute. Any relative or absolute file path.
actf:exec
If set to true, tells ACTF to execute the script upon the initialization of the scripting engine being used for this document, otherwise is invoked only by name later in the document. (true | false)
actf:imports
A semi-colon separated list of packages to import. Valid only for embedded Java code.
actf:ruleset
actf:name
The name of the ruleset. Any string with no white space.
actf:enable
Enables/disables the rulebase. (true | false)
actf:executionPoint
The name of the execution point that triggers the ruleset.
actf:ruleFactory
The class name of the rule factory to use when parsing the rules. The default ACTF rule factory is org.eclipse.actf.validation.rules.IRuleFactory.
actf:executionPoint
actf:name
The name of the execution point. Any string with no white space.
actf:validator
The fully-qualified class name of the validator to be used, (ex. org.eclipse.actf.validation.javapp.validators.SwtAccessibilityValidator)
actf:modelTransition
actf:regexp
The regular expression for the package name of the classes that use this model transition.
actf:rulebase
The rulebase name to use for the transition.
actf:executionPoint
The name of the execution point to use in the transition.

ACTF Rule Attributes

actf:severity
Indicates the severity of a failure of a component to meet a constraint set forth in a validation document. (INFO | WARNING | ERROR)
actf:enable
Enables (or disables) the application of the rule; rules are enabled by default. Only applies to rule elements immediately under a component element; nested rules are controled by their parent element. (true | false)
actf:message
The message to output when a component fails to meet a constraint set forth in a validation document. Can be any string.
actf:param
Used to specify a key or some other parameter to a getter in a rule. Dependent upon the getter method being invoked.
actf:iterator
Used to specify an implementation of java.util.Iterator for specialized collections | "none" to use one of the default iterators: ArrayIterator for iterating through arrays, DomNodeIterator for iterating through W3C DOM Node objects in a NodeList, or the default iterator returned by any instance of java.util.Collection.
actf:ignoreifnull
Specifies that the remainder of the constraint should be ignored if the current getter returns a null value. (true | false)
actf:instanceof
Tests to see if the value returned by the getter is an instance of the specified class. The value is a fully-qualified class name or script code specifying the class name.
actf:min
Specifies the required minimum value for the value returned by the getter. (Any int or double value.)
actf:max
Specifies the required maximum value for the value returned by the getter. (Any int or double value.)
actf:eq
Tests for equality using == operator for numeric values and the equals(Object) method for Strings; all other equality tests should be done in script code. (Any numeric or string literal.)
actf:neq
Tests for non-equality using == operator for numeric literals and equals(Object) for strings; use script code for all other non-equality tests. (Any numeric or string literal.)
actf:regexp
Specifies a regular expression against which to compare string returned by getter. (Any valid regular expression with no delimiters.)