HORIZON HASKELLDocslts/ghc-10.0.x8fef28d2026-11-02Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 8fef28d · 2026-11-02

  • Packagehxt-9.3.1.22
  • Exports42
  • LanguageHaskell2010
  • LicenceMIT
  • SourceSystemConfig.hs

withMimeTypeFile filename : input option, set the mime type table for file: documents by given file. The format of this config file must be in the syntax of a debian linux "mime.types" config file

Force a given mime type for all file contents.

The mime type for file access will then not be computed by looking into a mime.types file

withParseByMimeType yes/no : read option, select the parser by the mime type of the document (pulled out of the HTTP header).

When the mime type is set to "text/html" the configured HTML parser is taken, when it's set to "text/xml" or "text/xhtml" the configured XML parser is taken. If the mime type is something else, no further processing is performed, the contents is given back to the application in form of a single text node. If the default document encoding is set to isoLatin1, this even enables processing of arbitray binary data.

withSubstDTDEntities yes/no: read option, substitute general entities defined in DTD, default is yes. switching this option and the validate option off can lead to faster parsing, because then there is no need to access the DTD

withSubstHTMLEntities yes/no: read option, substitute general entities defined in HTML DTD, default is no. switching this option on and the substDTDEntities and validate options off can lead to faster parsing because there is no need to access a DTD, but still the HTML general entities are substituted

withIgnoreNoneXmlContents yes/no : input option, ignore document contents of none XML/HTML documents.

This option can be useful for implementing crawler like applications, e.g. an URL checker. In those cases net traffic can be reduced.

withDefaultBaseURI URI , input option, set the default base URI

This option can be useful when parsing documents from stdin or contained in a string, and interpreting relative URIs within the document

withOutputXML : output option, default writing

Default is writing XML: quote special XML chars >,<,",',& where neccessary, add XML processing instruction and encode document with respect to withOutputEncoding