View on
MetaCPAN
search.cpan.org is shutting down
For details read Perl NOC. After June 25th this page will redirect to MetaCPAN.org
Benjamin Habegger > WebSource > WebSource::Filter::tests

Download:
WebSource-2.4.5.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

WebSource::Filter::tests - apply tests to filter xmlnodes

DESCRIPTION ^

The tests type of filter allows to declare a series of tests and apply them to the input data in order to determine whether or not to send it further on.

The tests are executed in the order of their declaration until one of them matches. They associated action (keep or reject) is taken. By default the action is to keep elements matching the test. If the element does not match any tests it is rejected.

Current existing tests include :

exists : Succeeds if a given XPATH expression returns a result
regexp : Succeeds if a given regular expression matches the input
approx : Succeeds of a given string is approximately found in the input =back

SYNOPSIS ^

In wsd file...

<ws:filter name="somename" type="tests"> <test type="exists" select"<xpath-expr>" action="keep" /> <test type="regexp" select="<xpath-expr>" match="<regexp>" action="keep"/> <test type="approx" select="<xpath-expr>" match="<pattern>" modifiers="" action="reject" /> ... </ws:filter>

METHODS ^

SEE ALSO ^

WebSource, WebSource::Filter

syntax highlighting: