[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: And the DTD says, "I'm NOT dead yet!!"
- From: Norman Walsh <firstname.lastname@example.org>
- To: email@example.com
- Date: Tue, 09 Jan 2001 07:52:15 -0500
/ Caroline Clewlow <firstname.lastname@example.org> was heard to say:
| I can see that XML schema does not cover entity declarations - but
| RELAX claims that it's use of hedgeRules allows the creation and
| naming of a hedge model that mimics the way parameter entities are
| used in DTD's. Is this the same kind of entity, as the word seems
| to be used in a number of different contexts ?
There are two kinds of entities (roughly speaking) in XML:
parameter entities and general entities.
Parameter entities are used as a mechanism for parameterizing DTDs.
They are expanded only inside the DTD (or internal subset). Parameter
entities are introduced with a "%". %list.class; and %book.title.content;
are parameter entities.
General entities are used in XML documents: things like &ndw; and
é are general entities.
RELAX's hedgeRules and some features of XML Schemas are designed to provide
the features that parameter entities provide in DTDs.
XML Schemas provide no mechanism for declaring general entities. (This
isn't an oversight on the part of the XML Schema WG, it's a consequence
of how schema validation is defined. Briefly, schema validation is performed
on the information set constructed by parsing the document. But the parser
needs to know about entity declarations *while it's parsing* so schema's
just occur "too late" in the process to practically declare entities.)
Be seeing you,
Norman.Walsh@East.Sun.COM | The stone fell on the pitcher? Woe to the
XML Technology Center | pitcher. The pitcher fell on the stone? Woe
Sun Microsystems, Inc. | to the pitcher.--Rabbinic Saying