W3C home > Mailing lists > Public > xmlschema-dev@w3.org > June 2001

elements in dtd

From: <asi@acad.umass.edu>
Date: Thu, 28 Jun 2001 16:46:06 -0400 (EDT)
To: xmlschema-dev@w3.org
Message-id: <993761166.3b3b978e11f61@mail-www.oit.umass.edu>
Hi,
  I'm new to xml and am trying to create a dtd. I am wondering if I can have 2 
elements as children of each other. for eg. look at the following where I 
have "OnFailure" as a child-element of "Constraint" and then  "Constraint" as a 
child-element of "OnFailure".

  
<!ELEMENT Constraint (Formula,Condition,OnFailure) >
<!ELEMENT Formula (#PCDATA) >
<!ELEMENT Condition (#PCDATA) >
<!ELEMENT OnFailure (Formula|Constraint)

Also then, will I need to declare "Constraint" again as a child 
of "OnFailure"?... which would become a never ending process.

Finally, if I use an element as a child of a number of other elements, do I 
need to declare it for all of them? for eg., in the example above, do I need to 
declare "Formula" under both "Constraint" and "OnFailure"?

Thanks in advance,
Akshaye
Received on Thursday, 28 June 2001 16:48:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 11 January 2011 00:14:21 GMT