return false;
}
- // possibly add lines support to information section of kvtml2 dtd?
- //documentAttribute = domElementKvtml.attributeNode(KV_LINES);
- //if (!documentAttribute.isNull())
- // m_lines = documentAttribute.value().toInt();
-
- //-------------------------------------------------------------------------
- // Children
- //-------------------------------------------------------------------------
-
bool result = readGroups(domElementKvtml); // read sub-groups
return result;
QDomNodeList entryList = groupElement.elementsByTagName(KVTML_IDENTIFIER);
if (entryList.length() <= 0)
{
- m_errorMessage = i18n("missing identifiers from identifiers tag");
+ m_errorMessage = i18n("missing identifier elements from identifiers tag");
return false;
}
currentElement = identifierElement.firstChildElement(KVTML_LOCALE);
if (!currentElement.isNull())
{
- // TODO: do something with the locale
+ // TODO: do we want to use this for the identifier, or the name?
+ m_doc->setIdentifier(id, currentElement.text());
}
currentElement = identifierElement.firstChildElement(KVTML_NAME);
{
KEduVocConjugation personalPronouns;
readConjug(currentElement, personalPronouns);
+ m_doc->setConjugation(id, personalPronouns);
// TODO: do something with these personalpronouns
}
return result;
}
// read info tags: inactive, inquery, and sizehint
+ currentElement = entryElement.firstChildElement(KVTML_INACTIVE);
+ if (!currentElement.isNull())
+ {
+ // set the active state of the expression
+ if (currentElement.text() == KVTML_TRUE)
+ {
+ expr.setActive(false);
+ }
+ else
+ {
+ expr.setActive(true);
+ }
+ }
+
+ currentElement = entryElement.firstChildElement(KVTML_INQUERY);
+ if (!currentElement.isNull())
+ {
+ // set the inquery information
+ if (currentElement.text() == KVTML_TRUE)
+ {
+ expr.setInQuery(true);
+ }
+ else
+ {
+ expr.setInQuery(false);
+ }
+ }
+
+ currentElement = entryElement.firstChildElement(KVTML_SIZEHINT);
+ if (!currentElement.isNull())
+ {
+ // set the sizehint
+ expr.setSizeHint(currentElement.text().toInt());
+ }
// read translation children
QDomNodeList translationList = entryElement.elementsByTagName(KVTML_TRANSLATION);