Attribute Tests

An AttributeTest matches attributes.

It has the same forms as an ElementTest:

  • attribute() matches any attribute.

  • attribute(AttributeName, TypeName) matches an attribute by name and/or type.

  • attribute(AttributeName) matches an attribute by name and top-level type.