On 19/12/2013, basex-talk-request@mailman.uni-konstanz.de basex-talk-request@mailman.uni-konstanz.de wrote:
Today's Topics:
- Re: initial installation observation (Christian Gr?n)
Message: 4 Date: Thu, 19 Dec 2013 12:29:06 +0100 Subject: Re: [basex-talk] initial installation observation
You can optionally check out the following Wiki article to see what other startup options may be helpful:
Starting the command terminal fails:
$ basex BaseX 7.7.2 [Standalone] Try help to get more information.
OPEN xmldatabasefile.xml
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml, /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
How to open the database file, please?
-- basex772
I would be pleased if you could first check out our documentation; it contains all the information you seem to be looking for. Am 19.12.2013 22:32 schrieb "e-letter" inpost@gmail.com:
On 19/12/2013, basex-talk-request@mailman.uni-konstanz.de basex-talk-request@mailman.uni-konstanz.de wrote:
Today's Topics:
- Re: initial installation observation (Christian Gr?n)
Message: 4 Date: Thu, 19 Dec 2013 12:29:06 +0100 Subject: Re: [basex-talk] initial installation observation
You can optionally check out the following Wiki article to see what other startup options may be helpful:
Starting the command terminal fails:
$ basex BaseX 7.7.2 [Standalone] Try help to get more information.
OPEN xmldatabasefile.xml
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml, /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
How to open the database file, please?
-- basex772 _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
On 19/12/2013, Christian Grün christian.gruen@gmail.com wrote:
I would be pleased if you could first check out our documentation; it contains all the information you seem to be looking for. Am 19.12.2013 22:32 schrieb "e-letter" inpost@gmail.com:
On 19/12/2013, basex-talk-request@mailman.uni-konstanz.de basex-talk-request@mailman.uni-konstanz.de wrote:
Today's Topics:
- Re: initial installation observation (Christian Gr?n)
Message: 4 Date: Thu, 19 Dec 2013 12:29:06 +0100 Subject: Re: [basex-talk] initial installation observation
You can optionally check out the following Wiki article to see what other startup options may be helpful:
Starting the command terminal fails:
$ basex BaseX 7.7.2 [Standalone] Try help to get more information.
OPEN xmldatabasefile.xml
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml, /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
How to open the database file, please?
-- basex772
According to the page 'standalone' (http://docs.basex.org/wiki/Command-Line_Options#BaseX_Standalone)
basex -h
will cause production of a list of commands, but this is not seen:
$ basex -h BaseX 7.7.2 [Standalone] Try help to get more information.
$ basex -i xmldatabasefile.xml BaseX 7.7.2 [Standalone] Try help to get more information.
help
Try HELP [...] to get info on a specific command.
ADD (TO [path]) [input] Add resource to database. ALTER [DATABASE|USER] [...] Alter database name or user password. CHECK [input] Open or create database. CLOSE Close current database. COPY [name] [newname] Copy database. CREATE [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Create database, index, user, backup or event. CS [query] Run XQuery and set result as new context set. DELETE [path] Delete resources from database. DROP [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Drop database, index, user, backup or event. EXIT Exit application. EXPORT [path] Export database to XML. FIND [keywords] Run a keyword query. FLUSH Flush database. GET [option] Show global option. GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [database]) TO [user] Grant user permissions. HELP ([command]) Get help on BaseX commands. INFO ([DATABASE|INDEX|STORAGE]) Show information on current database. INSPECT Perform integrity checks. KILL [name] Kill user sessions. LIST ([name] ([path])) List databases or resources of database. OPEN [name] ([path]) Open database. OPTIMIZE (ALL) Optimize the database. PASSWORD ([password]) Change password. RENAME [path] [newpath] Rename resources in database. REPLACE [path] [input] Replace resources in database. REPO [DELETE|INSTALL|LIST] Install, delete or list packages. RESTORE [name-(date)] Restore database. RETRIEVE [path] Retrieve raw data. RUN [path] Run query or command script. EXECUTE [input] Execute command script. SET [option] ([value]) Set global options. SHOW [BACKUPS|EVENTS|SESSIONS|USERS] Show server information. STORE (TO [path]) [input] Store raw data. XQUERY [query] Run XQuery.
On 19.12.2013, at 23:04, e-letter inpost@gmail.com wrote:
On 19/12/2013, Christian Grün christian.gruen@gmail.com wrote:
I would be pleased if you could first check out our documentation; it contains all the information you seem to be looking for. Am 19.12.2013 22:32 schrieb "e-letter" inpost@gmail.com:
On 19/12/2013, basex-talk-request@mailman.uni-konstanz.de basex-talk-request@mailman.uni-konstanz.de wrote:
Today's Topics:
- Re: initial installation observation (Christian Gr?n)
Message: 4 Date: Thu, 19 Dec 2013 12:29:06 +0100 Subject: Re: [basex-talk] initial installation observation
You can optionally check out the following Wiki article to see what other startup options may be helpful:
Starting the command terminal fails:
$ basex BaseX 7.7.2 [Standalone] Try help to get more information.
OPEN xmldatabasefile.xml
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml, /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
How to open the database file, please?
-- basex772
According to the page 'standalone' (http://docs.basex.org/wiki/Command-Line_Options#BaseX_Standalone)
basex -h
will cause production of a list of commands, but this is not seen:
$ basex -h BaseX 7.7.2 [Standalone] Try help to get more information.
$ basex -i xmldatabasefile.xml BaseX 7.7.2 [Standalone] Try help to get more information.
help
Try HELP [...] to get info on a specific command.
ADD (TO [path]) [input] Add resource to database. ALTER [DATABASE|USER] [...] Alter database name or user password. CHECK [input] Open or create database. CLOSE Close current database. COPY [name] [newname] Copy database. CREATE [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Create database, index, user, backup or event. CS [query] Run XQuery and set result as new context set. DELETE [path] Delete resources from database. DROP [BACKUP|DATABASE|EVENT|INDEX|USER] [...] Drop database, index, user, backup or event. EXIT Exit application. EXPORT [path] Export database to XML. FIND [keywords] Run a keyword query. FLUSH Flush database. GET [option] Show global option. GRANT [NONE|READ|WRITE|CREATE|ADMIN] (ON [database]) TO [user] Grant user permissions. HELP ([command]) Get help on BaseX commands. INFO ([DATABASE|INDEX|STORAGE]) Show information on current database. INSPECT Perform integrity checks. KILL [name] Kill user sessions. LIST ([name] ([path])) List databases or resources of database. OPEN [name] ([path]) Open database. OPTIMIZE (ALL) Optimize the database. PASSWORD ([password]) Change password. RENAME [path] [newpath] Rename resources in database. REPLACE [path] [input] Replace resources in database. REPO [DELETE|INSTALL|LIST] Install, delete or list packages. RESTORE [name-(date)] Restore database. RETRIEVE [path] Retrieve raw data. RUN [path] Run query or command script. EXECUTE [input] Execute command script. SET [option] ([value]) Set global options. SHOW [BACKUPS|EVENTS|SESSIONS|USERS] Show server information. STORE (TO [path]) [input] Store raw data. XQUERY [query] Run XQuery.
$ basex -h BaseX 7.8 beta [Standalone] Usage: basex [-bcdiLoqsuvVwxz] [input] [input] Execute input file or expression -b<pars> Bind external query variables -c<input> Execute commands from file or string -d Activate debugging mode -i<input> Open initial file or database -L Append newlines to query results -o<output> Write output to file -q<expr> Execute XQuery expression -s<pars> Set serialization parameter(s) -u Write updates back to original files -v/V Show (all) process info -w Preserve whitespaces from input files -x Show query execution plan -z Skip output of results $ cat /tmp/foo.xml <foo> <bar/> </foo> $ basex -i /tmp/foo.xml BaseX 7.8 beta [Standalone] Try help to get more information.
xquery /
<foo> <bar/> </foo> Query executed in 12.79 ms.
exit
Have a nice day.
… what's the problem?
On 19/12/2013, Alexander Holupirek alexander.holupirek@uni-konstanz.de wrote:
$ cat /tmp/foo.xml
<foo> <bar/> </foo> $ basex -i /tmp/foo.xml BaseX 7.8 beta [Standalone] Try help to get more information.
xquery /
<foo> <bar/> </foo> Query executed in 12.79 ms. > exit Have a nice day.
… what's the problem?
xmldatabasefile:
<?xml version="1.0" encoding="utf-8"?> <!-- Edited by XMLSpy®, taken from http://www.w3schools.com--> <?xml-stylesheet type='text/xsl" href="xstylesheetexample.xslt" ?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN" > <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB" > <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB" > <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
$ basex -i xmldatabasefile.xml BaseX 7.7.2 [Standalone] Try help to get more information.
xquery /
Stopped at ., 1/2: [XPDY0002] No context item defined to evaluate 'root()'.
The response is wrong?
On 20.12.2013, at 00:32, e-letter inpost@gmail.com wrote:
On 19/12/2013, Alexander Holupirek alexander.holupirek@uni-konstanz.de wrote:
$ cat /tmp/foo.xml
<foo> <bar/> </foo> $ basex -i /tmp/foo.xml BaseX 7.8 beta [Standalone] Try help to get more information.
xquery /
<foo> <bar/> </foo> Query executed in 12.79 ms. > exit Have a nice day.
… what's the problem?
xmldatabasefile:
<?xml version="1.0" encoding="utf-8"?>
<!-- Edited by XMLSpy®, taken from http://www.w3schools.com-->
<?xml-stylesheet type='text/xsl" href="xstylesheetexample.xslt" ?>
<bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN" > <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB" > <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB" > <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore>
$ basex -i xmldatabasefile.xml BaseX 7.7.2 [Standalone] Try help to get more information.
xquery /
Stopped at ., 1/2: [XPDY0002] No context item defined to evaluate 'root()'.
The response is wrong?
$ basex -h BaseX 7.7.2 [Standalone] Usage: basex [-bcdiLoqsuvVwxz] [input] [input] Execute input file or expression -b<pars> Bind external query variables -c<input> Execute commands from file or string -d Activate debugging mode -i<input> Open initial file or database -L Append newlines to query results -o<output> Write output to file -q<expr> Execute XQuery expression -s<pars> Set serialization parameter(s) -u Write updates back to original files -v/V Show (all) process info -w Preserve whitespaces from input files -x Show query execution plan -z Skip output of results $ cat db.xml <?xml version="1.0" encoding="utf-8"?> <!-- Edited by XMLSpy®, taken from http://www.w3schools.com--> <?xml-stylesheet type='text/xsl" href="xstylesheetexample.xslt" ?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> $ basex -c list name Resources Size Input Path ---------------------------------
0 database(s). $ basex -i db.xml BaseX 7.7.2 [Standalone] Try help to get more information.
xquery /
<!-- Edited by XMLSpy®, taken from http://www.w3schools.com--> <?xml-stylesheet type='text/xsl" href="xstylesheetexample.xslt" ?> <bookstore> <book category="COOKING"> <title lang="en">Everyday Italian</title> <author>Giada De Laurentiis</author> <year>2005</year> <price>30.00</price> </book> <book category="CHILDREN"> <title lang="en">Harry Potter</title> <author>J K. Rowling</author> <year>2005</year> <price>29.99</price> </book> <book category="WEB"> <title lang="en">XQuery Kick Start</title> <author>James McGovern</author> <author>Per Bothner</author> <author>Kurt Cagle</author> <author>James Linn</author> <author>Vaidyanathan Nagarajan</author> <year>2003</year> <price>49.99</price> </book> <book category="WEB"> <title lang="en">Learning XML</title> <author>Erik T. Ray</author> <year>2003</year> <price>39.95</price> </book> </bookstore> Query executed in 39.32 ms.
exit
See you. $
Made symbolic link in '/usr/local/bin/ to basexhttp ('/usr/local/basex/basex/bin/basexhttp')
As normal user:
$ basexhttp Saving properties in "/usr/local/basex/basex/.basex"... /usr/local/basex/basex/.basex could not be written. java.io.FileNotFoundException: /usr/local/basex/basex/data/.logs/2013-12-19.log (No such file or directory) at java.io.FileOutputStream.openAppend(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:207) at org.basex.server.Log.write(Log.java:92) at org.basex.server.Log.writeServer(Log.java:68) at org.basex.BaseXServer.<init>(BaseXServer.java:113) at org.basex.http.HTTPContext.init(HTTPContext.java:365) at org.basex.http.BaseXServlet.init(BaseXServlet.java:34) at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:534) at org.eclipse.jetty.servlet.ServletHolder.doStart(ServletHolder.java:346) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:742) at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1252) at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:710) at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:494) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) at org.eclipse.jetty.server.Server.doStart(Server.java:282) at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) at org.basex.BaseXHTTP.<init>(BaseXHTTP.java:118) at org.basex.BaseXHTTP.main(BaseXHTTP.java:48)
Looks like permissions are the problem; the software is not designed to install in a system directory and run using user home directory?
On 19/12/2013, e-letter inpost@gmail.com wrote:
On 19/12/2013, basex-talk-request@mailman.uni-konstanz.de basex-talk-request@mailman.uni-konstanz.de wrote:
Today's Topics:
- Re: initial installation observation (Christian Gr?n)
Message: 4 Date: Thu, 19 Dec 2013 12:29:06 +0100 Subject: Re: [basex-talk] initial installation observation
You can optionally check out the following Wiki article to see what other startup options may be helpful:
Starting the command terminal fails:
$ basex BaseX 7.7.2 [Standalone] Try help to get more information.
OPEN xmldatabasefile.xml
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
OPEN xmldatabasefile.xml, /path/to/file
Stopped at ., 1/21: Syntax: OPEN [name] ([path]) Open database.
Opens the database [name], filtered by [path].
How to open the database file, please?
basex zip archive was unpacked into a normal user account.
Using the bin directory, the basexhttp server starts normally, as described in the documentation.
The error shown above still occurs, when using 'bin/basex' executable.
Hi e-letter,
maybe the docs come in handy:
The OPEN command opens a database, which probably unlucky for some ;-), is not a file in your file-system: "In BaseX, a database is a pretty light-weight concept and can be compared to a collection. It contains an arbitrary number of resources, addressed by their unique database path. Resources can either be XML documents or raw files (binaries). Some information on binary data can be found on an extra page."
I can once again invite you to work through our documentation http://docs.basex.org/wiki/Getting_Started and some basic XQuery stuff: http://en.wikibooks.org/wiki/XQuery In addition I'd suggest you start exploring XQuery within the BaseXGUI first, most people find it a lot easier to handle in the beginning.
Best Michael
P.S. A personal remark: Please don’t get me wrong: it is okay to ask questions, even ones that have (seemingly) trivial answers. Yet: you are a lot more likely to get helpful answers if you leave the impression you at least tried to thoroughly read and make use of the information provided.
basex-talk@mailman.uni-konstanz.de