Go to the previous, next section.

Managing the DTD

PSGML need to know about the DTD you are using for many of its commands. If you have a `DOCTYPE' declaration in your file, PSGML will try to parse this. Either the first time you do something that needs to parse the document or with the command sgml-parse-prolog. Big DTDs take some time to parse. You can have the `DOCTYPE' declaration in another file either by setting sgml-parent-document to the other file or by creating a saved DTD and setting sgml-default-dtd-file to that file.

If parsing the DTD takes long time you can save the parsed DTD in a file using the command M-x sgml-save-dtd. Next time you can have PSGML load that file instead of parsing the DTD. For Emacs to find the saved DTD you must either save the DTD using the default name or do a M-x sgml-save-options after saving the DTD.

User Option: sgml-default-dtd-file

This is the default file name for saved DTD. This is set by sgml-mode to the buffer file name less extension plus the extension .ced, if that file exists. Can be changed in the Local variables section of the file.

User Option: sgml-parent-document

This can be set to a file name (a string) of a file containing the `DOCTYPE' declaration to use, or a list (filename doctypename), where filename is a file name of a file containing then `DOCTYPE' declaration to use with the modification that the document type name is doctypename.

If you change the doctype you must execute sgml-parse-prolog, changes in the doctype are not automatically recognised.

Go to the previous, next section.