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:

XML Videos

Stylus Studio online XML video demonstrations illustrate how easy it is to learn advanced XML editing techniques. Now playing: Java Code Generation, Convert to XML, Grid View, and many other informative video demonstrations.

XML-DEV Blog

Join the XML Development discussion at XML-Dev - the hottest place to talk about XML technologies, trends, systems architecture and all the latest buzz. Bookmark this RSS and ATOM feed now!

Building DataDirect XML Converter Applications with Stylus Studio

DataDirect XML Converters are Java and .NET components that enable access to any data (flat files, EDI) from your application code. Learn how to deploy XML applications today.

XQuery Documentation Generator

Stylus Studio provides integrated support for xqDoc so you can generate XQuery documentation directly from the XQuery editor.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member