use generic solution to create attributes from data-xyz tags. refs #342