bool StateActions::createTag(const ParserStatus & parser, const QString & argument) { Q_UNUSED(argument); parser.m_tagRange.end().setPosition(parser.m_locator->lineNumber(), parser.m_locator->columnNumber() + 1); REPORTRANGES bool result; if (parser.m_namespace.isEmpty()) result = parser.contentHandler()->startElement("", parser.m_tagName, "", parser.m_attributes); else result = parser.contentHandler()->startElement(parser.m_namespace, parser.m_tagName, parser.m_namespace + ':' + parser.m_tagName, parser.m_attributes); parser.m_tagName.clear(); parser.m_namespace.clear(); parser.m_attributes.clear(); return result; }
bool StateActions::createText(const ParserStatus & parser, const QString & argument) { Q_UNUSED(argument); parser.m_tagRange.end().setPosition(parser.m_locator->lineNumber(), parser.m_locator->columnNumber()); REPORTRANGES bool result = parser.contentHandler()->characters(parser.m_buffer); parser.m_buffer.clear(); parser.m_buffer.reserve(1000); return result; }
bool StateActions::createEndTag(const ParserStatus & parser, const QString & argument) { Q_UNUSED(argument); parser.m_tagRange.end().setPosition(parser.m_locator->lineNumber(), parser.m_locator->columnNumber() + 1); REPORTRANGES bool result = parser.contentHandler()->endElement( parser.m_namespace + ':' + parser.m_tagName, "", parser.m_tagName); parser.m_tagName.clear(); parser.m_namespace.clear(); parser.m_attributes.clear(); // just in case return result; }
bool StateActions::createEntity(const ParserStatus & parser, const QString & argument) { Q_UNUSED(argument); bool result = parser.contentHandler()->skippedEntity(parser.m_buffer); return result; }