[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: KWord - RDF Question
From:       Jos van den Oever <Jos.van.den.Oever () kogmbh ! com>
Date:       2010-03-25 9:20:34
Message-ID: 201003251020.34330.Jos.van.den.Oever () kogmbh ! com
[Download RAW message or body]

On Thursday 25 March 2010 10:17:46 Jos van den Oever wrote:
> On Thursday 25 March 2010 10:02:17 Ganesh Paramasivam wrote:
> > I have some basic questions about the usage of ODF-Metadata in KWord.
> > I'm currently implementing change-tracking in textshape and I'm
> > currently working on loading and saving delete changes in lists. The
> > problem I'm facing is that, in some of the scenarios it is not
> > possible to save list delete changes in a ODF complaint format. One
> > work-around I have been thinking about is the addition of one more
> > attribute to <text:list> and <text:list-item>. This would solve most
> > of the problems with accurately capturing/saving and loading of user
> > intent when deleting lists. But this would make the document non-ODF
> > complaint. So I was wondering whether I could use RDF for this. More
> > specifically, my questions are -
> > 
> > - Is this scenario ( addition of an additional attribute to <list> and
> > <list-item> ) a valid use-case for ODF Metadata ( or am I completely
> > mistaken about this ).
> > - Would a odt file generated like this be ODF complaint
> > - What would happen if the same document is opened in a different
> > implementation ( like oowriter ).
> > - Any examples of a similar implementation in the code that I can look
> > at ( or what should be done in the code to save and load this
> > additional attribute?)
> 
> RDF does mean you can add arbitrary attributes to xml elements in ODF.

Small correction:
RDF support means you can add arbitrary values to xml elements but it does not 
mean you can add arbitrary attributes to xml elements.

> Doing so would make the ODF invalid. The way the RDF support in ODF works
> is to associate metadata to elements by using the xml:id of the element.
> Not all elements are allowed to have xml:id, but text:list and
> text:list-item are.
> 
> This information written in the ODF document as RDF triples in the XML
> serialization in separate rdf files. Implementations that do not support
> RDF should simply ignore these files, but should retain them and should
> also retain the values of xml:id on the content.xml and styles.xml.
> 
> You an access the RDF in the loaded document with KoDocumentRdf which is
> documented in libs/main/rdf/KoDocumentRdf.h
> 
> Cheers,
> Jos
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic