WD6: SGML: Parser Errors Importing .sgm File

ID: Q125887

The information in this article applies to:

SYMPTOMS

During the import of an .sgm file, the converter produces parser errors similar to the following:

   SGML Parser: Error at C:\...\FILENAME.sgm, line 1 in declaration
   parameter 4: Could not find external document type "DOC"

   SGML Parser: SGML error at C:\...\FILENAME.sgm, line 2 at record start:
   No definition for DOC document type; "DOC O O ANY" assumed

CAUSE

Word cannot find the .dtd file. By design, Word looks at the declaration (.dcl) file to determine the location of the .dtd file. The location of the .dtd file is specified using the following syntax:

   <!DOCTYPE doc SYSTEM "example.dtd">

Word expects to find the .map file in the same directory as the .dtd file. When it does not, the parser errors occur.

RESOLUTION

Use one of the following methods to specify the location of your files:

Method 1

Modify the DOCTYPE identifier so that the SYSTEM path points to the correct drive and directory:

   <!DOCTYPE doc SYSTEM "n:\dtd\example.dtd">

Method 2: Use a Public Identifier to Locate the .dtd File

To do this, use the following steps:

1. Change the doctype statement in the declaration (.dcl) file. For

   example, the DOCTYPE statement might look like this:

      <!DOCTYPE DOC PUBLIC "-//Microsoft Corp//DTD Sample DTD for SGML
   Author//EN" >

2. Add the path for the directory containing your .dtd file to the
   beginning of the entity catalog (Entm.cat), and then add an entry to the
   entity catalog that specifies the public identifier and the system
   identifier of your .dtd file. The entry in the Entm.cat might look like
   this:

      PUBLIC "-//Microsoft Corp//DTD Sample DTD for SGML Author//EN"
      "sample\sample.dtd"

REFERENCES

"SGML Author System Administrator's Guide," version 1.0, pages 92-93, 166, 169

Additional query words: 1.0 sgmlword 6.0 6.0a 6.0c winword word6 kb_sgmlauthor SGMLa

Keywords          : kbinterop kbdta kbsgml 
Version           : 1.0 6.0 6.0a 6.0c
Platform          : WINDOWS

Last Reviewed: April 8, 1999