Loops in DTD?
Peter Murray-Rust
peter at ursus.demon.co.uk
Sat May 2 15:34:53 BST 1998
At 15:39 02/05/98 +-300, Crystian wrote:
>Hi,
>
>I make an vadidating XML processor. Until now, the processor can make a
complex tree from data from Document Type Definition and validat the
declaration from it. I am not sure if this tree can contain loops.
>
>I mean something like this:
>
><!DOCTYPE root [
> ...
> <!ELEMENT element1 (element2*)>
> ...
> <!ELEMENT element2 (element1?)>
> ...
>]>
This is legal XML. Anyone who is in doubt about whether their XML is legal
should download one of the free parsers and see if it throws errors. For
some sorts of people (e.g. me) it's easy to rely on the computer first of
all rather than reading the spec. Apart from a very few minor bugs (and
pre-XML V1.0 implementations) the parsers should be the touchstone of your
XML. I shall be releasing several parsers on the JUMBO-CDROM - see separate
posting today.
An XML document instance never contains loops. If the DTD is expanded so
that element content is recursively displayed may contain loops. This can
make it quite difficult to display. For example Earl Hood's very nice
dtd2html tool showed the content of the first occurrence of an element and
added an ellipsis for others. An alternative way is not to expand the
children recursively but to add hyperlinks. This works fine on screen but
not on cellulose.
HTH
P.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
net connection
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
http://www.venus.co.uk/vhg
xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)
More information about the Xml-dev
mailing list