renaming of onText to onAttribute

also adding the parsing of comment