<?xml version="1.0" encoding="iso-8859-1"?>
<module name="Ft.Xml.XPath.Util" file="/work/a/ports/textproc/py-4suite-xml/work/4Suite-1.0b3/build/lib.freebsd-6.1-PRERELEASE-i386-2.4/Ft/Xml/XPath/Util.py">
  <modification-date>2005-03-20 01:00:33</modification-date>
  <abstract>General utilities for XPath applications</abstract>
  <description>Copyright 2005 Fourthought, Inc. (USA).
Detailed license and copyright information: http://4suite.org/COPYRIGHT
Project home, documentation, distributions: http://4suite.org/</description>
  <functions>
    <function public="yes" name="Compile" id="Compile">
      <abstract>Given an XPath expression as a string, returns an object that allows
an evaluation engine to operate on the expression efficiently.
This &quot;compiled&quot; expression object can be passed to the Evaluate
function instead of a string, in order to shorten the amount of time
needed to evaluate the expression.</abstract>
      <description/>
      <arguments>
        <arg name="expr"/>
      </arguments>
    </function>
    <function public="yes" name="ElementsById" id="ElementsById">
      <abstract>Given an element node and a cache of ID value to element node
mappings already known, supplements the cache with mappings for
all descendant elements that have ID attributes. The cache is
modified in place.</abstract>
      <description>Only works for elements named 'id' or 'ID' in no namespace;
the attribute type as defined by a DTD does not matter.</description>
      <arguments>
        <arg name="element"/>
        <arg name="idmap"/>
      </arguments>
    </function>
    <function public="yes" name="Evaluate" id="Evaluate">
      <abstract>Evaluates the given XPath expression.</abstract>
      <description>Two arguments are required: the expression (as a string or compiled
expression object), and a context. The context can be given as a
Domlette node via the 'contextNode' named argument, or can be given as
an Ft.Xml.XPath.Context.Context object via the 'context' named
argument.

If namespace bindings or variable bindings are needed, use a
Context object. If extension functions are needed, either use a
Context object, or set the EXTMODULES environment variable to be a
':'-separated list of names of Python modules that implement
extension functions.

The return value will be one of the following:
node-set: list of Domlette node objects (xml.dom.Node based);
string: Unicode string type;
number: float type;
boolean: Ft.Lib.boolean C extension object;
or a non-XPath object (i.e. as returned by an extension function).</description>
      <arguments>
        <arg name="expr"/>
        <arg default="None" name="contextNode"/>
        <arg default="None" name="context"/>
      </arguments>
    </function>
    <function public="yes" name="ExpandQName" id="ExpandQName">
      <abstract>Expand the given QName in the context of the given node,
or in the given namespace dictionary.</abstract>
      <description>Returns a 2-tuple consisting of the namespace URI and local name.</description>
      <arguments>
        <arg name="qname"/>
        <arg default="None" name="refNode"/>
        <arg default="None" name="namespaces"/>
      </arguments>
    </function>
    <function public="yes" name="GetElementById" id="GetElementById">
      <abstract>Given an ID string, returns the node with that ID from the given
Domlette document. Raises a ValueError if there is more than one
element with that ID.</abstract>
      <description/>
      <arguments>
        <arg name="document"/>
        <arg name="idstr"/>
      </arguments>
    </function>
    <function public="yes" name="NormalizeNode" id="NormalizeNode">
      <abstract>NormalizeNode is used to prepare a DOM for XPath evaluation.</abstract>
      <description>1.  Convert CDATA Sections to Text Nodes.
2.  Normalize all text nodes (adjacent nodes are merged into the first one).</description>
      <arguments>
        <arg name="node"/>
      </arguments>
    </function>
    <function public="yes" name="SimpleEvaluate" id="SimpleEvaluate">
      <abstract>Designed to be the most simple/brain-dead interface to using XPath
Usually invoked through Node objects using:
  node.xpath(expr[, explicitNss])</abstract>
      <description>expr - XPath expression in string or compiled form
node - the node to be used as core of the context for evaluating the XPath
explicitNss - (optional) any additional or overriding namespace mappings
              in the form of a dictionary of prefix: namespace
              the base namespace mappings are taken from in-scope
              declarations on the given node.  This explicit dictionary
              is suprimposed on the base mappings</description>
      <arguments>
        <arg name="expr"/>
        <arg name="node"/>
        <arg default="None" name="explicitNss"/>
      </arguments>
    </function>
  </functions>
  <globals>
    <global public="no" name="EMPTY_NAMESPACE" id="EMPTY_NAMESPACE">
      <value>None</value>
    </global>
    <global public="no" name="__all__" id="__all__">
      <value>['Compile', 'Evaluate', 'SimpleEvaluate', 'NormalizeNode', 'GetElementById', 'ElementsById', 'g_documentIdIndex', 'ExpandQName']</value>
    </global>
    <global public="yes" name="g_documentIdIndex" id="g_documentIdIndex">
      <value>{}</value>
    </global>
  </globals>
</module>
