Home >Online Product Documentation >Table of Contents >Defining Structure Rules in a Sample DTD
This topic is part of a sequence that starts with Creating a Sample DTD.
book element can include one or more elements.
title in the entry field and press Enter.
Because the reference to the title element appears immediately after the Sequence modifier, the DTD editor assumes that the default behavior is what is wanted. That is, the book element must contain exactly one instance of the title element.
author elements in each book element.)
author in the entry field and press Enter.
At this point, the definition of the book element is complete, and the tree diagram of bookstore.dtd should look like this:
However, you have not yet specified that you want the book element itself to be optional. You need to do this in the element that references the book element. For example, suppose the bookstore element is the root element in XML documents that use this DTD. Further suppose that you want the book element to be a child of the bookstore element.
bookstore in the entry field and press Enter.
book in the entry field and press Enter.