Creating DTDs

To create a DTD, select File > New > DTD Schema from the Stylus Studio menu bar. Stylus Studio displays the DTD schema editor.

The Stylus Studio DTD editor provides two views of a DTD. In the Tree view, Stylus Studio uses branches and leaves to represent the DTD. When you define a DTD in the Tree view, you do not need to know the details about DTD syntax. In the Text view, Stylus Studio displays the lines of text that make up the DTD. To define a DTD in the Text view, you must be familiar with DTD syntax.

If you are editing an XML document and you want to create a DTD for that document, click the Schema tab. Stylus Studio displays the Schema Not Found dialog box. Indicate that you want Stylus Studio to generate a DTD and indicate whether you want the new DTD to be internal or external. After you respond to the prompts and click Yes, Stylus Studio automatically creates the DTD for you and displays it in the Schema tab.

If you instruct Stylus Studio to create an internal DTD, you can update the DTD in the XML editor. If you instruct Stylus Studio to create an external DTD, you must explicitly open it to update it. An external DTD that Stylus Studio displays in the Schema tab is read-only.

To use Stylus Studio to validate an XML document against a DTD, see Validating XML Documents. If you update a DTD in Stylus Studio and that DTD is associated with an XML document that is open in Stylus Studio, Stylus Studio refreshes the schema information for the XML document.

Free Stylus Studio XML Training:
W3C Member