File: context.html

package info (click to toggle)
libdb2-ruby 0.5.4-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 2,352 kB
  • ctags: 2,743
  • sloc: ansic: 11,156; ruby: 6,199; cpp: 6,064; makefile: 86; sh: 31
file content (84 lines) | stat: -rw-r--r-- 4,595 bytes parent folder | download | duplicates (10)
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
<?xml version="1.0" ?>
<!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>
<title>Untitled</title>
</head>
<body>
<h2><a name="label-0" id="label-0">BDB::XML::Context</a></h2><!-- RDLabel: "BDB::XML::Context" -->
<p>The context within which a query is performed against a Container. </p>
<p>The context within which a query is performed against a Container
is complex enough to warrent an encapsulating class. This context
includes a namespace mapping, variable bindings, and flags that 
determine how the query result set should be determined and returned
to the caller.</p>
<p>The XPath syntax permits expressions to refer to namespace prefixes, but
not to define them. The Context class provides a number of namespace 
management methods so that the caller may manage the namespace prefix
to URI mapping.</p>
<p>The XPath syntax also permits expressions to refer to variables, but not
to define them. The Context class provides a number of methods so
that the caller may manage the variable to value bindings.</p>
<h3><a name="label-1" id="label-1">Class Methods</a></h3><!-- RDLabel: "Class Methods" -->
<dl>
<dt><a name="label-2" id="label-2"><code>allocate</code></a></dt><!-- RDLabel: "allocate" -->
<dd>
Allocate a new Context object</dd>
</dl>
<h3><a name="label-3" id="label-3">Methods</a></h3><!-- RDLabel: "Methods" -->
<dl>
<dt><a name="label-4" id="label-4"><code>self[variable]</code></a></dt><!-- RDLabel: "self[variable]" -->
<dd>
Get the value bound to a variable</dd>
<dt><a name="label-5" id="label-5"><code>self[variable] = <var>value</var></code></a></dt><!-- RDLabel: "self[variable] = value" -->
<dd>
Bind a value to a variable</dd>
<dt><a name="label-6" id="label-6"><code>clear_namespaces</code></a></dt><!-- RDLabel: "clear_namespaces" -->
<dt><a name="label-7" id="label-7"><code>clear</code></a></dt><!-- RDLabel: "clear" -->
<dd>
Delete all the namespace prefix mappings</dd>
<dt><a name="label-8" id="label-8"><code>del_namespace(<var>name</var>)</code></a></dt><!-- RDLabel: "del_namespace" -->
<dd>
Delete the namespace URI for a particular prefix</dd>
<dt><a name="label-9" id="label-9"><code>evaltype</code></a></dt><!-- RDLabel: "evaltype" -->
<dd>
Return the evaluation type</dd>
<dt><a name="label-10" id="label-10"><code>evaltype=(<var>type</var>)</code></a></dt><!-- RDLabel: "evaltype=" -->
<dd>
Set the evaluation type</dd>
<dt><a name="label-11" id="label-11"><code>get_namespace(<var>name</var>)</code></a></dt><!-- RDLabel: "get_namespace" -->
<dt><a name="label-12" id="label-12"><code>namespace[name]</code></a></dt><!-- RDLabel: "namespace[name]" -->
<dd>
Get the namespace URI that a namespace prefix maps onto</dd>
<dt><a name="label-13" id="label-13"><code>initialize(<var>returntype</var> = <var>nil</var>, <var>evaluation</var> = <var>nil</var>)</code></a></dt><!-- RDLabel: "initialize" -->
<dd>
Initialize the object with the optional evaluation type
<var>BDB::XML::Context::Lazy</var> or <var>BDB::XML::Context::Eager</var>
and return type <var>BDB::XML::Context::Documents</var>,
<var>BDB::XML::Context::Values</var> or <var>BDB::XML::Context::Candidates</var></dd>
<dt><a name="label-14" id="label-14"><code>metadata</code></a></dt><!-- RDLabel: "metadata" -->
<dt><a name="label-15" id="label-15"><code>with_metadata</code></a></dt><!-- RDLabel: "with_metadata" -->
<dd>
return <var>true</var> if the metadata is added to the document</dd>
<dt><a name="label-16" id="label-16"><code>metadata=(<var>with</var>)</code></a></dt><!-- RDLabel: "metadata=" -->
<dt><a name="label-17" id="label-17"><code>with_metadata=(<var>with</var>)</code></a></dt><!-- RDLabel: "with_metadata=" -->
<dd>
The <var>with</var> parameter specifies whether or not to add the document
metadata prior to the query.</dd>
<dt><a name="label-18" id="label-18"><code>returntype</code></a></dt><!-- RDLabel: "returntype" -->
<dd>
Return the return type</dd>
<dt><a name="label-19" id="label-19"><code>returntype=(<var>type</var>)</code></a></dt><!-- RDLabel: "returntype=" -->
<dd>
Set the return type</dd>
<dt><a name="label-20" id="label-20"><code>namespace[name]=(<var>uri</var>)</code></a></dt><!-- RDLabel: "namespace[name]=" -->
<dt><a name="label-21" id="label-21"><code>set_namespace(<var>name</var>, <var>uri</var>)</code></a></dt><!-- RDLabel: "set_namespace" -->
<dd>
<p>Define a namespace prefix, providing the URI that it maps onto</p>
<p>If <var>uri</var> is <var>nil</var> delete the namespace</p></dd>
</dl>

</body>
</html>