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:

Stylus Studio's Advanced XQuery Mapper Features

Learn how to create an advanced XQuery expression in the XQuery mapper, specifying operations, constants, and ports, for use in conditional blocks and FLWR expressions. Free online video demonstration!

XSD Editor

XSD Editor provides a synchronized split-pane interface that simultaneously shows both a visual XSD Diagram and the underlying code, with changes in one pane immediately reflected in the other

XML Development Blogs

Blogging is the hottest fad on the Internet and Stylus Studio has jumped on the bandwagon. Bookmark these XML Blogs to keep up with all the latest XML buzz in the internet blogosphere. Includes RSS and Atom Feeds!

Learn XSLT and XQuery Profiling

Stylus Studio's Profiler can help you evaluate the performance of your XQuery and XSLT. Automatically generated, customizable, easy-to-read HTML reports provide insight into performance bottlenecks.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member