Rexsel — A simpler way of writing XSLT
Posted: Thu Jun 13, 2024 2:17 pm
Hi
I have been working with XSLT/XML (using oXygen) for sometime
now (>20 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.
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 runs on MacOS and Linux. It is
writtenn 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 simple example of Rexsel
More information, downloads and news can be found on the Rexsel Web
site: https://www.rexsel.org/. The Rexsel site and the Paloose web site
both use Rexsel to produce the XSLT code that is used extensively
throughout. I have found that I write scripts much faster (and more
error free) using Rexsel.
Feel free to download and play with it. Any comments will be useful
to hear, either here or at the Email (hsfr@rexsel.org).
=================================
Hugh Field-Richards
www.hopvine-music.com
www.paloose.org
www.rexsel.org
I have been working with XSLT/XML (using oXygen) for sometime
now (>20 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.
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 runs on MacOS and Linux. It is
writtenn 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 simple example of Rexsel
Code: Select all
stylesheet {
version "1.0"
function helloWorld { // Translates to <template name="helloWorld">...
element "div" {
attribute "class" "simpleBox"
text "Hello World!"
}
}
}
site: https://www.rexsel.org/. The Rexsel site and the Paloose web site
both use Rexsel to produce the XSLT code that is used extensively
throughout. I have found that I write scripts much faster (and more
error free) using Rexsel.
Feel free to download and play with it. Any comments will be useful
to hear, either here or at the Email (hsfr@rexsel.org).
=================================
Hugh Field-Richards
www.hopvine-music.com
www.paloose.org
www.rexsel.org