File: modify.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 (65 lines) | stat: -rw-r--r-- 1,937 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
=begin

== BDB::XML::Modify

Modify encapsulates the context within which a set of documents specified by
a query can be modified in place. 

The modification is performed using the methods 
((|BDB::XML::Container#modify|)) and ((|BDB::XML::Document#modify|))

There are two parts to the object -- the query and the operation. 
The query identifies target nodes against which the operation is run. 
The operation specifies what modifications to perform.

# module BDB
# module XML
# class Modify
# class << self

=== Class Methods

--- allocate
    Allocate a new object

# end

=== Methods

--- count
    return the number of node hits in the specified query.

--- initialize(xpath, operation, type = BDB::XML::Modify::None, name = "", content = "", location = -1, context = nil)

    ((|xpath|)) is a ((|String|)), or an ((|BDB::XML::Context|)) object

    ((|operation|)) can have the value ((|BDB::XML::Modify::InsertAfter|)), 
    ((|BDB::XML::Modify::InsertBefore|)), ((|BDB::XML::Modify::Append|)),
    ((|BDB::XML::Modify::Update|)), ((|BDB::XML::Modify::Remove|)) or 
    ((|BDB::XML::Modify::Rename|)).

    ((|type|)) can have the value ((|BDB::XML::Modify::Element|)), 
    ((|BDB::XML::Modify::Attribute|)), ((|BDB::XML::Modify::Text|)),
    ((|BDB::XML::Modify::ProcessingInstruction|)), ((|BDB::XML::Modify::Comment|)) or
    ((|BDB::XML::Modify::None|)).

    ((|name|)) is the name for the new content.
 
    ((|content|)) the content for operations that require content.

    ((|location|)) indicate where a new child node will be placed for the
    append operation

    ((|context|)) is valid only when a String is given as the first argument.
    This must be a ((|BDB::XML::Context|)) which  contains the variable 
    bindings, the namespace prefix to URI mapping, and the query processing
    flags.

--- encoding=(string)
    Specify a new character encoding for the modified documents.

# end
# end
# end

=end