Chapter 5 Generating and reverse engineering an XSD, a DTD or an XDR file


How to generate an XSD, a DTD or an XDR file?

The type of generated file depends on which XML language the model has been targeted with:

Model targeted with Generated file
XML Schema Definition 1.0 XSD
Document Type Definition 1.0 DTD
XML-Data Reduced 1.0 XDR

The XML language of an XML model is displayed in the status bar (bottom-right corner of the screen) and in the model property sheet.

For more information on changing the XML language of an XML model, see section Changing the XML language of an XML model in chapter XML Model Basics.

Note   Parameter entities during DTD generation
Parameter entities are references to predefined values within a DTD file (See Parameter property in entity property sheet).
During DTD generation, some object properties containing inadvertently parameter values will be generated with parameter references. If you are not satisfied with this default use of parameter entities, you should clear the Parameter property before generation.

Steps To generate an XSD, a DTD or an XDR file from an XML model:

  1. Select Language→Generate XML Schema Definition File.

    or

    Language→Generate Document Type Definition File.

    or

    Language→Generate XML-Data Reduced File.

    The Generation dialog box appears.
  2. Type a destination directory for the generated file in the Directory box.

    or

    Click the Select a Path button beside the Directory box and browse to select a directory path.


    In the case of an XDR file, the Generation dialog box displays an Options page where the generation of comments (see Comment property in the General page of an object property sheet) is set by default. If you do not want a commentary to appear in the generated XDR file (within a <description> tag), you can set the Value to false.
  3. <optional> Select the Check model check box if you want to verify the validity of your model before generation.
  4. Click OK.

    A Result box appears indicating that the XSD, DTD or XDR file has been generated in the destination directory.


    The result is also displayed in the Generation page of the Output window, located in the bottom part of the main window.
  5. Click Edit to edit the XSD, DTD or XDR file with a plain text editor.
  6. Click Close in the Result box.

 


Copyright (C) 2005. Sybase Inc. All rights reserved.