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

List:       koffice
Subject:    Re: SGML DocBook export filter for KWord
From:       David Faure <david () mandrakesoft ! com>
Date:       2000-09-28 11:09:24
[Download RAW message or body]

On Thu, 28 Sep 2000, Wolf-Michael Bolle wrote :

>>Hi folks,
>
>we at ID-PRO are currently looking into how hard it would be to
>implement a WYSIWIG type DocBook editor. Our idea currently is to get
>KWord to export SMGL DocBook. I've had a chance to talk with David Faure
>at the Linux Kongress in Erlangen (Germany) about it last week and he
>said the subject boils down to going through the XML DOM tree of the
>current document and pick the few things we would really care about,
>like paragraphes, headlines, and so on, and output SGML DocBook code
>into the sml file much like the HTML export filter does it.

Yup - except that the HTML export filter is awful (C) code, which I haven't yet got
around rewriting since I inherited it.

In fact the closest filter (that is, one that uses QDom), would be the old version
of the CSV filter, whose code you can find in koffice/filters/kspread/csv/cvsexport.cc
line 177.

Then of course you'll need to look at the KWord DTD, available under
koffice/kword/dtd/kword.dtd, to know what tags to expect and parse.

>Well, there haven't been too many people on this planet who have written
>KWord export filters. Could somebody out there give me a little estimate
>on how much work that could possibly be? Also how do you add a new
>filter to KWord? Is there any kind of documentation or maybe a
>do-nothing kinda template as a starting point?

Documentation and pointer to template are available at http://www.koffice.org/filters/tutorial.html
Estimate is: this depends pretty much on how fast you master Qt and QDom, but on the whole
it really shouldn't take you long.

-- 
David FAURE, david@mandrakesoft.com, faure@kde.org
http://www.mandrakesoft.com/~david/, http://www.konqueror.org/
KDE, Making The Future of Computing Available Today
See http://www.kde.org/kde1-and-kde2.html for how to set up KDE 2

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

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