next up previous contents
Next: The tag? matcher Up: The standard matchers Previous: The standard matchers   Contents

The tag matcher

The tag matcher matches a single tag.


tag name (attribute-matcher*) child-matcher* $\rightarrow$ matcher

Arguments and Values:

name--One of three things:

  1. A regular expression that will match the name of the attribute. Note that ``^'' and ``$'' are added to the start and end of the regular expression string.
  2. A cons of two regular expressions, both of which have ``^'' and ``$'' added as above, which match each element of the (attribute-name . namespace) cons used by xmls to represent namespaces.
  3. A designator for a function. This is called on the attribute name (which may be a string or a cons, as described above) and returns a boolean representing whether or not the function matches the attribute name.

attribute-matcher--matchers that will match attributes, like the attr matcher (see 3.5).

child-matcher--matchers that will match child nodes, like tags or character data.

root 2004-10-26