def add_alias(ref)
      node = Nokogiri::XML::Node.new 'alias', document
      node.ref = (Entry === ref) ? ref.id : ref.to_s

      add_child node
    end
def add_alias(ref)
      node = Nokogiri::XML::Node.new 'alias', document
      node.ref = (Entry === ref) ? ref.id : ref.to_s

      add_child node
    end
Builds an alias with given attributes and add it.