[Scribus] DocBook/xml
Michael Koren
kung42o
Wed Apr 11 05:32:17 CEST 2007
James Gilmore wrote:
>
> Yes! This is right on target. Barring a tool to import/parse/export
> docbook directly within Scribus, this is the best option. The ability to
> convert between .sla and xml in general is useful, but docbook is king, on
> account of bibliographies, tables of contents, glossaries, etc.
>
> Recently an associate and I sat down to discuss this very issue. In
> formatting a series of books for print, we eventually decided that:
> 1. Docbook is the only format that makes reasonable sense, for at least
> 90% of publishing.
> 2. There is not currently a mechanism for importing Docbook into Scribus.
> By importing, I mean assigning the same styles to tags that are alike. If
> it doesn't make reasonable decisions regarding styles, it's no better than
> importing a flat text file.
>
General importing of structured content into Scribus, preserving style tags
and structure, and rendering it directly using layout styles created in
Scribus are aspects of my proposed project.
My approach is not to directly write support for any particular input
format, but rather to allow the user to define arbitrary input filters
("sequence selectors") to parse any format and convert it to structured
Scribus objects that I will write support for, which can then be manipulated
from the GUI and/or processed with layout styles based on their structure
and/or input tags.
However, I could look into writing premade filters for widely-used standards
like DocBook.
> 3. Even if there were, if it didn't go through some sort of xslt-like
> filtering first, it would be pointless, since the real advantages of
> Docbook come from parsing tags to form the bibs, tocs, glossaries,
> sidebars, etc. Again, I'd love to be able to use scribus for styling, but
> I shouldn't have to go through the document setting styles--I already did
> that work in the docbook.
>
Integrating external filtering of input during the import doesn't sound like
a problem. Alternately, in the long term my approach would probably be able
to handle creating generated content directly. Sidebars may be possible even
at first. :)
> 4. Once the file is in .sla format, it becomes very impractical to manage
> content any further, without being able to reliably export a docbook file
> and corresponding stylesheet.
>
My plan is that the whole import process would be dynamic, as the whole
process is handled by filter styles. I.e., you wouldn't have to _convert_ to
.sla irrevocably to be able to edit in Scribus, to a point anyway...your
editing would be on the level of styles that would be reapplied when the
input content is changed. Export might come later, but isn't necessary so
much as long as you can still change the source and have Scribus-side
changes preserved.
> The absolute ideal situation would be if scribus could import and export
> docbook+stylesheet, or could actually parse a docbook file and create the
> necessary book parts on the fly, so that the docbook file was separate
> from the .sla file, or if scribus could use a "docbook" template to allow
> someone to design a style for the docbook elements using scribus' gui and
> output an .xslt stylesheet containing the formatting, so that the docbook
> could be run through fop/etc. to create print-ready pdfs.
>
Something like the middle option, most likely, I think.
> One thing that surprised me, when looking at a .sla file, was that text
> was inserted directly into, and separated by, individual text boxes. I
> expected the pages to be laid out, with container object coordinates, with
> a pointer to an xml tag containing the entirety of a block of text.
>
I think this is planned anyway for the new Scribus file format.
> I know this is getting long--I'll try to wrap up. One last option, if
> importing and exporting docbook is just too problematic, is creating a new
> format for scribus with similar functionality to the docbook DTD but with
> the purpose of injecting itself into scribus with styles/kerning/etc. set,
> creating bibs/etc. as Docbook parsers do, autogenerating textboxes where
> needed. The only reason I can see doing this rather than simply using a
> docbook file, though, is for naming styles.
>
As I said, any reasonably structured format should in principle be usable by
my system, not necessarily right away but the possibility is there (and it's
even implementable by a non-programmer once the core engine handles the
necessary primitives).
I'd like to see what your impression of my core framework is on
http://wiki.scribus.net/index.php/Dynamic_Layout_Support_Discussion. It's a
little different than other approaches, but I think it's rather nicely
flexible and extensible to many workflows. Any suggestions or feedback would
of course be appreciated.
Michael
--
View this message in context: http://www.nabble.com/DocBook-xml-tf3412631.html#a9932653
Sent from the Scribus mailing list archive at Nabble.com.
More information about the scribus
mailing list