entities appear

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:

(& "rArr")
(& rArr)
(& 151)

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:

  xmlns:x = "http://www.w3.org/1999/XSL/Transform"
  xmlns:s = "http://uucode.com/xslt/scheme"
  version = "1.0">
<x:output indent="yes"/>
<x:template match="/">
    '(article  (@ (id "hw" (&amp; 777)))
      (title "Hello")
        "Hello, "
        (&amp; entityI)
        (object "World")
        (&amp; entutyII)

This stylesheet produces:

<article id="hw̉">
  <para>Hello, &entityI;<object>World</object>&entutyII;!</para>
Categories: Generative XML