entities in SXML
My letter to the ssax-sxml mailing list:
Hello,
the SXML specification allows only one sort of entities, namely, unexpanded entities. The only use for them is in XMLs like this:
[code] <!DOCTYPE zzz [ ... <!ENTITY figure1 SYSTEM "image1.cgm" NDATA CGM> ... ]> <img entity="figure1"/> [/code]
But I want to use "normal" entities:
[code] &product; — AAA [/code]
Unfortunately, this sort of entities doesn't fit to SXML specification. So I'm going to use my SXML dialect for them (*REF* is for "reference"):
[code] ... (*REF* "product") (*REF* "nbsp") (*REF* "mdash") " AAA" ... [/code]
Any objection to the approach? Will you use the same method if you will need such entities?
Notes.
1. I found a letter in archives:
http://sourceforge.net/mailarchive/message.php?msg_id=7743681
It suggests trying a the existing SXML notation *ENTITY*. But, in my opinion, it's just an ugly workaround, not a clean solution.
2. Please look at the sample XML above. One can't convert it to SXML tree without losing information that the entity name was "figure1" (but I don't know if it is a problem or not).