Selectors Object

Structure of Selectors Object

A group of selectors object is represented as a reference to a Perl array, which contains zero or more selector object.

$group_of_selectors = [$selector1, $selector2, ..., $selectorsn];

A selector object is represented as a reference to a Perl array, which contains zero or more sequence of a combinator value followed by a sequence of simple selectors object. The first combinator value, if any, is always (and MUST be) DESCENDANT_COMBINATOR.

$selector = [$combinator1, $sss1, $combinator2, $sss2, ..., $combinatorn, $sssn];

A combinator value is one of combinator types.

A sequence of simple selectors pbject is represented as a reference to a Perl array, which contains zero or more simple selector object.

$sss = [$ss1, $ss2, ..., $ssn];

A simple selector object is one of following objects:

Namespace selector object

Represented as a reference to a Perl array, which contains a value of NAMESPACE_SELECTOR, followed by a scalar value. The scalar value is either undef, which represents the null namespace (encoded as an empty namespace prefix in Selectors), or a non‐empty string, which represents the namespace URI of an element.

$selector = [NAMESPACE_SELECTOR, undef]; ## null namespace

$selector = [NAMESPACE_SELECTOR, $nsuri]; ## non-null namespace

@@

Error Handling Rule

@@

See Also

Author

.

License

Copyright <w@suika.fam.cx>

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