event XML 1.1 (fix recurrances)

David Faure dfaure at klaralvdalens-datakonsult.se
Fri Feb 9 10:26:41 CET 2007


On Thursday 08 February 2007, Gerd v. Egidy wrote:
> > > I can't find any word in the spec telling me that tags at deeper levels
> > > are 
> > > any different than tags at the top level. Even if it was a design
> > > decision back then it seems like it hasn't made it into the spec.
> >
> > How is this implemented in Kontact? 
> 
> I don't know. Any Kontact developers here who can tell?

When parsing the elements of an event (for instance), we go
if "summary" -> store summary
if "location" -> store location
etc.
else  -> saving unhandled tag into a list in memory (more precisely: tagname and text contents)
  
So indeed only first-level child elements of the <event> element are preserved.
Unknown elements at other levels are not preserved; this would be quite difficult.
Unknown elements inside the unhandled toplevel element are not preserved either; 
this might be possible to add though, I guess (storing a tree instead of a text node only).

-- 
David Faure, faure at kde.org, dfaure at klaralvdalens-datakonsult.se
KDE/KOffice developer, Qt consultancy projects
Klarälvdalens Datakonsult AB, Platform-independent software solutions




More information about the format mailing list