extract template element from attribute templates

R=arv@chromium.org
BUG=

Review URL: https://codereview.appspot.com/9193046