I found at best an inconsistency in the xml-mkiv manual and at its worst an omission in the code.

I must conclude that \xmllastatt is not delivering the attribute retrieved with \xmlchainatt and that \xmllastatt seems restricted to calls of the \xmlatt family. This put me on the wrong foot for a while, because I understood the manual otherwise.
Vide the minimal example given.

dr. Hans van der Meer