Whether the item matches this type.
item
bool matchesItem(XPathItem item) => item.type.isSubtypeOf(this);