[xsl] Rexsel — A simpler way of writing XSLT

Subject: [xsl] Rexsel — A simpler way of writing XSLT
From: "Hugh Field-Richards hsfr@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Sun, 30 Jun 2024 11:03:24 -0000
Hi

I have been working with XSLT/XML for sometime
now (>25 years) and have been minded to look at alternative
ways of generating XSLT scripts. As a result I have produced a
language REXSEL that provides a simpler means of writing
XSLT stylesheets.

More information, downloads and news can be found on the
Rexsel Web site: https://www.rexsel.org/.

Currently there is only support for XSLT1.0 and XSLT1.1. This is
because the hosting servers I use only support these two versions
of XSLT and I wanted Rexsel for my sites that are hosted there.
I have investigated XSLT2 and XSLT3 and see no reason why
Rexsel should not be extended to support these later versions.

The syntax follows the same underlying structure as XSLT, but is written
in a form that is akin to languages such as C or Swift. I have written a
compiler, and an "uncompiler" for translating from Rexsel to XSLT and
vice-versa.

There is a command line compiler that can be built on MacOS or Linux. It is
written in Swift as a pair of Swift Packages: CRexsel (the command line
tool) and RexselKernel (the actual compiler). The latter is also
used as the heart of a MacOS only editor (very simple) which compiles
Rexsel code "on the fly" giving real time error reports and a symbol
table, although the app is not quite ready for release in the wild.

The following is a very simple example of Rexsel

    stylesheet {
        version "1.0"

        proc helloWorld {   // Translates to <template name="helloWorld">...
            element "div" {
                attribute "class"  "simpleBox"
                text "Hello World!"
            }
        }
    }

Currently there are three sites that use Rexsel to produce the XSLT
scripts (done at build time not bon the flyb when pages are requested):

    b" the Rexsel site (https://www.rexsel.org/) showing more extend
examples.
    b" the Paloose web engine web site (https://www.paloose.org/).
    b" my music publishing site, Hop Vine Music
(https://www.hopvine-music.com/).

The latter is only partially supported currently as I have not had the time
to fully update it. In all cases I have found that I write scripts much
faster
(and error free) using Rexsel.

Feel free to download and play with it, if anyone thinks it is useful then
great.
Any comments will be useful to hear, either here or at hsfr@xxxxxxxxxxx

Good luck!

Hugh F-R

=================================
Hugh Field-Richards
hsfr@xxxxxxxxxxx
www.hopvine-music.com
www.paloose.org
www.rexsel.org

Current Thread