lib/samlr/signature.rb
def referenced_node(id)
      nodes = document.xpath("//*[@ID='#{id}']")

      if nodes.size != 1
        raise SignatureError.new("Reference validation error: Invalid element references", "Expected 1 element with id #{id}, found #{nodes.size}")
      end

      nodes.first
    end
def referenced_node(id)
      nodes = document.xpath("//*[@ID='#{id}']")

      if nodes.size != 1
        raise SignatureError.new("Reference validation error: Invalid element references", "Expected 1 element with id #{id}, found #{nodes.size}")
      end

      nodes.first
    end
Looks up node by id, checks that there's only a single node with a given id