Checks if this node has the specified attribute.
bool hasAttribute(String name) => attributes.containsKey(name.startsWith('@') ? name : '@' + name);