XML serialization functionality

David Faure faure at kde.org
Mon Mar 20 12:50:50 GMT 2006


On Monday 20 March 2006 10:39, Thiago Macieira wrote:
> David Faure wrote:
> >Yep, but it's not enough for OASIS-compliant saving.
> >It can use indentation everywhere -except- inside <text:p> tags, where
> > space matters. So some reimplementable behavior is needed (but I agree
> > that a string might be overkill, from a API point of view an int is
> > enough, as long as it can be turned off completely for a given tag).
> >Not that I'm really motivated to port KOffice's saving code yet another
> > time, so this is a rather academic discussion to me.
> 
> We're talking about tag indenting, I hope.
> 
> Text should never be indented. It should be preserved as-is, including 
> line-breaks and spacing characters.

There are other tags under text:p...
   <text:p>A <text:span>B</text:span> C</text:p>
QDom would break this due to inserting \n and spaces before text:span, presumably.
OOo's solution is to not indent anything, KOffice's solution is to only indent outside of text:p.

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).





More information about the kde-core-devel mailing list