def template_href
ret = "default.amx"
each do |n|
next unless n.kind_of?(REXML::Instruction)
next unless n.target.downcase == "amx"
if n.content =~ /(\w+)="(.*)"/ and $1 == "href"
ret = $2
break
else
raise "unknown instruction #{n.content}"
end
end
ret
end