Working with DTDs

  1. Open or create a DTD:
    1. In the Uniface IDE, choose More Editors >DTD.
    2. Select an existing DTD or enter the name of a new DTD.

      The Define DTD dialog box is displayed. This is the main interface of the DTD Editor.

  2. To open a DTD from a file:
    1. In the DTD Editor, choose File >Load from file... and open the desired DTD file.
    2. Choose File >Save or compile the DTD to store the DTD in the Repository.
  3. To define a DTD, you can generate a DTD from modeled entities or component data structures, or you can manually define a DTD. For more information, see:
  4. Compile the DTD:
    • In the DTD Editor, choose File >Compile DTD.
    • Alternatively, use the command line switch /dtd to compile your DTDs.

      Tip: If the DTD is not valid, view the Message Frame (Ctrl+M) to locate the problem.

  5. Make a DTD available to non-Uniface components:
    1. Open the DTD in the DTD Editor and click Properties.
    2. Enter a File Name and External Reference.

      These properties ensure that the DTD is saved as an external file and that Uniface references the location in the XML stream generated by the ProcScript statement xmlsave/ref.

      Use xmlsave/dtd to include the DTD in the XML stream, ensuring that it is available to 3GL components.

      Uniface components always read DTD data from a UAR file. 3GL components cannot access the UAR file, so Uniface provides alternate means to pass DTD information to non-Uniface components.

      Only the DTD declarations are made available. Additional DTD properties, such as the default mapping between Uniface entities and fields and the DTD, are not provided.

Related Topics