Re: Loops in DTD?
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@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format