Sophie

Sophie

distrib > Mandriva > 2010.1 > x86_64 > media > contrib-release > by-pkgid > 51057bcd013d992f61ce4c2b0a4565e3 > files > 166

haskell-hxt-8.3.2-1mdv2010.1.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>Text.XML.HXT.Arrow.ProcessDocument</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_Text-XML-HXT-Arrow-ProcessDocument.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>hxt-8.3.2: A collection of tools for processing XML with Haskell.</TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>Text.XML.HXT.Arrow.ProcessDocument</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>portable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>experimental</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>Uwe Schmidt (uwe@fh-wedel.de)</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
><P
>Version    : $Id: ProcessDocument.hs,v 1.3 2006<EM
>08</EM
>30 16:20:52 hxml Exp $
</P
><P
>Compound arrows for reading, parsing, validating and writing XML documents
</P
><P
>All arrows use IO and a global state for options, errorhandling, ...
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseXmlDocument"
>parseXmlDocument</A
> ::  <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AparseHtmlDocument"
>parseHtmlDocument</A
> ::  <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AvalidateDocument"
>validateDocument</A
> ::  <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApropagateAndValidateNamespaces"
>propagateAndValidateNamespaces</A
> ::  <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetDocumentContents"
>getDocumentContents</A
> ::  <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes"
>Attributes</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s b <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Documentation</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseXmlDocument"
><A NAME="v%3AparseXmlDocument"
></A
></A
><B
>parseXmlDocument</B
> ::  <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>XML parser
</P
><P
>Input tree must be a root tree with a text tree as child containing the document to be parsed.
The parser generates from the input string a tree of a wellformed XML document,
processes the DTD (parameter substitution, conditional DTD parts, ...) and
substitutes all general entity references. Next step is character reference substitution.
Last step is the document validation.
Validation can be controlled by an extra parameter.
</P
><P
>Example:
</P
><PRE
> parseXmlDocument True    -- parse and validate document

 parseXmlDocument False   -- only parse document, don't validate
</PRE
><P
>This parser is useful for applications processing correct XML documents.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:parseHtmlDocument"
><A NAME="v%3AparseHtmlDocument"
></A
></A
><B
>parseHtmlDocument</B
> ::  <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>HTML parser
</P
><P
>Input tree must be a root tree with a text tree as child containing the document to be parsed.
The parser tries to parse everything as HTML, if the HTML document is not wellformed XML or if
errors occur, warnings are generated. The warnings can be issued, or suppressed.
</P
><P
>Example: <TT
> parseHtmlDocument True </TT
> : parse document and issue warnings
</P
><P
>This parser is useful for applications like web crawlers, where the pages may contain
arbitray errors, but the application is only interested in parts of the document, e.g. the plain text.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:validateDocument"
><A NAME="v%3AvalidateDocument"
></A
></A
><B
>validateDocument</B
> ::  <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Document validation
</P
><P
>Input must be a complete document tree. The document
is validated with respect to the DTD spec.
Only useful for XML documents containing a DTD.
</P
><P
>If the document is valid, it is transformed with respect to the DTD,
normalization of attribute values, adding default values, sorting attributes by name,...
</P
><P
>If no error was found, result is the normalized tree,
else the error status is set in the list of attributes
of the root node &quot;/&quot; and the document content is removed from the tree.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:propagateAndValidateNamespaces"
><A NAME="v%3ApropagateAndValidateNamespaces"
></A
></A
><B
>propagateAndValidateNamespaces</B
> ::  <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
> <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Namespace propagation
</P
><P
>Input must be a complete document tree. The namespace declarations
are evaluated and all element and attribute names are processed by
splitting the name into prefix, local part and namespace URI.
</P
><P
>Naames are checked with respect to the XML namespace definition
</P
><P
>If no error was found, result is the unchanged input tree,
else the error status is set in the list of attributes
of the root node &quot;/&quot; and the document content is removed from the tree.
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="decl"
><A NAME="v:getDocumentContents"
><A NAME="v%3AgetDocumentContents"
></A
></A
><B
>getDocumentContents</B
> ::  <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AAttributes"
>Attributes</A
> -&gt; <A HREF="/usr/share/doc/ghc/libraries/base/Data-Char.html#t%3AString"
>String</A
> -&gt; <A HREF="Text-XML-HXT-Arrow-XmlIOStateArrow.html#t%3AIOStateArrow"
>IOStateArrow</A
> s b <A HREF="Text-XML-HXT-DOM-TypeDefs.html#t%3AXmlTree"
>XmlTree</A
></TD
></TR
><TR
><TD CLASS="doc"
><P
>creates a new document root, adds all options
   as attributes to the document root and calls <TT
><A HREF="Text-XML-HXT-Arrow-DocumentInput.html#v%3AgetXmlContents"
>getXmlContents</A
></TT
>.
</P
><P
>If the document name is the empty string, the document will be read
   from standard input.
</P
><P
>For supported protocols see <TT
><A HREF="Text-XML-HXT-Arrow-DocumentInput.html#v%3AgetXmlContents"
>getXmlContents</A
></TT
>
</P
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.5.0</TD
></TR
></TABLE
></BODY
></HTML
>