NAME

HTML::Detergent::Config - Configuration object for HTML::Detergent

METHODS

new

match

This is an ARRAY reference of XPath expressions to try against the document, in order of preference. Entries optionally may be two-element ARRAY references themselves, the second element being a URL where an XSLT stylesheet may be found.

    match => [ '/some/xpath/expression',
               [ '/other/expr', '/url/of/transform.xsl' ],
             ],
stylesheet
stylesheets
add_match

This is a HASH reference where the keys correspond to rel attributes and the values to href attributes of <link> elements. If the values are ARRAY references, they will be processed in document order. rel attributes will be sorted lexically. If a callback is supplied instead, the caller expects a result of the same form.

    link => { rel1 => 'href1', rel2 => [ qw(href2 href3) ] },

    # or

    link => \&_link_cb,
meta

This is a HASH reference where the keys correspond to name attributes and the values to content attributes of <meta> elements. If the values are ARRAY references, they will be processed in document order. name attributes will be sorted lexically. If a callback is supplied instead, the caller expects a result of the same form.

    meta => { name1 => 'content1',
              name2 => [ qw(content2 content3) ] },

    # or

    meta => \&_meta_cb,
add_meta
callback

These callbacks will be passed into the internal XML::LibXSLT processor. See XML::LibXML::InputCallback for details.

    callback => [ \&_match_cb, \&_open_cb, \&_read_cb, \&_close_cb ],

    # or

    callback => $icb, # isa XML::LibXML::InputCallback

stylesheets

List all stylesheets associated with an XPath expression.

stylesheet

Retrieve a stylesheet for a given XPath expression.

merge