File: treeql-low.xml

package info (click to toggle)
tcllib 1.20%2Bdfsg-1
  • links: PTS
  • area: main
  • in suites: bullseye
  • size: 68,064 kB
  • sloc: tcl: 216,842; ansic: 14,250; sh: 2,846; xml: 1,766; yacc: 1,145; pascal: 881; makefile: 107; perl: 84; f90: 84; python: 33; ruby: 13; php: 11
file content (103 lines) | stat: -rw-r--r-- 4,244 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
<?xml version="1.0" ?>
<?xml-stylesheet href="api.css" type="text/css" ?>
<!DOCTYPE api SYSTEM "api.dtd" [
]>
  <api>
  <title>Treeql Low Level API</title>
  <header>
    <p>Treeql is a fairly thin query facility over Trees.  It implements an ordered set of nodes which are generated and filtered by application of the treeql query language to each node in turn.</p>
  </header>

  <group>
    <name>Tree Transformers</name>
    <header>These are low level functional transformers which apply operations to the underlying tree via the node set, and generate a new node set.</header>
    <method>
      <object><arg>query</arg></object>
      <name>apply</name>
      <args><arg>cmd</arg> <arg>args</arg></args>
      <result>returns the list of results of application</result>
      <detail>apply [<arg>tree</arg> <arg>$node</arg> {*}<arg>cmd</arg> {*}<arg>args</arg>] form to each node in node set</detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>sapply</name>
      <args><arg>cmd</arg> <arg>args</arg></args>
      <result>returns the concatenated strings of results of application</result>
      <detail>apply [<arg>tree</arg> <arg>$node</arg> {*}<arg>cmd</arg> {*}<arg>args</arg>] form to each node in node set</detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>applyself</name>
      <args><arg>cmd</arg> <arg>args</arg></args>
      <result>returns the list of results of the application</result>
      <detail>apply [<arg>query</arg> {*}<arg>cmd</arg> <arg>node</arg> {*}<arg>args</arg>] to each <arg>node</arg>, discarding null results</detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>mapself</name>
      <args><arg>cmd</arg></args>
      <result>returns the list of results of the application</result>
      <detail>apply [<arg>query</arg> {*}<arg>cmd</arg> <arg>node</arg> {*}<arg>args</arg>] to each node in node set, keeping null results</detail>
    </method>
    
  </group>


  <group>
    <name>Tree Filters</name>
    <header>These are low level filters, which apply predicates to the underlying tree via the node set, and reduce the nodeset accordingly.</header>

    <method>
      <object><arg>query</arg></object>
      <name>filter</name>
      <args><arg>cmd</arg> <arg>args</arg></args>
      <result>returns the list of results of application when application is non nil</result>
      <detail>filter nodes by [<arg>tree</arg> {*}<arg>cmd</arg> {*}<arg>args</arg>]</detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>bool</name>
      <args><arg>cmd</arg> <arg>args</arg></args>
      <result>returns the list of results of application when application is true</result>
      <detail>filter nodes by the predicate [<arg>tree</arg> {*}<arg>cmd</arg> {*}<arg>args</arg>]</detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>stringP</name>
      <args><arg>op</arg> <arg>attr</arg></args>
      <result>returns the list of nodes for which predicate is true</result>
      <detail>filter nodes by predicate [string {*}<arg>op</arg>] over attribute <arg>attr</arg></detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>stringNP</name>
      <args><arg>op</arg> <arg>attr</arg></args>
      <result>returns the list of nodes for which predicate is false</result>
      <detail>filter nodes by negating the predicate [string {*}<arg>op</arg>] over attribute <arg>attr</arg></detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>exprP</name>
      <args><arg>op</arg> <arg>attr</arg></args>
      <result>returns the list of nodes for which predicate is true</result>
      <detail>filter nodes by predicate [expr {*}<arg>op</arg>] over attribute <arg>attr</arg></detail>
    </method>
    
    <method>
      <object><arg>query</arg></object>
      <name>exprNP</name>
      <args><arg>op</arg> <arg>attr</arg></args>
      <result>returns the list of nodes for which predicate is false</result>
      <detail>filter nodes by predicate ![expr {*}<arg>op</arg>] over attribute <arg>attr</arg></detail>
    </method>

  </group>

</api>