entities in SXML

My letter to the ssax-sxml mailing list:


the SXML specification allows only one sort of entities, namely, unexpanded entities. The only use for them is in XMLs like this:

<!DOCTYPE zzz [
<!ENTITY figure1 SYSTEM "image1.cgm" NDATA CGM>
<img entity="figure1"/>

But I want to use "normal" entities:

&product;&nbsp;&mdash; AAA

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"):

... (*REF* "product") (*REF* "nbsp") (*REF* "mdash") " AAA" ...

Any objection to the approach? Will you use the same method if you will need such entities?


1. I found a letter in archives:


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).

Categories: Generative XML