entities in SXML
"Oleg A. Paraschenko" <[email protected]> Fri, 11 Mar 2005 03:03:40 +0300
| Newsgroups | gmane.lisp.scheme.ssax-sxml |
|---|---|
| Organization | private person |
| Message-ID | <[email protected]> |
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). -- Oleg Paraschenko ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click