Author mthuurne
Recipients Garrett Birkel, Rafael Ascensao, SpecLad, eli.bendersky, gene_wood, martin.panter, mthuurne, scoder, silverbacknet, wiml
Date 2018-12-08.18:38:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1544294297.77.0.788709270274.issue17088@psf.upfronthosting.co.za>
In-reply-to
Content
I was working on what I thought would be an elegant solution to this problem: for non-qualified attributes, add the element's namespace before accessing the cache and strip the namespace prefix after accessing the cache if it's equal to the element's prefix.

However, this approach doesn't work: even though non-qualified attributes will be processed like they are the element's namespace, they are considered to have no namespace. This means <ns:x a="1" ns:a="2"/> is considered valid XML, even though it effectively defines the same attribute twice.

https://www.w3.org/TR/REC-xml-names/#uniqAttrs

In my opinion the spec made a silly choice here, but that's probably not something that can fixed anymore.

I haven't decided yet whether I'll make another attempt at fixing this issue. In any case, I hope this tale of caution benefits someone.
History
Date User Action Args
2018-12-08 18:38:17mthuurnesetrecipients: + mthuurne, scoder, eli.bendersky, wiml, silverbacknet, martin.panter, SpecLad, gene_wood, Garrett Birkel, Rafael Ascensao
2018-12-08 18:38:17mthuurnesetmessageid: <1544294297.77.0.788709270274.issue17088@psf.upfronthosting.co.za>
2018-12-08 18:38:17mthuurnelinkissue17088 messages
2018-12-08 18:38:17mthuurnecreate