Re: [basex-talk] fn:doc weirdness with imported files

2017-01-11 Thread Christian Grün
> 1. Create a new database I think this is the point where I’m stuck. Probably it’s not enough to create an arbitrary database, but the path must somewhat be similar to the path of the file that you are addressing in the next steps? Did you first create an empty database and add the document

Re: [basex-talk] fn:doc weirdness with imported files

2017-01-11 Thread Marc van Grootel
Hi Christian, Couldn't repro it with a command script, it got the expected behaviour each way I tried. However, I can repro it consistently in the GUI. GUI: 1. Create a new database 2. Point Input file or directory to an existing XML file, say, "F:/tmp/foo.xml" (haven't verified behaviour on

Re: [basex-talk] fn:doc weirdness with imported files

2017-01-10 Thread Christian Grün
Hi Marc, > When I have the database closed in the GUI > > base-uri(doc('F:/tmp/foo.xml')) => file:///F:/tmp/foo.xml > > And when I open the database "foo" from the GUI > > base-uri(doc('F:/tmp/foo.xml')) => /foo/foo.xml > > Is that right? I wouldn’t say so ;) As somewhat usual, I

Re: [basex-talk] fn:doc weirdness with imported files

2017-01-10 Thread Marc van Grootel
... am I missing something? So this db:node-id($node) should raise an error in case $node is not a database node. However in the GUI and in the command-line client. db:node-id(doc('F:/tmp/afile.xml')) => 0 db:node-id(doc('F:/tmp/afile.xml')/*) => 1 only requirement is that

[basex-talk] fn:doc weirdness with imported files

2017-01-10 Thread Marc van Grootel
Hi all, Happy new year btw! I got bitten by something and can't explain this behaviour. So the situation is that I have an XML file on the file system in F:/tmp/foo.xml I also have this file imported into a database named "foo" (and the path "/foo.xml". Now in the GUI (and on 8.5.3) I have