[Home] [By Thread] [By Date] [Recent Entries]
From: Roger L. Costello <costello@m...> >Why doesn't XML support the notion of an unordered list of elements, >i.e., a Bag? Perhaps this is a limitation of DTD, not XML? That is, >DTDs do not support Bags, but XML has no such inherent limitation? Does >DCD support Bags? /Roger Answer A: XML does have a way to support Bags: its called RDF. Answer B: SGML DTDs could support bags, because they had an operator "&" to mean required, but in any order. XML DTDs do not have this because everyone said it was so difficult to implement. But then many people said oops, because it would have been nice for database data. Answer C: XML elements have order as a property. However, whether that property is significant in the context of a document type depends on the document type, and sometimes just on the kind of processing being performed at that stage in the document's life. So you could just as easily say that XML has bags but no sets. Answer D: XML is not a data modeling language. It is a data-model modeling language. So you decide what semantics you are to put. This takes place entirely outside the area of what DTD's attempt to do, which is just to provide a simple grammar for the data-model modeling. Answer E: XML does have a way to support Bags: its called architectures. On any element you attach an attribute that ties it to some other element with known properties. For example, you tie your parent element to html:ul for a bag and html:ol for a set. Answer F: There are whole areas of fundamental semantic ways to slice things: you want sets and bags, I want rhetorical relationships (I would love if I could point at any element and know what the appropriate heading for it was; I would love it if that heading was carted around during cutting and pasting.) If you think bags and sets are really important, then encourage the schema working group to include that information. Take your pick! Rick Jelliffe Author: The XML & SGML Cookbook: Recipes for Structured Information Prentice Hall, ISBN 0-13-614223-0 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/ and on CD-ROM/ISBN 981-02-3594-1 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...)
|

Cart



