This file is indexed.

/usr/share/doc/libghc-hxt-doc/html/Text-XML-HXT-Arrow-WriteDocument.html is in libghc-hxt-doc 9.3.1.4-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Text.XML.HXT.Arrow.WriteDocument</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_Text-XML-HXT-Arrow-WriteDocument.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/Text-XML-HXT-Arrow-WriteDocument.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">hxt-9.3.1.4: A collection of tools for processing XML with Haskell.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>portable</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Uwe Schmidt (uwe@fh-wedel.de)</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">Text.XML.HXT.Arrow.WriteDocument</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Compound arrow for writing XML documents
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:writeDocument">writeDocument</a> ::  <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:SysConfigList">SysConfigList</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:IOStateArrow">IOStateArrow</a> s <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a></li><li class="src short"><a href="#v:writeDocument-39-">writeDocument'</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:IOStateArrow">IOStateArrow</a> s <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a></li><li class="src short"><a href="#v:writeDocumentToString">writeDocumentToString</a> :: <a href="Text-XML-HXT-Arrow-XmlArrow.html#t:ArrowXml">ArrowXml</a> a =&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:SysConfigList">SysConfigList</a> -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a></li><li class="src short"><a href="#v:prepareContents">prepareContents</a> :: <a href="Text-XML-HXT-Arrow-XmlArrow.html#t:ArrowXml">ArrowXml</a> a =&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:XIOSysState">XIOSysState</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a>) -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a></li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><a name="v:writeDocument" class="def">writeDocument</a> ::  <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:SysConfigList">SysConfigList</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:IOStateArrow">IOStateArrow</a> s <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a><a href="src/Text-XML-HXT-Arrow-WriteDocument.html#writeDocument" class="link">Source</a></p><div class="doc"><p>the main filter for writing documents
</p><p>this filter can be configured by an option list like <code><a href="Text-XML-HXT-Arrow-ReadDocument.html#t:readDocument">readDocument</a></code>
</p><p>usage: <code> writeDocument optionList destination </code>
</p><p>if <code> destination </code> is the empty string or &quot;-&quot;, stdout is used as output device
</p><p>for available options see <code><a href="Text-XML-HXT-Arrow-XmlState.html#t:SystemConfig">SystemConfig</a></code>
</p><ul><li> <code>withOutputXML</code> :
 (default) issue XML: quote special XML chars &gt;,&lt;,&quot;,',&amp; where neccessary
                   add XML processing instruction
                   and encode document with respect to output encoding,
</li><li> <code>withOutputHTML</code> :
 issue HTML: translate all special XML chars and all HTML chars with a corresponding entity reference
 into entity references. Do not generate empty elements, e.g. <code><a href="script">.../</a></code> for HTML elements, that are allowed
 to contain a none empty body. Result is for the example is <code><a href="script">...</a><a href="/script">/script</a></code>.
 The short form introduces trouble in various browsers.
</li><li> <code>withOutputXHTML</code> :
 same as <code>withOutputHTML</code>, but all none ASCII chars are substituted by char references.
</li><li> <code>withOutputPLAIN</code> :
 Do not substitute any chars. This is useful when generating something else than XML/HTML, e.g. Haskell source code.
</li><li> <code>withXmlPi yes/no</code> :
 Add a <code><a href="?xml">version=... encoding=... ?</a></code> processing instruction to the beginning of the document.
 Default is yes.
</li><li> <code>withAddDefaultDTD</code> :
  if the document to be written was build by reading another document containing a Document Type Declaration,
  this DTD is inserted into the output document (default: no insert)
</li><li> <code>withShowTree yes/no</code> :
  show DOM tree representation of document (for debugging)
</li><li> <code>withShowHaskell yes/no</code> :
  show Haskell representaion of document (for debugging)
</li></ul><p>a minimal main program for copying a document
 has the following structure:
</p><pre> module Main
 where

 import Text.XML.HXT.Core

 main        :: IO ()
 main
     = do
       runX ( readDocument  [] &quot;hello.xml&quot;
              &gt;&gt;&gt;
              writeDocument [] &quot;bye.xml&quot;
            )
       return ()
</pre><p>an example for copying a document from the web to standard output with global trace level 1, input trace level 2,
output encoding isoLatin1,
and evaluation of
error code is:
</p><pre> module Main
 where

 import Text.XML.HXT.Core
 import Text.XML.HXT.Curl
 -- or
 -- import Text.XML.HXT.HTTP
 import System.Exit

 main        :: IO ()
 main
     = do
       [rc] &lt;- runX
               ( configSysVars [ withTrace 1          -- set the defaults for all read-,
                               , withCurl []          -- write- and other operations
                                 -- or withHTTP []
                               ]
                 &gt;&gt;&gt;
                 readDocument  [ withTrace     2      -- use these additional
                               , withParseHTML yes    -- options only for this read
                               ]
                               &quot;http://www.haskell.org/&quot;
                 &gt;&gt;&gt;
                 writeDocument [ withOutputEncoding isoLatin1
                               ]
                               &quot;&quot;                     -- output to stdout
                 &gt;&gt;&gt;
                 getErrStatus
               )
       exitWith ( if rc &gt;= c_err
                  then ExitFailure 1
                  else ExitSuccess
                )
</pre></div></div><div class="top"><p class="src"><a name="v:writeDocument-39-" class="def">writeDocument'</a> ::  <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:IOStateArrow">IOStateArrow</a> s <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a><a href="src/Text-XML-HXT-Arrow-WriteDocument.html#writeDocument%27" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:writeDocumentToString" class="def">writeDocumentToString</a> :: <a href="Text-XML-HXT-Arrow-XmlArrow.html#t:ArrowXml">ArrowXml</a> a =&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:SysConfigList">SysConfigList</a> -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a><a href="src/Text-XML-HXT-Arrow-WriteDocument.html#writeDocumentToString" class="link">Source</a></p><div class="doc"><p>Convert a document into a string. Formating is done the same way
 and with the same options as in <code><a href="Text-XML-HXT-Arrow-WriteDocument.html#v:writeDocument">writeDocument</a></code>. Default output encoding is
 no encoding, that means the result is a normal unicode encode haskell string.
 The default may be overwritten with the <code><a href="Text-XML-HXT-Arrow-XmlState-SystemConfig.html#t:withOutputEncoding">withOutputEncoding</a></code> option.
 The XML PI can be suppressed by the <code><a href="Text-XML-HXT-XmlKeywords.html#t:a_no_xml_pi">a_no_xml_pi</a></code> option.
</p><p>This arrow fails, when the encoding scheme is not supported.
 The arrow is pure, it does not run in the IO monad.
 The XML PI is suppressed, if not explicitly turned on with an
 option <code> (a_no_xml_pi, v_0) </code>
</p></div></div><div class="top"><p class="src"><a name="v:prepareContents" class="def">prepareContents</a> :: <a href="Text-XML-HXT-Arrow-XmlArrow.html#t:ArrowXml">ArrowXml</a> a =&gt; <a href="Text-XML-HXT-Arrow-XmlState-TypeDefs.html#t:XIOSysState">XIOSysState</a> -&gt; (<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Bool.html#t:Bool">Bool</a> -&gt; <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-String.html#t:String">String</a> -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a>) -&gt; a <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a> <a href="Text-XML-HXT-DOM-TypeDefs.html#t:XmlTree">XmlTree</a><a href="src/Text-XML-HXT-Arrow-WriteDocument.html#prepareContents" class="link">Source</a></p><div class="doc"><p>indent and format output
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.13.2</p></div></body></html>