int (IElementType rootNodeType, XmlEntityDecl.EntityContextType context) { short state = 0; switch (context) { case ELEMENT_CONTENT_SPEC, ATTRIBUTE_SPEC, ATTLIST_SPEC, ENUMERATED_TYPE, ENTITY_DECL_CONTENT -> state = _DtdLexer.DOCTYPE_MARKUP; case ATTR_VALUE, GENERIC_XML -> {} default -> LOG.error("context: " + context); } if (rootNodeType == XML_MARKUP_DECL && context == TYPE_FOR_MARKUP_DECL) { state = _DtdLexer.DOCTYPE; } return state; }