[Scribus] Docbook XML import

Phil Hughes fyl
Mon Apr 4 22:44:19 CEST 2005

On Mon, Apr 04, 2005 at 09:34:29PM +0200, PLinnell wrote:
> On Monday 04 April 2005 20:14, Steve Herrick wrote:
> > Hey, folks, I want to echo Phil's question, here. What's the best
> > way to turn DocBook into Scribus' format? TIA.
> >
> > Steve
> >
> > On Apr 1, 2005 11:18 AM, Phil Hughes <fyl at a42.com> wrote:
> > > When we were first starting TUX magazine I mentioned the idea of
> > > importing our XML-tagged files into Scribus so we could use it
> > > for layout. (We currently use Quark and converting the Docbook
> > > XML to Quark format is one of the many filters we have.)
> > >
> > > Well, TUX issue 1 is out there done with Quark but we want to get
> > > it into Scribus as soon as possible. I am including below a
> > > "chunk" of the markup we have. That is, I deleted the unimportant
> > > stuff and tried to only include one of each type of thing. There
> > > are more but this gives the basic idea.
> > >
> > > What I am looking for are suggestions on the best approach. That
> > > is, we can do a lot of work with XSLT like we do for the other
> > > formats, do a lot of work with a Scribus script or a combination.
> > > I am guessing a combination is actually the right answer.
> > >
> > > Whatever we do should get Docbook XML import close to a reality
> > > for Scribus. I have added some comments in [ ] below. Thanks for
> > > any suggestions.

Uninteresting stuff (that I wrote) deleted.

> Hi,
> This one flew right by me and sorry for the slow reply.
> There is no native Docbook import filter yet for Scribus. 
> That said, the Open Office importer works quite well and will inherit 
> OO styles. I have a suspicion this might work well given the relative 
> simplicity of the xml you have described.
> http://xml.openoffice.org/ has many different xml filters for OO, 
> which could used to transform Docbook > OO > Scribus Text import. 
> Note 1.2.2cvs which is a stable branch of CVS has added Open Office 
> 2.0 support.
> With some carefully created Scribus document templates, you might find 
> the text will import with your pre-set fonts,sizes and style intact.
> All of this will work with 1.2.2cvs (stable). We have snapshots of 
> 1.2.2cvs on www.scribus.net and rpms and debs are available.
> Do let us know how you fare.
> Cheers,
> Peter

This will be a production situation, TUX will be monthly starting in
May and it is also the way we do Linux Journal so getting rid of the
Open Office step would be a real plus. We have been using the same
 vi with key maps -> Docbook XML 
sequence for a while now. We wrote the other tools to product Quark,
HTML, ... so I am not scared to tackle this as a programming project.

My Scribus knowledge, however, is on the low end. So, what is the most
logical approach would be the biggest help. Early on, it felt like
doing this in two pieces made the most sense.
 1. Clean up the Docbook XML getting rid of all the stuff that we
    don't need.
 2. Write import filters for the paragraph types.

Does that make sense? If not, we (that means me or Mitch, the guy I
will sucker into doing any hard work) are pretty fearless of having to
write code in virtually any language--Mitch leaning toward C++ and me
toward Python.


Phil Hughes, fyl at a42.com  Phone: 505-713-5675
Aptdo. Postal 201, Esteli, Esteli, NICARAGUA 

More information about the scribus mailing list