file names with [] and base-uri
Monday, 15 December 2014 · 3 messages · last reply 22 Dec 2014
AB
Andy Bunce15 Dec 2014 15:03 #
Hi,
If I create a database with a file with [] in the name e.g.
*bracket[in]name.xml
*then
/*/base-uri(.)
gives the error
[XQST0046] URI 'bracket[in]name/bracket[in]name.xml' is invalid. Query:
/*/base-uri(.)
Is this correct behavior?
/Andy
CG
Christian Grün15 Dec 2014 20:58 #
Hi Andy,
interesting issue. I just tried some other XQuery processors in order to find out how they resolve the name of a local file:
• File: [].xml
• Query: base-uri(doc('[].xml'))
• Saxon:
FODC0002: Exception thrown by URIResolver:
Invalid relative URI {[].xml}: Illegal
character in path at index 0: [].xml
• Zorba:
[err:FODC0005]: "[].xml": invalid URI literal: "91": invalid character c
• BaseX:
[FODC0005] Invalid document URI: '[].xml'.
I have added an issue in the W3 bug tracker [1]; let's wait for the response.
Christian
[1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=27612
AB
Andy Bunce22 Dec 2014 17:53 #
Thanks. As my documents are in a database I can use
db:path [1] for now. /Andy
[1] http://docs.basex.org/wiki/Database_Module#db:pathQuoted text · Christian Grün · 26 lines
On 15 December 2014 at 19:58, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Andy, > > interesting issue. I just tried some other XQuery processors in order > to find out how they resolve the name of a local file: > > • File: [].xml > • Query: base-uri(doc('[].xml')) > > • Saxon: > FODC0002: Exception thrown by URIResolver: > Invalid relative URI {[].xml}: Illegal > character in path at index 0: [].xml > • Zorba: > [err:FODC0005]: "[].xml": invalid URI literal: "91": invalid character c > • BaseX: > [FODC0005] Invalid document URI: '[].xml'. > > I have added an issue in the W3 bug tracker [1]; let's wait for the > response. > > Christian > > [1] https://www.w3.org/Bugs/Public/show_bug.cgi?id=27612 >
Written for BaseX 7.9. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery