    # File lib/nokogiri/xml/node_set.rb, line 71
          def search *paths
            handler = ![
              Hash, String, Symbol
            ].include?(paths.last.class) ? paths.pop : nil

            ns = paths.last.is_a?(Hash) ? paths.pop : nil

            sub_set = NodeSet.new(document)

            paths.each do |path|
              sub_set += send(
                path =~ /^(\.\/|\/)/ ? :xpath : :css,
                *(paths + [ns, handler]).compact
              )
            end

            document.decorate(sub_set)
            sub_set
          end