Rules input/output

@@@TODO refactor this doc

Input

@@@to be completed with more details

Output

A test can produce a result with 3 levels of informations :

The main interfaces

The ElementSelector

Explanation

This interface defines a selection applied to the DOM, to set the scope of the rule, and thus its applicability

The existing ElementSelector implementations

Here is a not exhaustive list of existing ElementSelector implementations:

The ElementChecker

Explanation

This interface defines a check to be done on elements

Method to implement

/**
     * Perform the check operation. The instance of {@link ElementHandler} 
     * received as a parameter is used to retrieve elements the test is about
     * and the instance of {@link TestSolutionHandler} received 
     * as a parameter is used to store the results of tests performed 
     * during the operation
     * 
     * @param sspHandler
     * @param elementHandler
     * @param testSolutionHandler
     *  
     */
    void check (
            SSPHandler sspHandler, 
            ElementHandler elementHandler, 
            TestSolutionHandler testSolutionHandler);

Abstract implementation

The existing ElementChecker implementations

Here is a not exhaustive list of existing ElementChecker implementations:

The TextElementBuilder

Explanation

This builder is in charge of creating a textual representation of an HTML element.

Method to implement

/**
 * @param element
 * @return a textual representation of the element
 */
String buildTextFromElement(Element element);

Take a look at the online javadoc of the Jsoup Element.

The existing TextElementBuilder implementations

Here is the list of existing TextElementBuilder implementations:

Test context

Create a nomenclature and populate it

-- INSERT THE NOMENCLATURE
INSERT IGNORE INTO `NOMENCLATURE` (`Cd_Nomenclature`) VALUES ('MyNomenclature');
-- INSERT AN ELEMENT AND LINK IT TO THE NOMENCLATURE
INSERT IGNORE INTO `NOMENCLATURE_ELEMENT` (`DTYPE`, `Label`) VALUES`('NomenclatureElementImpl', 'Value1');
UPDATE `NOMENCLATURE_ELEMENT` SET `Id_Nomenclature`= (SELECT `Id_Nomenclature` FROM `NOMENCLATURE` WHERE `Cd_Nomenclature` LIKE 'MyNomenclature') WHERE Label like 'Value1';