Björn Höhrmann
and 1 contributors

NAME

CSS::SAC::SelectorFactory - the default SelectorFactory

SYNOPSIS

 fill this in later...

DESCRIPTION

This is the default SelectorFactory for CSS::SAC. It creates selectors of all types defined in SAC. You may wish to subclass or replace the default SelectorFactory in order to get your own selector objects.

I plan on adding more flexibility to this factory so that one could tell it the classes to use for various selectors, 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 selectors it helps to have descriptive names.

METHODS

All the create* methods have a spec-style equivalent. Just remove the _ and capitalize the next letter.

  • CSS::SAC::SelectorFactory->new or $cf->new

    Creates a new condition factory object.

  • $sf->create_any_node_selector

    creates a any-node selector

  • $sf->create_cdata_section_selector($data)

    creates a cdata selector

  • $sf->create_child_selector($parent_sel,$child_sel)

    creates a child selector

  • $sf->create_comment_selector($data)

    creates a comment selector

  • $sf->create_conditional_selector($sel,$cond)

    creates a conditional selector

  • $sf->create_descendant_selector($parent_sel,$desc_sel)

    creates a descendant selector

  • $sf->create_direct_adjacent_selector($node_type,$child,$adjacent)

    creates a direct adjacent selector

  • $sf->create_element_selector($ns,$lname)

    creates a element selector

  • $sf->create_negative_selector($sel)

    creates a negative selector

  • $sf->create_processing_instruction_selector($target,$data)

    creates a pi selector

  • $sf->create_pseudo_element_selector($ns,$lname)

    creates a pseudo-e selector

  • $sf->create_root_node_selector

    creates a root selector

  • $sf->create_text_node_selector($data)

    creates a text selector

AUTHOR

Robin Berjon <robin@knowscape.com>

This module is licensed under the same terms as Perl itself.