/usr/share/doc/libghc-hsp-doc/html/HSP-HTML4.html is in libghc-hsp-doc 0.9.2-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 | <!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>HSP.HTML4</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_HSP-HTML4.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/HSP-HTML4.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">hsp-0.9.2: Haskell Server Pages is a library for writing dynamic server-side web pages.</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>Haskell 98</td></tr><tr><th>Stability</th><td>experimental</td></tr><tr><th>Maintainer</th><td>Niklas Broberg, niklas.broberg@gmail.com</td></tr><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">HSP.HTML4</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Functions
</a></li><li><a href="#g:2">Predefined XMLMetaData
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Attempt to render XHTML as well-formed HTML 4.01:
</p><ol><li> no short tags are used, e.g., <script></script> instead of <script />
</li><li> the end tag is forbidden for some elements, for these we:
</li></ol><ul><li> render only the open tag, e.g., <br>
</li><li> throw an error if the tag contains children
</li></ul><ol><li> optional end tags are always rendered
</li></ol><p>Currently no validation is performed.
</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:renderAsHTML">renderAsHTML</a> :: <a href="HSP-XML.html#t:XML">XML</a> -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Lazy-Internal.html#t:Text">Text</a></li><li class="src short"><a href="#v:htmlEscapeChars">htmlEscapeChars</a> :: [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>, <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Lazy-Builder.html#t:Builder">Builder</a>)]</li><li class="src short"><a href="#v:html4Strict">html4Strict</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSP-XML.html#t:XMLMetaData">XMLMetaData</a></li><li class="src short"><a href="#v:html4StrictFrag">html4StrictFrag</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSP-XML.html#t:XMLMetaData">XMLMetaData</a></li></ul></div><div id="interface"><h1 id="g:1">Functions
</h1><div class="top"><p class="src"><a name="v:renderAsHTML" class="def">renderAsHTML</a> :: <a href="HSP-XML.html#t:XML">XML</a> -> <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Lazy-Internal.html#t:Text">Text</a><a href="src/HSP-HTML4.html#renderAsHTML" class="link">Source</a></p><div class="doc"><p>Pretty-prints HTML values.
</p><p>Error Handling:
</p><p>Some tags (such as img) can not contain children in HTML. However,
there is nothing to stop the caller from passing in XML which
contains an img tag with children. There are three basic ways to
handle this:
</p><ol><li> drop the bogus children silently
</li><li> call <code><a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Prelude.html#v:error">error</a></code> / raise an exception
</li><li> render the img tag with children -- even though it is invalid
</li></ol><p>Currently we are taking approach #3, since no other attempts to
validate the data are made in this function. Instead, you can run
the output through a full HTML validator to detect the errors.
</p><p>#1 seems like a poor choice, since it makes is easy to overlook the
fact that data went missing.
</p><p>We could raising errors, but you have to be in the IO monad to
catch them. Also, you have to use evaluate if you want to check for
errors. This means you can not start sending the page until the
whole page has been rendered. And you have to store the whole page
in RAM at once. Similar problems occur if we return Either
instead. We mostly care about catching errors and showing them in
the browser during testing, so perhaps this can be configurable.
</p><p>Another solution would be a compile time error if an empty-only
tag contained children.
</p><p>FIXME: also verify that the domain is correct
</p><p>FIXME: what to do if a namespace is encountered
</p></div></div><div class="top"><p class="src"><a name="v:htmlEscapeChars" class="def">htmlEscapeChars</a> :: [(<a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Char.html#t:Char">Char</a>, <a href="/usr/share/doc/libghc-text-doc/html/Data-Text-Lazy-Builder.html#t:Builder">Builder</a>)]<a href="src/HSP-HTML4.html#htmlEscapeChars" class="link">Source</a></p></div><h1 id="g:2">Predefined XMLMetaData
</h1><div class="top"><p class="src"><a name="v:html4Strict" class="def">html4Strict</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSP-XML.html#t:XMLMetaData">XMLMetaData</a><a href="src/HSP-HTML4.html#html4Strict" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:html4StrictFrag" class="def">html4StrictFrag</a> :: <a href="/usr/share/doc/ghc-doc/html/libraries/base-4.6.0.1/Data-Maybe.html#t:Maybe">Maybe</a> <a href="HSP-XML.html#t:XMLMetaData">XMLMetaData</a><a href="src/HSP-HTML4.html#html4StrictFrag" class="link">Source</a></p></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>
|