File: context.rd

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 (87 lines) | stat: -rw-r--r-- 2,272 bytes parent folder | download | duplicates (11)
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
=begin
== BDB::XML::Context

The context within which a query is performed against a Container. 

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.

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.

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.

# module BDB
# module XML
# class Context
# class << self

=== Class Methods

--- allocate
    Allocate a new Context object
# end

=== Methods

--- self[variable]
    Get the value bound to a variable

--- self[variable] = value
    Bind a value to a variable

--- clear_namespaces
--- clear
    Delete all the namespace prefix mappings

--- del_namespace(name)
    Delete the namespace URI for a particular prefix

--- evaltype
    Return the evaluation type

--- evaltype=(type)
    Set the evaluation type

--- get_namespace(name)
--- namespace[name]
    Get the namespace URI that a namespace prefix maps onto

--- initialize(returntype = nil, evaluation = nil)
    Initialize the object with the optional evaluation type
    ((|BDB::XML::Context::Lazy|)) or ((|BDB::XML::Context::Eager|))
    and return type ((|BDB::XML::Context::Documents|)),
    ((|BDB::XML::Context::Values|)) or ((|BDB::XML::Context::Candidates|))

--- metadata
--- with_metadata
    return ((|true|)) if the metadata is added to the document

--- metadata=(with)
--- with_metadata=(with)
    The ((|with|)) parameter specifies whether or not to add the document
    metadata prior to the query.

--- returntype
    Return the return type

--- returntype=(type)
    Set the return type

--- namespace[name]=(uri)
--- set_namespace(name, uri)
    Define a namespace prefix, providing the URI that it maps onto

    If ((|uri|)) is ((|nil|)) delete the namespace
# end
# end
# end

=end