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

List:       koffice
Subject:    Re: Abiword/KWord cooperation
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-04-18 14:59:21
[Download RAW message or body]

On Tue, Apr 18, 2000 at 05:24:27PM +0200, Joaquín Cuenca Abela wrote:
> David Faure wrote:
> > 
> > Hi, thanks for contacting us about this ! This is definitely a good idea.
> > I am not directly involved with writing filters (well, I am but only for
> > KSpread's currently) - but I wanted to raise the following issue.
> > 
> > According to the AbiWord DTD, AbiWord saves a document as a flat XML file.
> 
> Yes, but it may change when I finish the bonobo support.  Anyways the
> flat XML file will be supported, and it can be a good start point.

Ok. Oh, BTW, KOffice apps can read flat XML files of their own file
format too (this means export filters don't _have_ to shrink wrap them in tar
gz files), but I decided that saving should always write a tar.gz file,
so that writing import filters in other apps is easier (only has to cope
with one case). Tell me if this doesn't make sense.

> I have to add that some points of the DTD are not yet fixed (specially
> the things that are not accesible by the GUI).  But, in general, the
> actual DTD will remain stable.
I suppose the same can be said about any KOffice app's DTD.

Not released, so not stable. But will remain compatible, of course.

> > KOffice applications, however, save document in a tar.gz file, which
> > contains a maindoc.xml, the main document, and possibly the images in
> > their native format, the embedded parts from other KOffice applications,
> > etc. So writing a filter that can read e.g. a KWord document is
> > going to involve either a tar xvf from the user - good starting point,
> > but not very user friendly - or that AbiWord can read/write tar.gzs.
> > To help in this area, there is libtar
> > at http://www-wsg.cso.uiuc.edu/resources/libtar/
> > but I haven't looked into it, and there is some simple source code for
> > that in KDE (kdelibs/kio/ktar.*) - simple because as opposed to tar
> > and libtar, it doesn't support updating and removing from an archive,
> > but only writing the full file at once - which is exactly what KOffice
> > application, or any KOffice filter, needs.
> > IIRC AbiWord is written in c, but it shouldn't be a problem for it to
> > use ktar after a quick port to c (no fancy c++ features there).
> 
> No problem here, Abiword is written in C++ (but without templates and
> exceptions).
Great ;)
KTar can be used directly then.

> > Once the tar problem is solved, the next step is writing filters
> > between the two DTDs. You can find KWord's DTD at
> > http://www.nebsllc.com/cgi-bin/cvsweb.cgi/koffice/kword/dtd/
> > and click on the version number besides kword.dtd.
> 
> Thank you for the link, I will take a look.  Do you have any example
> file on the web? (my hard disk is *TOO* small, and I cann't download all
> the stuff needed to run kword).

There's one under http://www.nebsllc.com/cgi-bin/cvsweb.cgi/koffice/kword/demos/
although it's a bit ... old (14 months!) :)

-- 
David FAURE
david@mandrakesoft.com, faure@kde.org
http://home.clara.net/faure/
KDE, Making The Future of Computing Available Today

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

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