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

List:       koffice-devel
Subject:    KOffice as XML editor
From:       Kay Hayen <kayhayen () gmx ! de>
Date:       2007-09-08 22:37:47
Message-ID: 200709090037.47307.kayhayen () gmx ! de
[Download RAW message or body]


Hello,

as discussed with ThomasZ on IRC , I will detail the situation and encourage 
your comments. :-)

We have an XML schema defined and files according to that schema. In MS Office 
2003 it's possible to associate a document with this schema of our own making 
and open/edit these.

It's possible to add tags and content and have Word verify and show the 
document structure and validity on the fly. 

When the document is saved, the resulting XML contains the XML tags from our 
schema, just put into a namespace. In fact, the Word XML file refers to our 
schema. The both schemas of Word and our schema can be seen as overlayed. 
It's very easy to extract the XML data document from that, and Office seems 
to allow to make "data only" saves of the XML.

Even better: In the XML SDK for Office there is a tool that accepts a mixed 
Word file as input, and creates a transformation from our XML data files into 
Word XML documents (well formatted and attaching corporate identity and 
stuff),  which would allow to automate things with xsltproc.

The whole thing gives a 2 way process, where the text document can be the 
preferred form of modification.

The question I have now. Can the same be done with KOffice2? Obviously not 
yet, but I am willing to invest some of my time to get something going. 

As we are planning to use this work flow, I would like to discuss this with 
you and see how hard it would be for me to get a prototype of this to work.

I don't want to take away from KOffice2 work, but I think I could contribute 
something mayhaps. 

So far I have understood (most of which I learned from Thomas) that the ODF is 
parsed into a KoXmlObject object. 

First thing for me is to make a test document and see if this Dom will retain 
the extra namespace that is contains. If you already know, please hint 
me. :-)

Second thing would be to find the (composite?) internal structures that the 
DOM information will be put into. I was pointed to KoDocument, and it 
contains method "loadOasis", so I will look into a derived class that 
implements this for text. (I couldn't find which classes these are with 
apidocs though?)

Next thing would be to identify how the data could be visualized and how to 
offer editing of the tags.

And finally how to write back without data loss, way to go. :-)

Best regards,
Kay Hayen
_______________________________________________
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