WD6: SGML: Parser Errors Importing .sgm File

Last reviewed: March 6, 1998
Article ID: Q125887
The information in this article applies to:
  • Microsoft SGML Author for Word, version 1.0
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c

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 reference words: 1.0 sgmlword 6.0 6.0a 6.0c winword
word6 kb_sgmlauthor SGMLa
Keywords : kbsgml kbinterop kbdta
Version : 1.0 6.0 6.0a 6.0c
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: March 6, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.