DTD Schema Editor Tree Tab

To display the DTD schema editor in Stylus Studio, select File > New > DTD Schema from the Stylus Studio menu bar. Click the Tree tab.

Alternative: In Stylus Studio, open a file with .dtd as the file name extension. Stylus Studio automatically opens the file in the DTD schema editor.

The Tree tab is the recommended way to define a DTD schema. You need not know DTD syntax. To add an element, entity, comment, or white space to your DTD, click the DTD node at the top of the display. Next, click the appropriate button in the left tool bar of the Tree tab.

Buttons for Editing

Refresh the tree display.

Delete the selected node.

Change the name of the selected node.

Move the selected node up.

Move the selected node down.

Toggle the display of white space.

Toggle Display of Entity References toggles the display of entity references in the tree. Stylus Studio displays either the entity symbols or the entity values.

Validate Document is not active when you are viewing a DTD.

Change the font used to display text in the DTD schema editor.

Open Schema allows you to open an external DTD, if the DTD has one. However, this is not yet supported.

Buttons for Adding Nodes

Table 67 describes the buttons in the left tool bar of the Tree tab. These buttons allow you to define elements, entities, and comments in your DTD.

Button
Description of New Node
New Element Definition
Define an element name.
New Attribute
Define an attribute name. This attribute is associated with the element that was selected when you clicked New Attribute.
New Modifier
Click an element node, and then click this button to specify a modifier for the data or subelements that you want the selected element to contain. You can specify the following modifiers:
  • Optional - It is optional whether the contained node appears in an instance document. If the contained node does appear, there can be only one.
  • Zero or more - There can be zero, one, or multiple instances of the contained node in an instance document.
  • One or more - This contained node is required. There must be at least one instance, and there can be multiple instances, of this contained node in an instance document.
  • Choice - The selected element can contain one of the subelements for which there are references after this modifier.
  • Sequence - This selected element can contain other elements. If the contained elements are present in an instance document, the sequence of the contained elements must be the same sequence in which they are defined.
New Reference to Element
Click a DTD Modifier node ( Choice or Sequence) and then click this button to specify an element that the parent element of the Choice or Sequence node can contain.
Add #PCDATA
Click a DTD Modifier node, and then click this button to add character data to the element node.
New Entity
Click the DTD node at the top of the document. Then click New Entity to define a general entity.
New Parameter Entity
Click the DTD node at the top of the document. Then click New Parameter Entity to define a parameter entity.
New Text
Click the DTD node at the top of the document. Then click New Text to add white space between elements, entities, or comments. Click the up arrow to move the white space.
New Comment
Click the DTD node at the top of the document. Then click New Comment to add a comment. Use the up arrow to move the comment. It can be between elements or entities. You cannot insert it among the nodes that define an element.
Table 67. Node Button Descriptions

For More Information

What Is a DTD?

Defining Elements in DTDs

About Modifiers in Element Definitions in DTDs

Defining General Entities and Parameter Entities in DTDs

Adding Comments to DTDs

XML Schema Mapping

Stylus Studio includes a visual XML Schema-to-XML Schema mapping tool that allows you to easily implement sophisticated XML data mappings involving multiple data sources and customized data processing using either XSLT or XQuery code.

Converting Custom EDI Message Types to XML

Vital and valuable legacy data locked in proprietary EDI files? See how to use DataDirect XML Converters™ custom EDI message type tools to convert nonconformant EDI to XML.

Using Stylus Studio with RenderX XEP

RenderX XEP is a production-quality engine that converts XSL:FO into PDF or PostScript files. You can use RenderX XEP in place of the Apache FOP engine to render PDF files from Stylus Studio.

XQuery Profiler

Stylus Studio's XQuery Profiler allows you to benchmark any XQuery expression, and it helps you locate and eliminate performance bottlenecks for maximum XQuery performance.

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.