[Home] [By Thread] [By Date] [Recent Entries]

  • From: Brian Burridge <brian_burridge@c...>
  • To: xml-dev@x...
  • Date: Tue, 01 Aug 2000 12:27:02 -0400

Does anyone know if (and how) I can have one element contain itself?

For example, if I want to model web sites sections. A section can
contain other "sub"sections, which can contain other "sub"sections.

Can I do this:
<!ELEMENT section (name, description, section+)+>

So that my xml can be:
<section>
    <name>About Us</name>
    <description>The About Us section</description>
    <section>
        <name>Press Releases</name>
        <description>Press Releases</description>
    </section>
    <section>
        <name>Contact Us</name>
        <description>Phone numbers and emails for
personnel</description>
    </section>
</section>

I could model it with Section, and then "subSection" but that would only
give me two levels. If I wanted any number of levels, then I'd need to
allow the parent to contain itself.

--

Brian N. Burridge
Internet Architect
(727) 399-3000 Ext 3515
The Internet Group - ITSS
Cox Target Media

"Until a person can say deeply and honestly, "I am what I am today
because of the choices I made yesterday," that person cannot say, "I
choose otherwise."



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member