Defining Elements in DTDs

You can define an element in the Text or Tree tab.

In the Text Tab

In the Text tab, you enter the text that defines your element and describes its structure. For example, to define a Catalog element that can contain one or more Publisher elements, followed by zero or more Thread elements, followed by one or more Book elements, you would enter the following:

<!ELEMENT Catalog ((Publisher)+,((Thread)*,(Book)+))>
               

            

When you define elements in the Text tab, you must know the syntax and keywords for what you want to define. This information is publicly available on the World Wide Web. Stylus Studio documentation does not include instructions for defining a DTD in the Text tab. For DTD information, see, http://www.w3.org/TR/REC-xml.

In the Tree Tab

When you use Stylus Studio, it is easier to define an element in the Tree tab. In the Tree tab, you click New Element Definition , and Stylus Studio takes care of the syntax and keywords. In the Tree tab, definition of an element requires that you

1. Create the element by specifying its name. To do this, see Defining Elements in the DTD Tree Tab, which is the first topic in this section.
2. Define the structure of the element by specifying modifiers, defining where raw data is allowed, and adding references to other elements. To help you do this, this section discusses the following topics:

Create XML Schema from XML Content

Create XML Schema from XML Content by auto-generating an XML Schema with Stylus Studio.

XQuery Integration

Learn how new XQuery technologies can simplify legacy data integration by leveraging industry standards, proven open-source XML processing components, and Stylus Studio's integrated XQuery & XML tools.

Validating EDIFACT Documents with XML Schemas

Either before or after transforming EDIFACT content, generated XML Schemas will make sure that we have all of the necessary components, our codes are all according to the standard codelists, and every little delimiter is in the right place.

DTD Parser

Learn about the powerful DTD parser technologies that are supported in Stylus Studio's DTD tools, including DOM and SAX based DTD parsing components.

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.