3.4 DTD-Handling
AllApplicationManualNameSummaryHelp

  • Documentation
    • Reference manual
    • Packages
      • SWI-Prolog SGML/XML parser
        • Predicate Reference
          • DTD-Handling
            • new_dtd/2
            • free_dtd/1
            • load_dtd/2
            • load_dtd/3
            • open_dtd/3
            • dtd/2
            • dtd_property/2
            • The DOCTYPE declaration

3.4.1 The DOCTYPE declaration

As this parser allows for processing partial documents and process the DTD separately, the DOCTYPE declaration plays a special role.

If a document has no DOCTYPE declaraction, the parser returns a list holding all elements and CDATA found. If the document has a DOCTYPE declaraction, the parser will open the element defined in the DOCTYPE as soon as the first real data is encountered.