[racket] xslt
On Sat, Feb 28, 2015 at 11:23 AM, Neil Van Dyke <neil at neilvandyke.org>
wrote:
> DJ wrote on 02/28/2015 11:49 AM:
>
>> I have spent a half hour searching for info on how to run xslt transforms
>> in racket. All that I can find is a mention that sxml /used to have/ xslt
>> but doesn't any more. I would prefer native racket rather than some kind of
>> ffi solution if possible.
>>
>
> I don't know (I made my own transformer languages back when I did more
> XML), but you can try looking at Oleg Kiselyov's documents about SXML
> transformation, at:
> http://okmij.org/ftp/Scheme/xml.html#SXSLT-examples
>
> With that knowledge, then either:
> * wait for someone (John Clements?) to speak up and say they've packaged
> that code of Oleg's;
> * grep the source of the available SXML-related Racket packages to see
> which has Oleg's definitions, and the exact names; or
> * turn Oleg's code from his site into a new Racket package.
>
> I wouldn't use FFI at all; I suspect that SSAX and SXML are better than
> anything one could get through FFI.
>
Ooh! Ooh! "I've packaged that code of Oleg's".
More specifically, I'm mildly embarrassed to report that it took me 20
minutes to determine for sure that in fact the sxml package already
contains "that code of Oleg's"; I see that the documentation made no
explicit mention of SXSLT, and I've now repaired that.
With that said, SXSLT does not carry out XSLT transformations; instead, it
defines its own similar language. If you have a sizeable library (hundreds
of transformations? thousands of transformations?) that aren't all slight
variations on the same thing, you'd probably be better off using an
existing XSLT implementation. If you have only a few, or if they're all
small variations on the same thing, I would urge you to consider using
something like
SXSLT.
If you'd care to show one such transformation (and I fully understand why
you might *not* wish to do so), it would be easier to gauge the difficulty
of the translation.
Best,
John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20150302/b0c5a18d/attachment-0001.html>