
CSS::SAC::ConditionFactory - the default ConditionFactory

my $cf = CSS::SAC::ConditionFactory->new; my $cond1 = $cf->create_foo_condition; my $cond2 = $cf->create_bar_condition;

This is the default ConditionFactory for CSS::SAC. It creates conditions of all types defined in SAC. You may wish to subclass or replace the default ConditionFactory in order to get your own condition objects.
I plan on adding more flexibility to this factory so that one could tell it the classes to use for various conditions, that would avoid enforcing subclassing/recoding for people that only want to replace a family of factory methods.
I know that some of the method names are quite lengthy, but given the great number of possible conditions it helps to have descriptive names.

These define the interface that must be adhered to by ConditionFactories. The Java names (given in parens) work too, though the Perl ones are recommended.
Creates a new condition factory object.
creates a combinator condition of type and
creates an attr condition
creates a attr condition of type bh
creates a attr condition of type class
creates a content condition
creates a attr condition of type id
creates a lang condition
creates a negative condition
creates a attr condition of type id
creates a only-child condition
creates a only-type condition
creates a combinator condition of type or
creates a positional condition
creates a attr condition of type pseudo class

There's some experimental stuff in here to provide for some new CSS constructs. It is and will remain undocumented until there is consensus on the handling of these new tokens. If you badly need to use one of the new CSS3 conditions that isn't documented, look at the source for features tagged EXPERIMENTAL.

Robin Berjon <robin@knowscape.com>
This module is licensed under the same terms as Perl itself.