Unexpectedly, I've got too little time for programming this evening. Anyway, the new code now can convert elements and attributes.
<x:stylesheet xmlns:x = "http://www.w3.org/1999/XSL/Transform" xmlns:s = "http://uucode.com/xslt/scheme" x:extension-element-prefixes="s" version = "1.0"> <x:output indent="yes"/> <x:template match="/"> <s:scheme> '(article (@ (id "hw")) (title "Hello") (para "Hello, " (object "World") "!")) </s:scheme> </x:template> </x:stylesheet>
<article id="hw"> <title>Hello</title> <para>Hello, <object>World</object>!</para> </article>
It was hard to implement conversion of attributes. I've used a small trick which is not guaranteed to work because I've misused the API a bit. I hope to write about it soon.