[Scribus] Ideas on collaboration

Oleksandr Moskalenko malex
Wed Jun 22 19:15:31 CEST 2005


* Gregory Pittman <gpittman at iglou.com> [2005-06-22 10:36:14 -0400]:

> If you look at the .sla files with a text editor, it's not difficult to 
> eventually get a sense of the pattern of the various elements.  On the 
> other hand, visually it's not easy to find a particular object or 
> document feature.
> I think that there could (soon?) be an effort to "clean up" the 
> appearance and layout of the XML-like format so that it is more easily 
> understandable.  For example, use of carriage returns and indentation 
> would help a great deal.  One might argue that the files are not meant 
> to be hand-edited, but in fact I think that files which are easily 
> understood by viewing them will also be easier to parse, and parsing is 
> the key to any kind of assessment as to the differences between two 
> versions and then reconciling them.

Greg,

This effort is already under way, though the way the document structure is
developing it might not be very amenable to direct human readability as it
might be difficult to keep making mental connections between references and
the actual text frame objects. You can see how the output xml will look like
by considering the output of libxml2 that Riku is using for this task. As a
tiny example consider the following hand-written test code:

     <canvas id="canvas0" width="8.5" height="11.0" sizeunit="in">
         <canvasobjects>
                 <imgframe id="fimg0" width="200" height="200" sizeunit="mm"
                     origin="ltop" xorigin="400" yorigin="500" origunit="mm">
                     <img id="img0" src="img0" type="png" width="100"
                         height="100" sizeunit="px" resolution="150"/>
                 </imgframe>
                 <imgframe id="fimg1" width="100" height="150" sizeunit="mm"
                 origin="ltop" xorigin="200" yorigin="250" origunit="mm">
                 <img id="img1" src="img0" type="png" width="100" height="100"
                     sizeunit="px" resolution="150"/>
                 </imgframe>
                 <imgframe id="fimg2" width="200" height="200" sizeunit="mm"
                     origin="ltop" xorigin="10" yorigin="5" origunit="mm">
                     <img id="img2" src="img0" type="png" width="100"
                         height="100" sizeunit="px" resolution="150"/>
                 </imgframe>
                 <textframe id="ftxt0" width="300" height="200" sizeunit="px"
                     origin="ltop" xorigin="100" yorigin="700" origunit="mm">
                     <paragraph id="par0" parstyle="parstyle0">
                         <text parentpar="par0" txtstyle="txtstyle0"> Hello World!
                             This is a test document for the new Scribus file
                             format.</text>
                     </paragraph>
                 </textframe>
         </canvasobjects>
         <scratchspace id="scratch0" canvasid="canvas0" visible="yes" printable="no">
             <imgframeobj idref="fimg2"/>
         </scratchspace>
         <page id="page0" width="8.5" height="11.0" sizeunit="in" origin="ltop"
             xorigin="40" yorigin="40" origunit="px" orientation="portrait">
             <layer id="layer0" name="Background" level="0" visible="yes"
                 printable="yes">
                 <imgframeobj idref="fimg0"/>
                 <textframeobj idref="ftxt0"/>
            </layer>
         </page>
     </canvas>


Cheers,

Alex




More information about the scribus mailing list