The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

XML::XMetaL::Utilities::Filter::Base - Node filter base class

SYNOPSIS

 use XML::XMetaL::Utilities::Filter::Element;

 my $filter = XML::XMetaL::Utilities::Filter::Element->new();
 ...
 if ($filter->accept($dom_node)) {
    # Do something with the DOM node
 }
 ...

DESCRIPTION

The XML::XMetaL::Utilities::Filter::Base class is a base class for node filters.

Node filters are used to determine whether a DOM node fullfills a certain set of conditions or not.

For example, XML::XMetaL::Utilities::Iterator objects use node filters to determine whether a node in the node tree should be returned by the next method.

Constructor and initialization

 use XML::XMetaL::Utilities::Filter::Element;
 my $filter = XML::XMetaL::Utilities::Filter::Element->new();

Class Methods

None.

Public Methods

accept
 my $boolean = $filter->accept($dom_node);

The accept method takes a DOM node as an argument. The method returns a true value if the filter conditions are accepted. If the filter conditions are not fulfilled, the method returns a false value.

Private Methods

None.

Node Filter List

Currently, the following node filters are available in the XML::XMetaL framework:

XML::XMetaL::Utilities::Filter::All

The accept method always returns a true value.

XML::XMetaL::Utilities::Filter::Element

The accept method returns a true value when the node passed as an argument is an element node.

The accept method returns a false value for all other node types.

ENVIRONMENT

The Corel XMetaL XML editor must be installed.

BUGS

A lot, I am sure.

Please send bug reports to <henrik.martensson@bostream.nu>.

SEE ALSO

See XML::XMetaL, XML::XMetaL::Utilities::Iterator.

AUTHOR

Henrik Martensson, <henrik.martensson@bostream.nu>

COPYRIGHT AND LICENSE

Copyright 2003 by Henrik Martensson

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.