packages feed

hxt-8.3.0: doc/hdoc/Text-XML-HXT-XPath-XPathFct.html

<!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.XPath.XPathFct</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></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.0: A collection of tools for processing XML with Haskell.</TD
><TD CLASS="topbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html"
>Source code</A
></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.XPath.XPathFct</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"
>The module contains the core-functions of the XPath function library.
   All functions are implemented as XFct. Each XFct contains the evaluation context,
   the variable environment and the function arguments.
</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"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3AXFct"
>XFct</A
> = <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AevalFct"
>evalFct</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AFctName"
>FctName</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtoXValue"
>toXValue</A
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Axnumber"
>xnumber</A
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Axboolean"
>xboolean</A
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3Axstring"
>xstring</A
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetConvFct"
>getConvFct</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
> -&gt; <A HREF="/usr/local/share/doc/ghc/libraries/base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AstringValue"
>stringValue</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AremDups"
>remDups</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AisNotInNodeList"
>isNotInNodeList</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
>] -&gt; <A HREF="/usr/local/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcreateDocumentOrder"
>createDocumentOrder</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcreateDocumentOrderReverse"
>createDocumentOrderReverse</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetVarTab"
>getVarTab</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AVarTab"
>VarTab</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetKeyTab"
>getKeyTab</A
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AKeyTab"
>KeyTab</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="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t%3AXFct"
></A
><B
>XFct</B
> = <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#XFct"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Type signature for all functions which can be used in the XPath module.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AevalFct"
></A
><B
>evalFct</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AFctName"
>FctName</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#evalFct"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Evaluates a function.
 Calculation of the function value is done by looking up the function name in the function table,
 check the number of arguments and calculate the funtion, if no
 argument evaluation returns an error.
</P
><UL
><LI
> returns : the function value as <TT
><A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TT
>
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AtoXValue"
></A
><B
>toXValue</B
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AContext"
>Context</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>] -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
>]</TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#toXValue"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Converts a list of different <TT
><A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TT
> types in a list of one <TT
><A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TT
> type.
</P
><UL
><LI
> 1.parameter fct :  the conversion function
</LI
></UL
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3Axnumber"
></A
><B
>xnumber</B
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#xnumber"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>number number(object?): converts its argument to a number
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3Axboolean"
></A
><B
>xboolean</B
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#xboolean"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>boolean boolean(object): converts its argument to a boolean value
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3Axstring"
></A
><B
>xstring</B
> :: <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#xstring"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>string string(object?): converts an object to a string
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AgetConvFct"
></A
><B
>getConvFct</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
> -&gt; <A HREF="/usr/local/share/doc/ghc/libraries/base/Data-Maybe.html#t%3AMaybe"
>Maybe</A
> <A HREF="Text-XML-HXT-XPath-XPathFct.html#t%3AXFct"
>XFct</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#getConvFct"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the conversion function for the XPath results: string, boolean and number
 A nodeset can not be converted.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AstringValue"
></A
><B
>stringValue</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathValue"
>XPathValue</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#stringValue"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the string-value of a node,
 the value of a namespace node is not supported
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AremDups"
></A
><B
>remDups</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#remDups"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Filter for removing identical fragment trees in a nodeset
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AisNotInNodeList"
></A
><B
>isNotInNodeList</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
> -&gt; [<A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3ANavXmlTree"
>NavXmlTree</A
>] -&gt; <A HREF="/usr/local/share/doc/ghc/libraries/ghc-prim/GHC-Bool.html#t%3ABool"
>Bool</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#isNotInNodeList"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Check whether a node is not a part of a node list. Needed to implement matching &amp; testing in xslt.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AcreateDocumentOrder"
></A
><B
>createDocumentOrder</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#createDocumentOrder"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Filter for ordering a list of Nodes in document order
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AcreateDocumentOrderReverse"
></A
><B
>createDocumentOrderReverse</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AXPathFilter"
>XPathFilter</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#createDocumentOrderReverse"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Filter for ordering a list of Nodes in reverse document order
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AgetVarTab"
></A
><B
>getVarTab</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AVarTab"
>VarTab</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#getVarTab"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the table of variables from the environment
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v%3AgetKeyTab"
></A
><B
>getKeyTab</B
> :: <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AEnv"
>Env</A
> -&gt; <A HREF="Text-XML-HXT-XPath-XPathDataTypes.html#t%3AKeyTab"
>KeyTab</A
></TD
><TD CLASS="declbut"
><A HREF="src/Text-XML-HXT-XPath-XPathFct.html#getKeyTab"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the table of keys, needed by xslt, from the environment
</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.3.0</TD
></TR
></TABLE
></BODY
></HTML
>