182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
|
# File 'lib/vcdom/xpath/internal/evaluator.rb', line 182
def evaluate_node_selection( nodes, cmd )
new_nodes = Array.new()
nodes.each do |c_node|
c_nodes = Array.new()
if ( node_selection_by_axis_proc = NODE_SELECTION_BY_AXIS_PROCS[ cmd.axis ] ).nil? then
raise "invalid axis [#{cmd.axis}]"
end
node_selection_by_axis_proc.call( c_node, c_nodes )
c_nodes = evaluate_node_selection_sub( c_nodes, cmd )
if cmd.pred_exprs then
cmd.pred_exprs.each do |expr|
c_nodes = evaluate_pred_internal( c_nodes, expr )
end
end
new_nodes.concat c_nodes
end
new_nodes.uniq!
create_node_set_value( *new_nodes )
end
|