Chirstian,
I'm also starting to a few DITA projects with BaseX that use attributes for matches. Other projects were DITA-like and did not need to match attribute tokens in @class. There is a big and growing DITA community out there who need native XML database support, I think it might be interesting to include indexing attribute tokens in the roadmap at some point, even if only as a longer term items.
This is a very important aspect of the DITA standard. HTML classes also use tokens
more and more. So that's not just relevant to the DITA community.
Regards,
France