News Products Support Download Licenses Company

Home > Products > upCast > Support > TechNote 1

 

HowTo 1

Supplying additional DTDs

Summary

This document describes how to add additional local DTDs to upCast for validation and processing purposes.

Catalog files

What it is

To find local copies of DTDs, upCast makes use of so-called catalog files. Catalog files are in their simplest form translation tables mapping a public identifier to a file kept (in most cases) locally on your computer. The mapping can be both for public and system identifiers.

Each time the XML parser need to access a DTD or external entity, it asks an entity resolver component for it. This component can be configured using catalog files, so you can redirect e.g. a request for the system id http://someserver.com/mydoctype.dtd to file:///DTDs/mydoctype.dtd and thus avoid a HTTP connection and retrieval operation from the net. This both speeds up processing, reduces network traffic and lets you even work when offline.

upCast can be configured to use such a catalog file. To tell upCast which one to use, call Extras > Choose XML Catalog File... and choose the catalog file to use from then on. This catalog is remembered across sessions and it is used until a different catalog is set.

upCast's default catalog file

The first time you run upCast on your system, you will be asked whether you want the application to set up a default catalog. It is highly recommended to do this or use Extras > Setup Default XML Catalog to have it done some time later. This not only installs the upCast DTD locally, but also automatically lays out the directory structure we recommend for later adding your own DTDs.

Adding an additional DTD

To add your own local DTD to the pool of DTDs upCast should know about, follow these steps:

  1. If you haven't already, install the default catalog by choosing Extras > Setup Default XML Catalog. This will place the current upCast DTD on your hard drive under {DTDs Folder}.

  2. Quit upCast.

  3. Download the infinity-loop DTD pack. This is a .zip file including a few standard DTDs commonly used with upCast. Extract the archive and follow its included installation instructions.

  4. Put the constituent files of the new DTD (preferably enclosed by a folder) into the {DTDs Folder}.

  5. In the {DTDs Folder}, you'll find a file named catalog. This catalog is used as an include file to reference the installed DTDs' own catalog files. Edit this file to also have an appropriate entry for resolving your DTD's public or system identifier, or to include its own catalog file if it comes with one. Examples:

    Mapping the PUBLIC identifier:

    PUBLIC "-//company//DTD MyDTD 1.0//EN" "file:MyDTDFolder/mydtd.dtd"

    Mapping the SYSTEM identifier:

    SYSTEM "http://www.company.com/dtd/mydtd.dtd" "file:MyDTDFolder/mydtd.dtd"

    Specifying a catalog:

    CATALOG "file:MyDTDFolder/catalog"

  6. Start upCast and pick the just edited catalog file as the one to use using Extras > Choose XML Catalog File... .

 

back to upCast Support Page


Author: Christian Roth
Last revised: 2004-03-29 11:55


© 2003-2007 infinity-loop GmbHSend mail to WebmasterAnbieterkennzeichnung §6 TDG