[scribus] Scribus as XML (phase 2)

Gregory Pittman gpittman at iglou.com
Sat Nov 2 13:11:53 UTC 2013


On 11/02/2013 04:47 AM, ale rimoldi wrote:
> hi greg
>
>> I have begun to tackle this from the perspective of Scripter, so
>> instead of sifting out tiny bits from an SLA file, I build an XML
>> from scratch, then transform from there.
>>
>> Here is the beginning of a wiki page about this:
>>
>> http://wiki.scribus.net/canvas/Scribus_XML_using_Scripter
>>
>> What this may lead to is a way to eventually by some means generate
>> xhtml which might be the start of an ebook.
> nice to see you working on this!
>
> just one thing: it would be nice if -- while discovering how the .sla
> works -- you could contribute it in a way that is compatible with the
> pseudo DTD i'm compiling:
>
> https://github.com/impagina/core/blob/master/documentation/sla_15.dtd
>
> the easiest way is to fork the repository, start a new branch and then
> make pull requests... or just give me a link to some similar document
> you're compiling...
>
> (btw, if there is any good reason, i can also switch to another
> representation of the .sla structure... i'm not a fan of DTDs... but it
> would be nice -- at some time -- to be able to validate the scribus
> files: at least for what concerns their formal correctness!)
>
>
I'll have to figure out how to do this.

One thing which readily becomes apparent is the amount of "noise" in an 
SLA file. This comes about for understandable reasons, but for example, 
a PAGEOBJECT has all the attributes for all its incarnations. It may 
currently be a text frame, but it also has attributes as if it were an 
image frame.
The benefit to the Scribus user is that if have have an image frame with 
image, change it to a text frame, then later back to an image frame, 
your image is there.

My approach so far has been that someone wanting to transform an SLA 
file to something else like HTML or ePub only wants the attributes that 
will be usable and make some sense in the new environment. I'd like to 
be able to at least have available information on precise placement and 
sizing, but for an ePub, it might be better to quickly transform and 
capture needed content in a rough way, then edit in Sigil for the level 
of precision you need.

Another issue is that many of the names of attributes date back to 
Franz's early choices of Deutsch-ish or Denglish names, which can be 
hard to understand in any language.

So far I've been able to create XML that is well-formed.

Greg



More information about the scribus mailing list