Frank Ellermann" <nobody(_at_)xyzzy(_dot_)claranet(_dot_)de> wrote:
dave wanta wrote:
How about something like:
<cidr>
<address>206.13.01.48</address>
<block>25</block>
</cidr>
Okay. Now show me a DTD allowing this document, but catching
<cidr><address> foo </address><block> bar </block></cidr>
as nonsense. AFAIK that's something you can't do with XML,
and my foo bar example would be "valid" under your cidr-DTD.
As long as everyone agrees on it (or you say "this is how
it's going to be ;-) ), it should be fine.
ACK, quite often you see relevant parts of the syntax "hidden"
in a comment of the DTD. If you have attributes like "uri",
"href", or "src", then the corresponding DTD says that the
parameters should be URIs in a comment. But it only specifies
CDATA (character data), allowing almost anything, because XML
cannot specify the syntax of number, IP, CIDR, or URI.
You can't do that in a DTD, but you certainly can in a schema.
Peter
--
Peter Bowyer
peter <at> bowyer.org
Freelance technical architect and writer
Spamblog: http://spamblog.bowyer.org