Figure 5-4 Pop-up on DTD file in the Outline view

Validating DTD

Another useful feature of the DTD editor is the incremental validation feature. At any point during your development of a DTD, you can invoke the Validate process to validate the DTD. Just right-click on the file name in the Navigator view, and select Validate DTD option. In addition to the manual invocation of the validation process, the validation is also automatically run when you save the document, or when you finish typing in the Source view (as indicated by switching focus to a different view). Any validation errors will be reported in the Task view with a little red marker for the corresponding line in the Source view and the corresponding object in the Outline view.

5.2.3 XSD editor

An XML Schema editor is a tool for creating, viewing, and validating XML Schemas. You can use the XML Schema editor to perform tasks such as creating XML Schema components, importing and viewing XML Schemas.

Creating a schema from scratch

In this section, we show how to create a new XML Schema. To create a new schema from scratch, use the New XML Schema wizard as follows:

￿Select File—>New—>Project—>Simple —>Project to bring up the New Project wizard to create a simple project.

￿Select File—>New—>XML Schema to launch the New XML Schema wizard.

￿In the File name field, type your schema file name.

￿Click Finish. The schema file is created and the XML Schema Editor is automatically opened for you, as shown in Figure 5-5 on page 86.

Chapter 5. Application Developer XML Tools 85

Page 101
Image 101
IBM Version 5 manual XSD editor, Validating DTD, Creating a schema from scratch