XML QuotedCData question

lee at sq.com lee at sq.com
Mon Mar 10 17:18:21 GMT 1997


Thanks for replying, Norbert.  You are taking me a little more
literally than I meant -- you're right that macros in C are
a cleaner design than the SGML botch, and can be implemented in
a separate pass more easiy.

However,

> <!ENTITY %UnixSpecifics SYSTEM "http....">
> 
> <![%Dos;[
> %DosSpecifics;
> ]>

is very like
#define DOS 1

#ifdef DOS
#  include DosSpecifics
#endif

except that CPP allows general expressions there.

It turns out that more robust programming language avoid macros
altogether (e.g. C++) because there is isufficient compile-time
checking, but that doesn't really affect XML!

When I've looked at this in the past for SGML, it has seemed to me that
one coud only do partial expansion with a pre-processor.

But really I was thinking of a conceptually separate pass rather
than a completely separate one -- you'd need to have some feedback and
a shred symbol table.  It may also be appropriate to treat parameter
entities and text entities quite differently -- I'm not sure.

Lee


xml-dev: A list for W3C XML Developers
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To unsubscribe, send to majordomo at ic.ac.uk the following message;
unsubscribe xml-dev
List coordinator, Henry Rzepa (rzepa at ic.ac.uk)




More information about the Xml-dev mailing list