Tcl Library Source Code

Hex Artifact Content
Login

Artifact 758693038859ae7d4e9aacb220644c87cbd29a3c:


0000: 3c 3f 78 6d 6c 20 76 65 72 73 69 6f 6e 3d 22 31  <?xml version="1
0010: 2e 30 22 20 3f 3e 0a 3c 3f 78 6d 6c 2d 73 74 79  .0" ?>.<?xml-sty
0020: 6c 65 73 68 65 65 74 20 68 72 65 66 3d 22 61 70  lesheet href="ap
0030: 69 2e 63 73 73 22 20 74 79 70 65 3d 22 74 65 78  i.css" type="tex
0040: 74 2f 63 73 73 22 20 3f 3e 0a 3c 21 44 4f 43 54  t/css" ?>.<!DOCT
0050: 59 50 45 20 61 70 69 20 53 59 53 54 45 4d 20 22  YPE api SYSTEM "
0060: 61 70 69 2e 64 74 64 22 20 5b 0a 5d 3e 0a 20 20  api.dtd" [.]>.  
0070: 3c 61 70 69 3e 0a 20 20 3c 74 69 74 6c 65 3e 54  <api>.  <title>T
0080: 72 65 65 71 6c 20 4c 6f 77 20 4c 65 76 65 6c 20  reeql Low Level 
0090: 41 50 49 3c 2f 74 69 74 6c 65 3e 0a 20 20 3c 68  API</title>.  <h
00a0: 65 61 64 65 72 3e 0a 20 20 20 20 3c 70 3e 54 72  eader>.    <p>Tr
00b0: 65 65 71 6c 20 69 73 20 61 20 66 61 69 72 6c 79  eeql is a fairly
00c0: 20 74 68 69 6e 20 71 75 65 72 79 20 66 61 63 69   thin query faci
00d0: 6c 69 74 79 20 6f 76 65 72 20 54 72 65 65 73 2e  lity over Trees.
00e0: 20 20 49 74 20 69 6d 70 6c 65 6d 65 6e 74 73 20    It implements 
00f0: 61 6e 20 6f 72 64 65 72 65 64 20 73 65 74 20 6f  an ordered set o
0100: 66 20 6e 6f 64 65 73 20 77 68 69 63 68 20 61 72  f nodes which ar
0110: 65 20 67 65 6e 65 72 61 74 65 64 20 61 6e 64 20  e generated and 
0120: 66 69 6c 74 65 72 65 64 20 62 79 20 61 70 70 6c  filtered by appl
0130: 69 63 61 74 69 6f 6e 20 6f 66 20 74 68 65 20 74  ication of the t
0140: 72 65 65 71 6c 20 71 75 65 72 79 20 6c 61 6e 67  reeql query lang
0150: 75 61 67 65 20 74 6f 20 65 61 63 68 20 6e 6f 64  uage to each nod
0160: 65 20 69 6e 20 74 75 72 6e 2e 3c 2f 70 3e 0a 20  e in turn.</p>. 
0170: 20 3c 2f 68 65 61 64 65 72 3e 0a 0a 20 20 3c 67   </header>..  <g
0180: 72 6f 75 70 3e 0a 20 20 20 20 3c 6e 61 6d 65 3e  roup>.    <name>
0190: 54 72 65 65 20 54 72 61 6e 73 66 6f 72 6d 65 72  Tree Transformer
01a0: 73 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 3c 68 65  s</name>.    <he
01b0: 61 64 65 72 3e 54 68 65 73 65 20 61 72 65 20 6c  ader>These are l
01c0: 6f 77 20 6c 65 76 65 6c 20 66 75 6e 63 74 69 6f  ow level functio
01d0: 6e 61 6c 20 74 72 61 6e 73 66 6f 72 6d 65 72 73  nal transformers
01e0: 20 77 68 69 63 68 20 61 70 70 6c 79 20 6f 70 65   which apply ope
01f0: 72 61 74 69 6f 6e 73 20 74 6f 20 74 68 65 20 75  rations to the u
0200: 6e 64 65 72 6c 79 69 6e 67 20 74 72 65 65 20 76  nderlying tree v
0210: 69 61 20 74 68 65 20 6e 6f 64 65 20 73 65 74 2c  ia the node set,
0220: 20 61 6e 64 20 67 65 6e 65 72 61 74 65 20 61 20   and generate a 
0230: 6e 65 77 20 6e 6f 64 65 20 73 65 74 2e 3c 2f 68  new node set.</h
0240: 65 61 64 65 72 3e 0a 20 20 20 20 3c 6d 65 74 68  eader>.    <meth
0250: 6f 64 3e 0a 20 20 20 20 20 20 3c 6f 62 6a 65 63  od>.      <objec
0260: 74 3e 3c 61 72 67 3e 71 75 65 72 79 3c 2f 61 72  t><arg>query</ar
0270: 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20 20 20 20  g></object>.    
0280: 20 20 3c 6e 61 6d 65 3e 61 70 70 6c 79 3c 2f 6e    <name>apply</n
0290: 61 6d 65 3e 0a 20 20 20 20 20 20 3c 61 72 67 73  ame>.      <args
02a0: 3e 3c 61 72 67 3e 63 6d 64 3c 2f 61 72 67 3e 20  ><arg>cmd</arg> 
02b0: 3c 61 72 67 3e 61 72 67 73 3c 2f 61 72 67 3e 3c  <arg>args</arg><
02c0: 2f 61 72 67 73 3e 0a 20 20 20 20 20 20 3c 72 65  /args>.      <re
02d0: 73 75 6c 74 3e 72 65 74 75 72 6e 73 20 74 68 65  sult>returns the
02e0: 20 6c 69 73 74 20 6f 66 20 72 65 73 75 6c 74 73   list of results
02f0: 20 6f 66 20 61 70 70 6c 69 63 61 74 69 6f 6e 3c   of application<
0300: 2f 72 65 73 75 6c 74 3e 0a 20 20 20 20 20 20 3c  /result>.      <
0310: 64 65 74 61 69 6c 3e 61 70 70 6c 79 20 5b 3c 61  detail>apply [<a
0320: 72 67 3e 74 72 65 65 3c 2f 61 72 67 3e 20 3c 61  rg>tree</arg> <a
0330: 72 67 3e 24 6e 6f 64 65 3c 2f 61 72 67 3e 20 7b  rg>$node</arg> {
0340: 65 78 70 61 6e 64 7d 3c 61 72 67 3e 63 6d 64 3c  expand}<arg>cmd<
0350: 2f 61 72 67 3e 20 7b 65 78 70 61 6e 64 7d 3c 61  /arg> {expand}<a
0360: 72 67 3e 61 72 67 73 3c 2f 61 72 67 3e 5d 20 66  rg>args</arg>] f
0370: 6f 72 6d 20 74 6f 20 65 61 63 68 20 6e 6f 64 65  orm to each node
0380: 20 69 6e 20 6e 6f 64 65 20 73 65 74 3c 2f 64 65   in node set</de
0390: 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65 74 68  tail>.    </meth
03a0: 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c 6d 65  od>.    .    <me
03b0: 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f 62 6a  thod>.      <obj
03c0: 65 63 74 3e 3c 61 72 67 3e 71 75 65 72 79 3c 2f  ect><arg>query</
03d0: 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20 20  arg></object>.  
03e0: 20 20 20 20 3c 6e 61 6d 65 3e 73 61 70 70 6c 79      <name>sapply
03f0: 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20 20 3c 61  </name>.      <a
0400: 72 67 73 3e 3c 61 72 67 3e 63 6d 64 3c 2f 61 72  rgs><arg>cmd</ar
0410: 67 3e 20 3c 61 72 67 3e 61 72 67 73 3c 2f 61 72  g> <arg>args</ar
0420: 67 3e 3c 2f 61 72 67 73 3e 0a 20 20 20 20 20 20  g></args>.      
0430: 3c 72 65 73 75 6c 74 3e 72 65 74 75 72 6e 73 20  <result>returns 
0440: 74 68 65 20 63 6f 6e 63 61 74 65 6e 61 74 65 64  the concatenated
0450: 20 73 74 72 69 6e 67 73 20 6f 66 20 72 65 73 75   strings of resu
0460: 6c 74 73 20 6f 66 20 61 70 70 6c 69 63 61 74 69  lts of applicati
0470: 6f 6e 3c 2f 72 65 73 75 6c 74 3e 0a 20 20 20 20  on</result>.    
0480: 20 20 3c 64 65 74 61 69 6c 3e 61 70 70 6c 79 20    <detail>apply 
0490: 5b 3c 61 72 67 3e 74 72 65 65 3c 2f 61 72 67 3e  [<arg>tree</arg>
04a0: 20 3c 61 72 67 3e 24 6e 6f 64 65 3c 2f 61 72 67   <arg>$node</arg
04b0: 3e 20 7b 65 78 70 61 6e 64 7d 3c 61 72 67 3e 63  > {expand}<arg>c
04c0: 6d 64 3c 2f 61 72 67 3e 20 7b 65 78 70 61 6e 64  md</arg> {expand
04d0: 7d 3c 61 72 67 3e 61 72 67 73 3c 2f 61 72 67 3e  }<arg>args</arg>
04e0: 5d 20 66 6f 72 6d 20 74 6f 20 65 61 63 68 20 6e  ] form to each n
04f0: 6f 64 65 20 69 6e 20 6e 6f 64 65 20 73 65 74 3c  ode in node set<
0500: 2f 64 65 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d  /detail>.    </m
0510: 65 74 68 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20  ethod>.    .    
0520: 3c 6d 65 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c  <method>.      <
0530: 6f 62 6a 65 63 74 3e 3c 61 72 67 3e 71 75 65 72  object><arg>quer
0540: 79 3c 2f 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e  y</arg></object>
0550: 0a 20 20 20 20 20 20 3c 6e 61 6d 65 3e 61 70 70  .      <name>app
0560: 6c 79 73 65 6c 66 3c 2f 6e 61 6d 65 3e 0a 20 20  lyself</name>.  
0570: 20 20 20 20 3c 61 72 67 73 3e 3c 61 72 67 3e 63      <args><arg>c
0580: 6d 64 3c 2f 61 72 67 3e 20 3c 61 72 67 3e 61 72  md</arg> <arg>ar
0590: 67 73 3c 2f 61 72 67 3e 3c 2f 61 72 67 73 3e 0a  gs</arg></args>.
05a0: 20 20 20 20 20 20 3c 72 65 73 75 6c 74 3e 72 65        <result>re
05b0: 74 75 72 6e 73 20 74 68 65 20 6c 69 73 74 20 6f  turns the list o
05c0: 66 20 72 65 73 75 6c 74 73 20 6f 66 20 74 68 65  f results of the
05d0: 20 61 70 70 6c 69 63 61 74 69 6f 6e 3c 2f 72 65   application</re
05e0: 73 75 6c 74 3e 0a 20 20 20 20 20 20 3c 64 65 74  sult>.      <det
05f0: 61 69 6c 3e 61 70 70 6c 79 20 5b 3c 61 72 67 3e  ail>apply [<arg>
0600: 71 75 65 72 79 3c 2f 61 72 67 3e 20 7b 65 78 70  query</arg> {exp
0610: 61 6e 64 7d 3c 61 72 67 3e 63 6d 64 3c 2f 61 72  and}<arg>cmd</ar
0620: 67 3e 20 3c 61 72 67 3e 6e 6f 64 65 3c 2f 61 72  g> <arg>node</ar
0630: 67 3e 20 7b 65 78 70 61 6e 64 7d 3c 61 72 67 3e  g> {expand}<arg>
0640: 61 72 67 73 3c 2f 61 72 67 3e 5d 20 74 6f 20 65  args</arg>] to e
0650: 61 63 68 20 3c 61 72 67 3e 6e 6f 64 65 3c 2f 61  ach <arg>node</a
0660: 72 67 3e 2c 20 64 69 73 63 61 72 64 69 6e 67 20  rg>, discarding 
0670: 6e 75 6c 6c 20 72 65 73 75 6c 74 73 3c 2f 64 65  null results</de
0680: 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65 74 68  tail>.    </meth
0690: 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c 6d 65  od>.    .    <me
06a0: 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f 62 6a  thod>.      <obj
06b0: 65 63 74 3e 3c 61 72 67 3e 71 75 65 72 79 3c 2f  ect><arg>query</
06c0: 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20 20  arg></object>.  
06d0: 20 20 20 20 3c 6e 61 6d 65 3e 6d 61 70 73 65 6c      <name>mapsel
06e0: 66 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20 20 3c  f</name>.      <
06f0: 61 72 67 73 3e 3c 61 72 67 3e 63 6d 64 3c 2f 61  args><arg>cmd</a
0700: 72 67 3e 3c 2f 61 72 67 73 3e 0a 20 20 20 20 20  rg></args>.     
0710: 20 3c 72 65 73 75 6c 74 3e 72 65 74 75 72 6e 73   <result>returns
0720: 20 74 68 65 20 6c 69 73 74 20 6f 66 20 72 65 73   the list of res
0730: 75 6c 74 73 20 6f 66 20 74 68 65 20 61 70 70 6c  ults of the appl
0740: 69 63 61 74 69 6f 6e 3c 2f 72 65 73 75 6c 74 3e  ication</result>
0750: 0a 20 20 20 20 20 20 3c 64 65 74 61 69 6c 3e 61  .      <detail>a
0760: 70 70 6c 79 20 5b 3c 61 72 67 3e 71 75 65 72 79  pply [<arg>query
0770: 3c 2f 61 72 67 3e 20 7b 65 78 70 61 6e 64 7d 3c  </arg> {expand}<
0780: 61 72 67 3e 63 6d 64 3c 2f 61 72 67 3e 20 3c 61  arg>cmd</arg> <a
0790: 72 67 3e 6e 6f 64 65 3c 2f 61 72 67 3e 20 7b 65  rg>node</arg> {e
07a0: 78 70 61 6e 64 7d 3c 61 72 67 3e 61 72 67 73 3c  xpand}<arg>args<
07b0: 2f 61 72 67 3e 5d 20 74 6f 20 65 61 63 68 20 6e  /arg>] to each n
07c0: 6f 64 65 20 69 6e 20 6e 6f 64 65 20 73 65 74 2c  ode in node set,
07d0: 20 6b 65 65 70 69 6e 67 20 6e 75 6c 6c 20 72 65   keeping null re
07e0: 73 75 6c 74 73 3c 2f 64 65 74 61 69 6c 3e 0a 20  sults</detail>. 
07f0: 20 20 20 3c 2f 6d 65 74 68 6f 64 3e 0a 20 20 20     </method>.   
0800: 20 0a 20 20 3c 2f 67 72 6f 75 70 3e 0a 0a 0a 20   .  </group>... 
0810: 20 3c 67 72 6f 75 70 3e 0a 20 20 20 20 3c 6e 61   <group>.    <na
0820: 6d 65 3e 54 72 65 65 20 46 69 6c 74 65 72 73 3c  me>Tree Filters<
0830: 2f 6e 61 6d 65 3e 0a 20 20 20 20 3c 68 65 61 64  /name>.    <head
0840: 65 72 3e 54 68 65 73 65 20 61 72 65 20 6c 6f 77  er>These are low
0850: 20 6c 65 76 65 6c 20 66 69 6c 74 65 72 73 2c 20   level filters, 
0860: 77 68 69 63 68 20 61 70 70 6c 79 20 70 72 65 64  which apply pred
0870: 69 63 61 74 65 73 20 74 6f 20 74 68 65 20 75 6e  icates to the un
0880: 64 65 72 6c 79 69 6e 67 20 74 72 65 65 20 76 69  derlying tree vi
0890: 61 20 74 68 65 20 6e 6f 64 65 20 73 65 74 2c 20  a the node set, 
08a0: 61 6e 64 20 72 65 64 75 63 65 20 74 68 65 20 6e  and reduce the n
08b0: 6f 64 65 73 65 74 20 61 63 63 6f 72 64 69 6e 67  odeset according
08c0: 6c 79 2e 3c 2f 68 65 61 64 65 72 3e 0a 0a 20 20  ly.</header>..  
08d0: 20 20 3c 6d 65 74 68 6f 64 3e 0a 20 20 20 20 20    <method>.     
08e0: 20 3c 6f 62 6a 65 63 74 3e 3c 61 72 67 3e 71 75   <object><arg>qu
08f0: 65 72 79 3c 2f 61 72 67 3e 3c 2f 6f 62 6a 65 63  ery</arg></objec
0900: 74 3e 0a 20 20 20 20 20 20 3c 6e 61 6d 65 3e 66  t>.      <name>f
0910: 69 6c 74 65 72 3c 2f 6e 61 6d 65 3e 0a 20 20 20  ilter</name>.   
0920: 20 20 20 3c 61 72 67 73 3e 3c 61 72 67 3e 63 6d     <args><arg>cm
0930: 64 3c 2f 61 72 67 3e 20 3c 61 72 67 3e 61 72 67  d</arg> <arg>arg
0940: 73 3c 2f 61 72 67 3e 3c 2f 61 72 67 73 3e 0a 20  s</arg></args>. 
0950: 20 20 20 20 20 3c 72 65 73 75 6c 74 3e 72 65 74       <result>ret
0960: 75 72 6e 73 20 74 68 65 20 6c 69 73 74 20 6f 66  urns the list of
0970: 20 72 65 73 75 6c 74 73 20 6f 66 20 61 70 70 6c   results of appl
0980: 69 63 61 74 69 6f 6e 20 77 68 65 6e 20 61 70 70  ication when app
0990: 6c 69 63 61 74 69 6f 6e 20 69 73 20 6e 6f 6e 20  lication is non 
09a0: 6e 69 6c 3c 2f 72 65 73 75 6c 74 3e 0a 20 20 20  nil</result>.   
09b0: 20 20 20 3c 64 65 74 61 69 6c 3e 66 69 6c 74 65     <detail>filte
09c0: 72 20 6e 6f 64 65 73 20 62 79 20 5b 3c 61 72 67  r nodes by [<arg
09d0: 3e 74 72 65 65 3c 2f 61 72 67 3e 20 7b 65 78 70  >tree</arg> {exp
09e0: 61 6e 64 7d 3c 61 72 67 3e 63 6d 64 3c 2f 61 72  and}<arg>cmd</ar
09f0: 67 3e 20 7b 65 78 70 61 6e 64 7d 3c 61 72 67 3e  g> {expand}<arg>
0a00: 61 72 67 73 3c 2f 61 72 67 3e 5d 3c 2f 64 65 74  args</arg>]</det
0a10: 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65 74 68 6f  ail>.    </metho
0a20: 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c 6d 65 74  d>.    .    <met
0a30: 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f 62 6a 65  hod>.      <obje
0a40: 63 74 3e 3c 61 72 67 3e 71 75 65 72 79 3c 2f 61  ct><arg>query</a
0a50: 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20 20 20  rg></object>.   
0a60: 20 20 20 3c 6e 61 6d 65 3e 62 6f 6f 6c 3c 2f 6e     <name>bool</n
0a70: 61 6d 65 3e 0a 20 20 20 20 20 20 3c 61 72 67 73  ame>.      <args
0a80: 3e 3c 61 72 67 3e 63 6d 64 3c 2f 61 72 67 3e 20  ><arg>cmd</arg> 
0a90: 3c 61 72 67 3e 61 72 67 73 3c 2f 61 72 67 3e 3c  <arg>args</arg><
0aa0: 2f 61 72 67 73 3e 0a 20 20 20 20 20 20 3c 72 65  /args>.      <re
0ab0: 73 75 6c 74 3e 72 65 74 75 72 6e 73 20 74 68 65  sult>returns the
0ac0: 20 6c 69 73 74 20 6f 66 20 72 65 73 75 6c 74 73   list of results
0ad0: 20 6f 66 20 61 70 70 6c 69 63 61 74 69 6f 6e 20   of application 
0ae0: 77 68 65 6e 20 61 70 70 6c 69 63 61 74 69 6f 6e  when application
0af0: 20 69 73 20 74 72 75 65 3c 2f 72 65 73 75 6c 74   is true</result
0b00: 3e 0a 20 20 20 20 20 20 3c 64 65 74 61 69 6c 3e  >.      <detail>
0b10: 66 69 6c 74 65 72 20 6e 6f 64 65 73 20 62 79 20  filter nodes by 
0b20: 74 68 65 20 70 72 65 64 69 63 61 74 65 20 5b 3c  the predicate [<
0b30: 61 72 67 3e 74 72 65 65 3c 2f 61 72 67 3e 20 7b  arg>tree</arg> {
0b40: 65 78 70 61 6e 64 7d 3c 61 72 67 3e 63 6d 64 3c  expand}<arg>cmd<
0b50: 2f 61 72 67 3e 20 7b 65 78 70 61 6e 64 7d 3c 61  /arg> {expand}<a
0b60: 72 67 3e 61 72 67 73 3c 2f 61 72 67 3e 5d 3c 2f  rg>args</arg>]</
0b70: 64 65 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65  detail>.    </me
0b80: 74 68 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c  thod>.    .    <
0b90: 6d 65 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f  method>.      <o
0ba0: 62 6a 65 63 74 3e 3c 61 72 67 3e 71 75 65 72 79  bject><arg>query
0bb0: 3c 2f 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a  </arg></object>.
0bc0: 20 20 20 20 20 20 3c 6e 61 6d 65 3e 73 74 72 69        <name>stri
0bd0: 6e 67 50 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20  ngP</name>.     
0be0: 20 3c 61 72 67 73 3e 3c 61 72 67 3e 6f 70 3c 2f   <args><arg>op</
0bf0: 61 72 67 3e 20 3c 61 72 67 3e 61 74 74 72 3c 2f  arg> <arg>attr</
0c00: 61 72 67 3e 3c 2f 61 72 67 73 3e 0a 20 20 20 20  arg></args>.    
0c10: 20 20 3c 72 65 73 75 6c 74 3e 72 65 74 75 72 6e    <result>return
0c20: 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 6e 6f  s the list of no
0c30: 64 65 73 20 66 6f 72 20 77 68 69 63 68 20 70 72  des for which pr
0c40: 65 64 69 63 61 74 65 20 69 73 20 74 72 75 65 3c  edicate is true<
0c50: 2f 72 65 73 75 6c 74 3e 0a 20 20 20 20 20 20 3c  /result>.      <
0c60: 64 65 74 61 69 6c 3e 66 69 6c 74 65 72 20 6e 6f  detail>filter no
0c70: 64 65 73 20 62 79 20 70 72 65 64 69 63 61 74 65  des by predicate
0c80: 20 5b 73 74 72 69 6e 67 20 7b 65 78 70 61 6e 64   [string {expand
0c90: 7d 3c 61 72 67 3e 6f 70 3c 2f 61 72 67 3e 5d 20  }<arg>op</arg>] 
0ca0: 6f 76 65 72 20 61 74 74 72 69 62 75 74 65 20 3c  over attribute <
0cb0: 61 72 67 3e 61 74 74 72 3c 2f 61 72 67 3e 3c 2f  arg>attr</arg></
0cc0: 64 65 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65  detail>.    </me
0cd0: 74 68 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c  thod>.    .    <
0ce0: 6d 65 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f  method>.      <o
0cf0: 62 6a 65 63 74 3e 3c 61 72 67 3e 71 75 65 72 79  bject><arg>query
0d00: 3c 2f 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a  </arg></object>.
0d10: 20 20 20 20 20 20 3c 6e 61 6d 65 3e 73 74 72 69        <name>stri
0d20: 6e 67 4e 50 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20  ngNP</name>.    
0d30: 20 20 3c 61 72 67 73 3e 3c 61 72 67 3e 6f 70 3c    <args><arg>op<
0d40: 2f 61 72 67 3e 20 3c 61 72 67 3e 61 74 74 72 3c  /arg> <arg>attr<
0d50: 2f 61 72 67 3e 3c 2f 61 72 67 73 3e 0a 20 20 20  /arg></args>.   
0d60: 20 20 20 3c 72 65 73 75 6c 74 3e 72 65 74 75 72     <result>retur
0d70: 6e 73 20 74 68 65 20 6c 69 73 74 20 6f 66 20 6e  ns the list of n
0d80: 6f 64 65 73 20 66 6f 72 20 77 68 69 63 68 20 70  odes for which p
0d90: 72 65 64 69 63 61 74 65 20 69 73 20 66 61 6c 73  redicate is fals
0da0: 65 3c 2f 72 65 73 75 6c 74 3e 0a 20 20 20 20 20  e</result>.     
0db0: 20 3c 64 65 74 61 69 6c 3e 66 69 6c 74 65 72 20   <detail>filter 
0dc0: 6e 6f 64 65 73 20 62 79 20 6e 65 67 61 74 69 6e  nodes by negatin
0dd0: 67 20 74 68 65 20 70 72 65 64 69 63 61 74 65 20  g the predicate 
0de0: 5b 73 74 72 69 6e 67 20 7b 65 78 70 61 6e 64 7d  [string {expand}
0df0: 3c 61 72 67 3e 6f 70 3c 2f 61 72 67 3e 5d 20 6f  <arg>op</arg>] o
0e00: 76 65 72 20 61 74 74 72 69 62 75 74 65 20 3c 61  ver attribute <a
0e10: 72 67 3e 61 74 74 72 3c 2f 61 72 67 3e 3c 2f 64  rg>attr</arg></d
0e20: 65 74 61 69 6c 3e 0a 20 20 20 20 3c 2f 6d 65 74  etail>.    </met
0e30: 68 6f 64 3e 0a 20 20 20 20 0a 20 20 20 20 3c 6d  hod>.    .    <m
0e40: 65 74 68 6f 64 3e 0a 20 20 20 20 20 20 3c 6f 62  ethod>.      <ob
0e50: 6a 65 63 74 3e 3c 61 72 67 3e 71 75 65 72 79 3c  ject><arg>query<
0e60: 2f 61 72 67 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20  /arg></object>. 
0e70: 20 20 20 20 20 3c 6e 61 6d 65 3e 65 78 70 72 50       <name>exprP
0e80: 3c 2f 6e 61 6d 65 3e 0a 20 20 20 20 20 20 3c 61  </name>.      <a
0e90: 72 67 73 3e 3c 61 72 67 3e 6f 70 3c 2f 61 72 67  rgs><arg>op</arg
0ea0: 3e 20 3c 61 72 67 3e 61 74 74 72 3c 2f 61 72 67  > <arg>attr</arg
0eb0: 3e 3c 2f 61 72 67 73 3e 0a 20 20 20 20 20 20 3c  ></args>.      <
0ec0: 72 65 73 75 6c 74 3e 72 65 74 75 72 6e 73 20 74  result>returns t
0ed0: 68 65 20 6c 69 73 74 20 6f 66 20 6e 6f 64 65 73  he list of nodes
0ee0: 20 66 6f 72 20 77 68 69 63 68 20 70 72 65 64 69   for which predi
0ef0: 63 61 74 65 20 69 73 20 74 72 75 65 3c 2f 72 65  cate is true</re
0f00: 73 75 6c 74 3e 0a 20 20 20 20 20 20 3c 64 65 74  sult>.      <det
0f10: 61 69 6c 3e 66 69 6c 74 65 72 20 6e 6f 64 65 73  ail>filter nodes
0f20: 20 62 79 20 70 72 65 64 69 63 61 74 65 20 5b 65   by predicate [e
0f30: 78 70 72 20 7b 65 78 70 61 6e 64 7d 3c 61 72 67  xpr {expand}<arg
0f40: 3e 6f 70 3c 2f 61 72 67 3e 5d 20 6f 76 65 72 20  >op</arg>] over 
0f50: 61 74 74 72 69 62 75 74 65 20 3c 61 72 67 3e 61  attribute <arg>a
0f60: 74 74 72 3c 2f 61 72 67 3e 3c 2f 64 65 74 61 69  ttr</arg></detai
0f70: 6c 3e 0a 20 20 20 20 3c 2f 6d 65 74 68 6f 64 3e  l>.    </method>
0f80: 0a 20 20 20 20 0a 20 20 20 20 3c 6d 65 74 68 6f  .    .    <metho
0f90: 64 3e 0a 20 20 20 20 20 20 3c 6f 62 6a 65 63 74  d>.      <object
0fa0: 3e 3c 61 72 67 3e 71 75 65 72 79 3c 2f 61 72 67  ><arg>query</arg
0fb0: 3e 3c 2f 6f 62 6a 65 63 74 3e 0a 20 20 20 20 20  ></object>.     
0fc0: 20 3c 6e 61 6d 65 3e 65 78 70 72 4e 50 3c 2f 6e   <name>exprNP</n
0fd0: 61 6d 65 3e 0a 20 20 20 20 20 20 3c 61 72 67 73  ame>.      <args
0fe0: 3e 3c 61 72 67 3e 6f 70 3c 2f 61 72 67 3e 20 3c  ><arg>op</arg> <
0ff0: 61 72 67 3e 61 74 74 72 3c 2f 61 72 67 3e 3c 2f  arg>attr</arg></
1000: 61 72 67 73 3e 0a 20 20 20 20 20 20 3c 72 65 73  args>.      <res
1010: 75 6c 74 3e 72 65 74 75 72 6e 73 20 74 68 65 20  ult>returns the 
1020: 6c 69 73 74 20 6f 66 20 6e 6f 64 65 73 20 66 6f  list of nodes fo
1030: 72 20 77 68 69 63 68 20 70 72 65 64 69 63 61 74  r which predicat
1040: 65 20 69 73 20 66 61 6c 73 65 3c 2f 72 65 73 75  e is false</resu
1050: 6c 74 3e 0a 20 20 20 20 20 20 3c 64 65 74 61 69  lt>.      <detai
1060: 6c 3e 66 69 6c 74 65 72 20 6e 6f 64 65 73 20 62  l>filter nodes b
1070: 79 20 70 72 65 64 69 63 61 74 65 20 21 5b 65 78  y predicate ![ex
1080: 70 72 20 7b 65 78 70 61 6e 64 7d 3c 61 72 67 3e  pr {expand}<arg>
1090: 6f 70 3c 2f 61 72 67 3e 5d 20 6f 76 65 72 20 61  op</arg>] over a
10a0: 74 74 72 69 62 75 74 65 20 3c 61 72 67 3e 61 74  ttribute <arg>at
10b0: 74 72 3c 2f 61 72 67 3e 3c 2f 64 65 74 61 69 6c  tr</arg></detail
10c0: 3e 0a 20 20 20 20 3c 2f 6d 65 74 68 6f 64 3e 0a  >.    </method>.
10d0: 0a 20 20 3c 2f 67 72 6f 75 70 3e 0a 0a 3c 2f 61  .  </group>..</a
10e0: 70 69 3e 0a                                      pi>.