Lists Home |
Date Index |
From: "John Cowan" <firstname.lastname@example.org>
> The alternative is having gobs of character entities built into every XML
> parser. They are built into every HTML parser, true, but XML parsers have
> a lot wider domain of application, and often need to be more lightweight.
It strikes me that a variant is to allow a parser to supply its own definitions
for the standard entities.
So no DTD is needed. If someone uses character entities in a document
being sent to a lightweight parser that didn't provide its own declarations,
it would be a WF error, as currently exists. And a bantemweight parser
could provide declarations for the HTML sets but not the MathML and
extended ISO sets. But the size of declarations for entities dwarfs the
size of code for the rest of the parser (e.g. look at Xerxes, ye gods)
anyway, except for people who are hard up for every byte of ROM.
Doesn't this compromize interoperability? Yes, but only in the same way
that currently XML errs on the side of flexibility for characters: if you
send your XML in UTF-8 with no entity references it will get through:
if you send your document in your local character set with entity
references, you are doing so based on your expectations about what
capabilities your receiving XML processors will have.