This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 27612 - document-uri(), base-uri() raises FODC0002/FODC0005
Summary: document-uri(), base-uri() raises FODC0002/FODC0005
Status: CLOSED INVALID
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Functions and Operators 3.1 (show other bugs)
Version: Working drafts
Hardware: PC Windows NT
: P2 normal
Target Milestone: ---
Assignee: Michael Kay
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 19:57 UTC by Christian Gruen
Modified: 2015-02-10 17:04 UTC (History)
0 users

See Also:


Attachments

Description Christian Gruen 2014-12-15 19:57:47 UTC
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?
Comment 1 Michael Kay 2014-12-23 17:31:33 UTC
Could you expand on the rationale why you think these errors are raised?
Comment 2 Christian Gruen 2014-12-23 17:54:19 UTC
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.