OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Re: [xml-dev] creating a DTD without order?

[ Lists Home | Date Index | Thread Index ]

Ravi --

You ask:
>How can I prepare a DTD with the child elements need not be in the same order specified as in DTD. But the each element has its own occurrence constraint.

If you mean, "How can I create an XML DTD ... " the answer is that you can't.

You can create an SGML DTD that allows child elements in any order but imposes occurrence constraints on the child elements. (You may know that XML started out as an easy to implement sub-set of SGML - and the function you ask for is one of many capabillities of SGML that was left out of XML.)

Or, you can create an XML Schema that expresses that. I know that W3C XML Schema supports that, and I suspect that several of the other schema languages, schema systems, and schema philosophies that seem to be springing up like mushrooms also support it.

>Can somebody help in resolving this problem. I just do not want to make ordering permutaions for the elements because I have a very big number of chile elements.

And you have to be very careful when you generate all the permutations so that your model is not "ambiguous" in the XML DTD sense.

-- Tommie
B. Tommie Usdin                        mailto:btusdin@mulberrytech.com
Mulberry Technologies, Inc.                http://www.mulberrytech.com  
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML              


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS