Simple Example of Aggregating Modifiers in DTDs

Suppose you want a book element to always contain exactly one title element and any number of author elements. The title and author elements contain only raw data. To accomplish this, you would perform steps that generate the following tree representation:

book
               

              
Sequence
                   
title
                   
One or More
                   

                
author title
Zero or More
                   
#PCDATA
                   

                
author
Zero or More
                   
#PCDATA
                   

                

In the book element definition, Sequence modifies book and One or More modifies Sequence. Because the title element immediately follows the Sequence modifier, the default occurrence rule is assumed. That is, the title element must appear exactly once. In the Text view of the DTD, the definition for the book element is as follows:

<!ELEMENT book (title, (author)+)>
       

    

Oil, Gas & Electric Companies That Use Stylus Studio

Oil, gas & electric companies know a good resource when they see it. That's why they use Stylus Studio as their #1 XML resource. Come see which of these top oil, gas & electric companies are conserving their time and labor with Stylus Studio.

Switch to Stylus Studio: Customer Testimonials

Read in their own words, why customers have decided to make the switch to Stylus Studio, the World's best XML editor.

Microsoft XML Tools

Build Microsoft XML applications with Stylus Studio, which includes development support for all Microsoft XML technologies, including MSXML and Microsoft System.XML (Microsoft XML Parsers), SQL Server 2000, SQL Server 2005 (Yukon), and more.

Convert DTD to XSD

learn how to convert DTD to XML Schema

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.