文書型 > Editing DTDs > Importing an SGML Document
  
Importing an SGML Document
To import an SGML document to replace the current one:
1. With the DTD Editor open, place your cursor after the dtd start tag.
2. Select the contents of the dtd tags, and then choose Edit > Delete. In effect, you have removed the <!DOCTYPE … > statement.
3. Choose File > Import.
4. From the list in the File dialog box, select the DTD file you want to import.
To import an SGML document while leaving the current SGML document in the DTD:
1. Open the DTD Editor and place your cursor where you want to insert the new SGML document.
2. Choose File > Import.
3. At the prompt, enter the path and file name of the ASCII file you wish to import.
The text of the imported SGML document appears in the DTD Editor.
Your SGML document may contain publicly declared entity sets, which are entity declarations of the form <!ENTITY entityname PUBLIC publicname>. Examples of standard publicly declared entity sets include graphics, tables, and equations, which are already installed. If your SGML document contains these entity files, you need to do the following:
Install the entity files referenced by these entity declarations. We recommend installing these entity files in an alternate directory.
Add an entry to the file catalog in the directory that maps a Public Identifier to the file path that contains the entity. The entry must be in the following format:
PUBLIC "<Public Identifier>" "<file-path>"
Below are examples of the entries using the above format:
PUBLIC "ISO 8879-1986//ENTITIES Added Latin 1//EN" "iso-lat1.gml"
PUBLIC "-//Arbortext/DTD General Memo//EN" "memo/memo.dtd"
If your DTD includes graphics capabilities, you must enable graphics support in the .dcf file.