[cxml-devel] Ho do I write the following on a sink?

David Lichteblau david at lichteblau.com
Wed May 11 12:22:15 UTC 2011


Hi,

Quoting Marco Antoniotti (marcoxa at cs.nyu.edu):
> I am trying to write "Λ" on a sink.

I don't think either the serializer nor xhtml-generator have special
features to support writing entity references.

But you can write this:
  (sax:unescaped sink "Λ"))
which will do what you are asking for (but means that you need to take
care that the string is actually well-formed; cxml will not do any
escaping or checking itself).


So is there a reason for the lack of entity reference writing support?
Mainly just that I've never needed it myself.  Usually I would just
write the actual character.  Λ means the same thing as the
character with the code 923 on any Lisp with Unicode support, and every
XML parser can Unicode characters.

In contrast, parsers need to have the DTD available to be able to read
such an entity reference, and I think that the XML world in general is
moving away from DTD use; it's usually more hassle than it's worth to
ensure that an XML parser has the DTD available.


d.




More information about the cxml-devel mailing list