'This method is a generic handler for emitting the tags. It also sets
the state to "data" because that\'s what\'s needed after a token has been
emitted.'

def emitCurrentToken(self):

    token = self.currentToken
    if (token[u'type'] in tagTokenTypes):
        if self.lowercaseElementName:
            token[u'name'] = token[u'name'].translate(asciiUpper2Lower)
        if (token[u'type'] == tokenTypes[u'EndTag']):
            if token[u'data']:
                self.tokenQueue.append({u'type': tokenTypes[u'ParseError'], u'data': u'attributes-in-end-tag'})
            if token[u'selfClosing']:
                self.tokenQueue.append({u'type': tokenTypes[u'ParseError'], u'data': u'self-closing-flag-on-end-tag'})
    self.tokenQueue.append(token)
    self.state = self.dataState
