Talk:Dynamic Layout Support Discussion

From Scribus Wiki
Revision as of 04:41, 13 April 2007 by Mkoren (talk | contribs)
Jump to navigation Jump to search

That sounds very good. When reading your text, I must think of XSL FO, the XSL Formatting Objects. For a good example of an implementation of XSl FO, take a look at the Apache FOP (http://xmlgraphics.apache.org/fop/).

I build some stylesheets for XSL Fo which can be used for several types of texts, perhaps it could be an example for you (which is not sooo big and complicated as docbook): http://www.thomas-zastrow.de/st/

Thanks for the references. I'm not too familiar with XSL-FO, so I'll take a look at them. But here are some of my current thoughts on the issue, and why I'm not sure FO is the ideal match to an interactive dynamic layout process (though it could certainly still be used in its own right of course!). I think they may be somewhat separate layout approaches, though it could be possible to adapt current FO-based stylesheets to take advantage of a WSYSIWYG approach such as I'm suggesting.
-------
From what I understand currently, an XSL-FO file could be treated as input content like any other XML file and used with my proposal if suitable import filters were written (by me or anyone else, or an alternative import mechanism found using an external parser). If desired, an arbitrary XSLT stylesheet could probably be applied (by an external XSLT processor) to a source XML file to create the XSL-FO dynamically as well before importing by Scribus--it would be easy enough to call an external processor as a filter.
However, if I understand correctly, a FOP is a completely different story, as it is designed to do all of the layout work from the FO input itself and generate a final output format like PDF. This leaves no editable content to import and manipulate within Scribus, which is the whole idea of my proposal. A FOP-generated document thus would not use Scribus at all for its design or layout, and would better be linked to as an image (the TeX-frame project is taking that approach, and it seems may now support arbitrary external programs to generate the content, not just TeX.)
Thus, as I said above, to actually be able to edit XSL-FO-imported content in Scribus, the FOP essentially must be replaced by some method to get the FO content into and rendered as native Scribus objects, which my project could manipulate in a structured fashion.
A final consideration is that FO, as I understand it, is intended as a processed intermediate form of a document, usually generated from a source file with more semantic information about the content. While there is no reason an FO file could not be processed using my framework given the needed import filters, the strength of my proposal is in its ability to manipulate and dynamically reformat semantic content within Scribus using a GUI interface and layout styles.
Thus the ideal way to use a <source file> -> XSL-FO stylesheet (an XSLT filter) would be to import the stylesheet itself as a layout style and let Scribus directly import the source XML file. It might be doable, but it would take some work, and it might be easier to just create the styles and filters directly in Scribus.
This discussion has gotten a bit long, but to summarize:
  • XSL-FO could be imported the same as any other XML file, with suitable filters
  • An FOP does all the formatting of the FO document itself, and hence bypasses any possible editing in Scribus--they're two separate layout paths
  • An XSL-FO document has already lost semantic information from the source document, so a more complete editing experience in Scribus, taking full advantage of my proposed interactive layout system, would import the source file directly rather than the FO form. However, an XSLT stylesheet designed to create FO output could be converted to, or used as the basis for, a Scribus layout style as per my proposal
I hope that clarifies the relationship between a fully automated layout path like XML->FO->FOP and my proposal for interactively-controlled, WYSIWYG structured layout editing, as I see it. Please add any comments or correct me if I've misunderstood something. :) --Mkoren 06:41, 13 April 2007 (CEST)