• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/ruby-106/ruby/lib/rexml/

Lines Matching refs:nodeset

65     def parse path, nodeset
69 #puts "PARSE: nodeset = #{nodeset.inspect}"
70 match( path_stack, nodeset )
73 def get_first path, nodeset
77 #puts "PARSE: nodeset = #{nodeset.inspect}"
78 first( path_stack, nodeset )
81 def predicate path, nodeset
83 expr( path_stack, nodeset )
136 def match( path_stack, nodeset )
138 #puts "MATCH: nodeset = #{nodeset.inspect}"
139 r = expr( path_stack, nodeset )
166 def expr( path_stack, nodeset, context=nil )
169 #puts "Returning" if path_stack.length == 0 || nodeset.length == 0
171 return nodeset if path_stack.length == 0 || nodeset.length == 0
175 #puts "Nodeset is #{nodeset.inspect}"
176 if nodeset.length == 0
182 nodeset = [ nodeset[0].root_node ]
183 #puts ":document, nodeset = #{nodeset.inspect}"
189 nodeset.delete_if do |node|
207 #puts "ANY 1: nodeset = #{nodeset.inspect}"
209 nodeset.delete_if { |node| !node_types.include?(node.node_type) }
210 #puts "ANY 2: nodeset = #{nodeset.inspect}"
217 nodeset.delete_if do |node|
223 nodeset.delete_if { |node| node.node_type != :text }
226 nodeset.delete_if { |node| node.node_type != :comment }
235 nodeset.each do |node|
239 nodeset = new_nodeset
251 for element in nodeset
262 for element in nodeset
268 nodeset = new_nodeset
271 #puts "PARENT 1: nodeset = #{nodeset}"
272 nodeset = nodeset.collect{|n| n.parent}.compact
273 #nodeset = expr(path_stack.dclone, nodeset.collect{|n| n.parent}.compact)
274 #puts "PARENT 2: nodeset = #{nodeset.inspect}"
279 nodeset.each do |node|
285 nodeset = new_nodeset
290 nodeset.each do |node|
299 nodeset = new_nodeset
304 subcontext = { :size => nodeset.size }
306 nodeset.each_with_index { |node, index|
328 #puts "New nodeset = #{new_nodeset.inspect}"
330 nodeset = new_nodeset
333 ns = nodeset.clone
336 #puts "nodeset = #{nodeset.inspect}"
338 nodeset = result.zip(ns).collect{|m,n| n if m}.compact
340 nodeset = result ? nodeset : []
342 #puts "Outgoing NS = #{nodeset.inspect}"
346 rv = descendant_or_self( path_stack, nodeset )
348 nodeset = rv
354 nodeset.each do |node|
359 nodeset = results
363 #puts "FOLLOWING_SIBLING 1: nodeset = #{nodeset}"
365 nodeset.each do |node|
372 #puts "FOLLOWING_SIBLING 2: nodeset = #{nodeset}"
373 nodeset = results
377 nodeset.each do |node|
384 nodeset = results
389 nodeset.each do |node|
393 nodeset = new_nodeset
398 nodeset.each do |node|
401 nodeset = new_nodeset
408 nodeset.each do |node|
425 nodeset = new_nodeset
436 left = expr( path_stack.shift, nodeset.dup, context )
438 right = expr( path_stack.shift, nodeset.dup, context )
445 left = expr( path_stack.shift, nodeset.dup, context )
451 right = expr( path_stack.shift, nodeset.dup, context )
458 left = Functions::number(expr(path_stack.shift, nodeset, context)).to_f
459 right = Functions::number(expr(path_stack.shift, nodeset, context)).to_f
463 left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
464 right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
468 left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
469 right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
473 left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
474 right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
478 left = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
479 right = Functions::number(expr(path_stack.shift, nodeset, context )).to_f
483 left = expr( path_stack.shift, nodeset, context )
484 right = expr( path_stack.shift, nodeset, context )
488 res = expr( path_stack, nodeset, context )
496 subcontext = context ? nil : { :size => nodeset.size }
500 nodeset.each_with_index { |n, i|
520 #puts "EXPR returning #{nodeset.inspect}"
521 return nodeset
533 def descendant_or_self( path_stack, nodeset )
537 #puts "NODESET = #{nodeset.collect{|n|n.inspect}.inspect}"
538 d_o_s( path_stack, nodeset, rs )
582 def recurse( nodeset, &block )
583 for node in nodeset
591 # Builds a nodeset of all of the preceding nodes of the supplied node,
712 # If one is nodeset and other is number, compare number to each item
713 # in nodeset s.t. number op number(string(item))
714 # If one is nodeset and other is string, compare string to each item
715 # in nodeset s.t. string op string(item)
716 # If one is nodeset and other is boolean, compare boolean to each item
717 # in nodeset s.t. boolean op boolean(item)
743 # If neither is nodeset,