Add support for [attr|="value"] selector (prefix selector)
authorJakub Narebski <jnareb@gmail.com>
Sun, 9 Jan 2011 13:27:44 +0000 (14:27 +0100)
committerJakub Narebski <jnareb@gmail.com>
Sun, 9 Jan 2011 13:27:44 +0000 (14:27 +0100)
commit52878e73ac8e6d929eb2591354d48ed4aadf442f
tree7181f37514f8b525d9b7219dff15a00b14b24017
parent24725e7b32b680b376c06b1f9d641ec11fc1d067
Add support for [attr|="value"] selector (prefix selector)

http://www.w3.org/TR/css3-selectors/#attribute-selectors
http://www.w3.org/TR/CSS2/selector.html#attribute-selectors
http://api.jquery.com/attribute-contains-prefix-selector/

  Description: Selects elements that have the specified attribute with
  a value either equal to a given string or starting with that string
  followed by a hyphen (-).

  This selector was introduced into the CSS specification to handle
  language attributes.

Note that this selector is primarily intended to allow language
subcode matches (e.g., the `hreflang` attribute on the <a> element in
HTML; for `lang` or `xml:lang` attribute there is `:lang`
pseudo-class selector).
lib/HTML/Zoom/SelectorParser.pm
t/selectors.t