This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
In 3.7.3.2 we are clear that when you do attribute {$exp} {"uri"} then it's an error (XQDT0044) if the value of $exp is "xmlns" or "xmlns:XXX". There should be a corresponding static error for the case where the name is written explicitly, e.g. as attribute xmlns:p {"uri"} or attribute xmlns {"uri"} Michael Kay (following up private email from David Carlisle)
On 31 Aug 2005, the Query working group agreed that a computed attribute constructor whose QName is xmlns or xmlns:* should be an error. It was decided to use the existing error XPDY0044 for this case, even though in principle the error could be detected statically. An implementation is always free to raise a dynamic error during static analysis if it can prove that an expression, if evaluated, will necessarily raise a dynamic error. I have implemented the working group decision and closed the bug report. Mike, if you are not satisifed with this resolution, please reopen the bug report. --Don Chamberlin