This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This is a newer function that has not the right signature. Since the arguments are often calculated, we should allow empty: 11.2.5 fn:namespace-uri-for-prefix fn:namespace-uri-for-prefix( $prefix as xs:string?, $element as element()?) as xs:anyURI? Summary: Returns the namespace URI of one of the in-scope namespaces for $element, identified by its namespace prefix. If $element is the empty sequence, it returns the empty sequence. If $element has an in-scope namespace whose namespace prefix is equal to $prefix, it returns the namespace URI of that namespace. If $prefix is the zero-length string or the empty sequence, it returns the namespace URI of the default (unnamed) namespace. Otherwise, it returns the empty sequence.
*** Bug 1426 has been marked as a duplicate of this bug. ***
The working group discussed this at the meeting today and decided to accept this comment, in part, by making the prefix argument accept an empty sequence with the semantics as you describe.