newbie-ish DTD question: am i asking too much of XML, or of my brain?
Rick Wayne
fewayne at facstaff.wisc.edu
Tue Sep 21 19:01:13 BST 1999
hi all,
i have an astoundingly simple document format that i want to define via
a DTD, and can't get the parsers to let me do it. so far i've looked in
_the_XML_companion_, _the_XML_black_book_, and perused the spec. my
ignorance still throbs mightily.
in english:
i want my documents to consist of a "model" element. a model can
contain "topics" and "links", any number, in any order. in turn, topics
can contain topics and links, in any number, in any order. i can
tighten up the rules a little if need be -- for instance, requiring that
models contain at least one topic. but because these represent
mathematical operations, i can't just require that the topics come first
and the links follow (e.g., <!ELEMENT model(topic*, link*)>.
in (attempted) XML, with ATTLIST tags removed:
<?XML version="1.0" encoding="UTF-8" standalone="no"?>
<!ELEMENT model (topic* link*)>
<!ELEMENT topic (topic* link*)>
<!ELEMENT link>
all non-profane feedback gratefully accepted.
thanks for taking the time to have a look. if you wish to respond via
private email instead of replicating to the list, that's dandy-fino with
me. i doubt this problem is sufficiently generic to interest everyone.
rw
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/ and on CD-ROM/ISBN 981-02-3594-1
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