added max length to elements and attributes