function isA(elt, set) {
        var tagnames = set[elt.namespaceURI];
        return tagnames ? elt.localName in tagnames : false;
    }
These are utility functions that don't use any of the parser's
internal state.