Пример #1
0
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;
}
Пример #2
0
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;
}
Пример #3
0
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;
}
Пример #4
0
bool StateActions::createEntity(const ParserStatus & parser, const QString & argument)
{
  Q_UNUSED(argument);
  bool result = parser.contentHandler()->skippedEntity(parser.m_buffer);
  return result;
}