This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
We have been pointed out by a user that base-uri() or document-uri() may trigger an error (FODC0002 or FODC0005) when being called on a document that has been retrieved from a file. The problem happens if the characters of the file name are valid, but invalid as part of a URI: document-uri(doc('[].xml')) Is this behavior expected, or even desirable?
Could you expand on the rationale why you think these errors are raised?
Sorry, Michael, for the hasty bug report. It turns out that the problem was not fn:base-uri, but the call of fn:doc. It could simply be solved by encoding '[' in the argument of the fn:doc function (resulting in doc('%5B%5D.xml')). I am marking this as resolved.