Fix issue #109, attr refs should not be case sensitive

- additionally, strip whitespace around xref labels