GNU Info

Info Node: (psgml.info)Precompiled DTD Subsets

(psgml.info)Precompiled DTD Subsets


Next: Using a Split Document Prev: Managing the DTD Up: Managing the DTD
Enter node , (file) or (file)node

Precompiled DTD Subsets
=======================

   If parsing the DTD takes too long time you can arrange to have PSGML
cache an internal complied version of the DTD.  Caching can be done of
DTD fragments in favourable situations.  It is possible to have an
external DTD subset cached but still have an internal DTD subset as long
as the internal subset does not define parameter entities that affect
the parsing of the external subset (*** what is the exact conditions?,
probably you can't use the cached external subset if the internal subset
defines parameter entities that are also defined in the external subset
with another value).

   To enable caching you have to create special catalog files, hereafter
called ECAT files due to (temporary) lack of imagination.  These
catalogs have similar syntax to the entity catalogs and there are two
variables containing lists of catalogs to search: `sgml-ecat-files' and
`sgml-local-ecat-files'.  The ECAT files can contain the following
types of entries:

`file DTDFILE ENTITYDEF CFILE'
     The DTDFILE is the name of a file containing a DTD subset that
     should be cached in CFILE.  The ENTITYDEF is optional and if given
     have the following syntax:
          [ NAME1 LITERAL1 NAME2 LITERAL2 ... ]
     Using ENTITYDEF will modify the DTD subset by defining the
     parameter entity with name NAME1 to be LITERAL1, ....  The cached
     version of the subset will be created with those entity
     definitions, and when PSGML search for a matching cached subset
     will check that the parameter entities in ENTITYDEF has been
     defined with those values before trying to use `cfile'.

`public PUBID ENTITYDEF CFILE'
     Cache the DTD subset with public identifier PUBID in file CFILE.

 - User Option: sgml-recompile-out-of-date-cdtd
     If non-`nil', out of date compiled DTDs will be automatically
     recompiled.  If the value is `ask', PSGML will ask before
     recompiling.  A `nil' value will cause PSGML to silently load an
     out of date compiled DTD.  A DTD that refers to undefined external
     entities is always out of date, thus in such case it can be useful
     to set this variable to `nil'.

   Previous versions of PSGML have had another way of speeding up DTD
parsing.  This code remains in this version of PSGML, but is not
actively maintained and may disappear in the future.

   You can save the parsed DTD in a file using the command `M-x
sgml-save-dtd'.  Next time PSGML can load that file instead of parsing
the DTD.  For PSGML 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.  To directly use an already parsed and saved DTD, load the file
containing the saved DTD with the command `M-x sgml-load-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.


automatically generated by info2www version 1.2.2.9