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


Help: OASIS Mailing Lists Help | MarkMail Help



   Are elements allowed to nest within themselves?

[ Lists Home | Date Index | Thread Index ]
  • From: Chris von See <cvonsee@onramp.net>
  • To: xml-dev@ic.ac.uk
  • Date: Wed, 09 Sep 1998 14:48:33 -0500

The XML 1.0 spec is unclear (unless I missed the reference) on whether or
not an element can nest within itself.  For example, let's say I define a
DTD with:

<!ELEMENT foo ( foo*, bar* )>


and a document with: 

<!-- top-level "foo" element -->
     <!-- first nested "foo" element -->
     <foo answer="yes">
          <bar>this one</bar>
          <bar>that one</bar>
     <!-- second nested "foo" element -->
     <foo answer="no">
          <bar>the other one</bar>
     <!-- third nested "foo" element (empty) -->

Is this legal?


xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)


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

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