%title%

    # File /home/ser/Work/rexml/rexml/xpath.rb, line 170
      def XPath::predicate( elements, path )
    			ind = 1
    			bcount = 1
    			while bcount > 0
    				bcount += 1 if path[ind] == ?[
    				bcount -= 1 if path[ind] == ?]
    				ind += 1
    			end
    			ind -= 1
    			predicate = path[1..ind-1]
    			rest = path[ind+1..-1]

    			# have to change 'a [=<>] b [=<>] c' into 'a [=<>] b and b [=<>] c'
    			predicate.gsub!( /([^\(and)(or)<>=]+)\*([<>=])\*([^\(and)(or)<>=]+)\*([<>=])\*([^\(and)(or)<>=]+)/u ) {
    				"#$1 #$2 #$3 and #$3 #$4 #$5"
    			}
    			# Let's do some Ruby trickery to avoid some work:
    			predicate.gsub!( /&/u, "&&" )
    			predicate.gsub!( /=/u, "==" )
    			predicate.gsub!( /@(\[\.-]*)/u ) {
    				"attribute(\#$1\)"
    			}
    			predicate.gsub!( /\bmod\b/u, "%" )
    			predicate.gsub!( /\b(\[\.-]*\)/u ) {
    				fname = $1
    				fname.gsub( /-/u, "_" )
    			}

    			Functions.pair = [ 0, elements.size ]
    			results = []
    			elements.each do |element|
    				Functions.pair[0] += 1
    				Functions.node = element
    				res = eval( predicate )
    				case res
    				when true
    					results << element
    				when Fixnum
    					results << element if Functions.pair[0] == res
    				when String
    					results << element
    				end
    			end
    			return filter( results, rest )
    		end