Scribus files as XML

Here is a little experiment in progress after having spent some time creating some XSLT files to process some XML files as webpages.

This page talks about using a modified SLA file, renaming it as an XML file, then using XSLT to interpret it for a browser.

I've also begun a separate project to generate a new XML file using Scripter: Scribus XML using Scripter. The main advantage is a file-wide customization of the XML.

But meanwhile, back at this page's topic...
It seemed that maybe something similar could be done with the SLA files. What you will find is that your browser wants to find an application for .sla files, so you have to rename them as .xml files. Other than that, you also have to edit your Scribus file slightly. The beginning normally starts out like this:   What you want to do is have something like this:    Once you do this, then save your myscribusfile.sla as myscribusfile.xml.

XSLT file
Here is a small experimental scribus.xsl that you might try out with one of your slightly altered Scribus files. 

   This document was created using Scribus Version   This document consists of  pages, and has a width of  points and has a height of  points. (Type: ) Its margins (L-R-T-B, in points) are -<xsl:value-of select="@BORDERRIGHT" />-<xsl:value-of select="@BORDERTOP" />-<xsl:value-of select="@BORDERBOTTOM" />, and bleed areas (T-L-R-B, in points) are <xsl:value-of select="@BleedTop" />-<xsl:value-of select="@BleedLeft" />-<xsl:value-of select="@BleedRight" />-<xsl:value-of select="@BleedBottom" />. <p style="text-indent: 20px;">The default font is <xsl:value-of select="@DFONT" />, <xsl:value-of select="@DSIZE" /> points. <xsl:for-each select="PAGEOBJECT"> <xsl:if test="@PTYPE=2"> <xsl:value-of select="@PFILE" /> -- Color profile: <xsl:value-of select="@PRFILE" /> </xsl:if> <xsl:if test="@PTYPE=4"> <xsl:for-each select="ITEXT"> </xsl:for-each> </xsl:if> </xsl:for-each> </xsl:for-each>

</xsl:for-each> </xsl:template> </xsl:stylesheet>

What Next?
Presuming you have your Scribus XML file and this scribus.xsl file in the same directory, just point your browser to the XML file, and see what happens.