# File lib/xpath/expression.rb, line 102 def to_xpath(predicate=nil) if @right.is_a?(Literal) "#{@left.to_xpath(predicate)}/@#{@right.to_xpath(predicate)}" else "#{@left.to_xpath(predicate)}/attribute::node()[name(.) = #{@right.to_xpath(predicate)}]" end end