The SXML specification allows only one sort of entities, namely, unexpanded entities. I can't find how to map them to the libxml2 tree, so converter just throws away *ENTITIES* nodes.
On the other side, there is not support for "normal" entities. So I decided to extend SXML specification, invented *REF* node, but finally switched to the Neil W. Van Dyke's form:
The second element of the "&" form can be a string, symbol, or (for character ordinal values) a nonnegative integer:
I don't think that allowing a symbol is a good idea, but decided to accept it too.
Conversion from SXML to XML for entities works now. Example:
<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" (& 777))) (title "Hello") (para "Hello, " (& entityI) (object "World") (& entutyII) "!")) </s:scheme> </x:template> </x:stylesheet>
This stylesheet produces:
<article id="hw̉"> <title>Hello</title> <para>Hello, &entityI;<object>World</object>&entutyII;!</para> </article>