m_doc->setDocumentComment( currentElement.text() );
}
+ // read the category
+ currentElement = informationElement.firstChildElement( KVTML_CATEGORY );
+ if ( !currentElement.isNull() ) {
+ m_doc->setCategory( currentElement.text() );
+ }
+
return true;
}
informationElement.appendChild( newTextElement( KVTML_COMMENT, m_doc->documentComment() ) );
}
+ // category
+ if ( !m_doc->category().isEmpty() ) {
+ informationElement.appendChild( newTextElement( KVTML_CATEGORY, m_doc->category() ) );
+ }
+
return true;
}
<!ELEMENT kvtml (information, identifiers, wordtypedefinitions?, entries, tenses?, usages?, lessons?) >
<!ATTLIST kvtml version CDATA #REQUIRED>
-<!ELEMENT information (generator?, title, author?, license?, comment?) >
+<!ELEMENT information (generator?, title, author?, license?, comment?, category?) >
<!ELEMENT generator (#PCDATA) >
<!ELEMENT title (#PCDATA) >
<!ELEMENT author (#PCDATA) >
<!ELEMENT license (#PCDATA) >
<!ELEMENT comment (#PCDATA) >
+<!ELEMENT category (#PCDATA) >
<!ELEMENT identifiers (identifier*) >
<!ELEMENT identifier (identifiertype, locale, name?, comment?, sizehint?, article?, personalpronouns?) >
#define KVTML_AUTHOR "author"
#define KVTML_LICENSE "license"
#define KVTML_COMMENT "comment"
+#define KVTML_CATEGORY "category"
#define KVTML_IDENTIFIERS "identifiers"
#define KVTML_IDENTIFIER "identifier"