check dimension attribute values on tag

see inline comments.