[As-users] XML image file format for AfterStep

M.-A. DARCHE (ma.darche@cynode.org)
Sat, 22 May 2004 14:48:20 +0200


Hello list,

First I wanted to send this message to a could be "as-dev" mailing list,
but http://mail.afterstep.org/mailman/listinfo/ tells that there isn't
any.

It's true that AS users are more technically skilled than other WM users
since using AS usually implies editing configuration files and AS fits
well for administrating servers. But should development issues be talked
on the users' mailing list?

Anyway here is my point.

As I've started to write some documentation about libAfterImage XML
processing capabilities, I very rapidly got bored by laying out XML
data into HTML by hand. So a bit of net search and some XSL + CSS later
I came out with some xml_to_xhtml.xsl and xml_to_xhtml_page.xsl XSL
files cf. http://www.cynode.org/resource/xml

But those XSL transformations would not process the following XML image
file that works with libAfterImage :

    <img id=3D"tile" src=3D"/home/sweet/img/niceTile.png" />

    <composite id=3D"left_tile" width=3D"$tile.width" height=3D"$tile.hei=
ght">
        <recall srcid=3D"tile" />
        <mirror x=3D"0" y=3D"$tile.height" dir=3D"vertical">
            <recall srcid=3D"tile" />
        </mirror>
    </composite>

    <composite width=3D"$tile.width" height=3D"$tile.height">
        <recall srcid=3D"left_tile" />
        <mirror x=3D"$tile.width" y=3D"0" dir=3D"horizontal">
            <recall srcid=3D"left_tile" />
        </mirror>
    </composite>


The problem comes from the fact the *any valid XML file is a tree* and
should have a *single root*. So I added a root to the XML image:

    <imgproc>
        <img id=3D"tile" src=3D"/home/sweet/img/niceTile.png" />
=09
        <composite id=3D"left_tile" width=3D"$tile.width" height=3D"$tile=
.height">
            <recall srcid=3D"tile" />
            <mirror x=3D"0" y=3D"$tile.height" dir=3D"vertical">
                <recall srcid=3D"tile" />
            </mirror>
        </composite>
=09
        <composite width=3D"$tile.width" height=3D"$tile.height">
            <recall srcid=3D"left_tile" />
            <mirror x=3D"$tile.width" y=3D"0" dir=3D"horizontal">
                <recall srcid=3D"left_tile" />
            </mirror>
        </composite>
    </imgproc>

and got the wanted output
http://cynode.projet-enoch.net/resource/xml/xml_to_xhtml_out.html

But now AfterStep doesn't understand this data.

So could libAfterImage XML image format be valid XML, and always require
a single root element, such as <imgproc> [1] ?

I've already reported the lack of quotes and made a patch about it in
the first place, but I'm sorry to have spotted this later point only
now.

I'm of course willing to help.


Cheers,

[1] : the <imgproc> element is just a suggestion

--=20
Marc-Aur=E8le DARCHE  <http://www.cynode.org/>
AFUL <http://www.aful.org/>
Association Francophone des Utilisateurs de Linux/Logiciels Libres
French speaking Linux and Libre Software Users' Association
_______________________________________________
As-users mailing list
As-users@afterstep.org
http://mail.afterstep.org/mailman/listinfo/as-users