I am talking about a tag set. First instance. A parent tag of
<AddressInformation> with children of <AddressLines><City><State><Zipcode>.
If this is specified in the DTD and run validated xml that is well formed
against that DTD it will fail. It is failing DTD validation. Where/how do
you specify order or not order in a DTD?
From: Wendell Piez [mailto:[log in to unmask]]
Sent: Thursday, September 27, 2001 4:55 PM
To: [log in to unmask]
Subject: Re: Order of XML Tags.
XML as such does not require that elements have any particular names or
come in any particular order.
The rules for specific XML languages, however (which are often specified
formally by means of a schema or DTD), may stipulate required orders for
the content of certain elements.
Whether "order is important" is too general a question to have a single
answer. That's why XML lets you do it both ways. Keep in mind there's a
very useful and important distinction between well-formed XML (that is,
it's syntactically correct and can be parsed) and XML that is valid to a
particular DTD or schema (that is, it's both syntactically correct, and in
conformance with the rules for a particular tag set). When order matters,
it's often a DTD or schema that enforces this (not "XML" itself).
One application of a schema is to configure an editor, which will then
enforce the order specified. (It might, for example, prevent a writer from
putting a chapter title anywhere but at the beginning of the chapter.)
Documents at W3C that state that a certain order is required, are
undoubtedly saying this within the context of a particular tag set or XML
At 01:36 PM 9/27/01, you wrote:
>I have noticed in some XML editors that the order or XML tags is important.
>I was not aware that the order was important as long as the hierarchy was
>maintained. Some documentations at W3C states that Order is Required.
>Any input on this would be greatly appreciated.
Wendell Piez mailto:[log in to unmask]
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
Mulberry Technologies: A Consultancy Specializing in SGML and XML