From lukaskircher1 at googlemail.com Thu Apr 1 13:17:33 2010 From: lukaskircher1 at googlemail.com (Lukas) Date: Thu, 1 Apr 2010 13:17:33 +0200 Subject: [basex-talk] Namespace conflict problem In-Reply-To: <26168.2507.8683-7869-582985114-1270038899@post.cz> References: <26168.2507.8683-7869-582985114-1270038899@post.cz> Message-ID: <47E86D6D-3EC7-482A-9D4E-194BCC6F9960@gmail.com> Hi Jiri, we are currently facing a few namespace-related problems, so I just add this to the list. I'll come back to you as soon as I have answers. Thanks for your feedback. Regards, Lukas On Mar 31, 2010, at 2:34 PM, Ji?? Kadlec wrote: > Hi all, > > Could you help with following error [XUDY0024] New namespaces > conflict with each other. > > I create database in basex GUI from following XML file: > > > aaa > bbb > ccc > > > Then I try to execute following statement > > declare namespace my="http://www.somedomain.com"; > insert node attribute my:addedAttribute {"1"} into /root/ > subroot[@my:index=1] > > Am i doing something wrong, how should i write a query which will > add add my:addedAttribute {"1"} into subroot element with > my:index="1". > > Any help appreciated > > Jiri > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk From jir.kadlec at post.cz Thu Apr 1 14:27:34 2010 From: jir.kadlec at post.cz (=?iso-8859-2?Q?Ji=F8=ED=20Kadlec?=) Date: Thu, 01 Apr 2010 14:27:34 +0200 (CEST) Subject: [basex-talk] Leave whitespaces in XML when loading XML file with new CreateDB In-Reply-To: <7DFA3101-64DB-459B-A092-1D768F177FF2@uni-konstanz.de> Message-ID: <26215.2507.8683-15642-1575456786-1270124854@post.cz> Thanks Michael It works well. May I ask one more question. Is it possible to preserve doctype declaration in same way. For e.g I have documet which looks like this one: Subjects available in Mechanical Engineering. 2.303 ... and when I export the document I loose information about DOCTYPE and connection to DTD, is there any way how to do this. Thank you very much Jiri > ------------ P?vodn? zpr?va ------------ > Od: Michael Seiferle > P?edm?t: Re: [basex-talk] Leave whitespaces in XML when loading XML file with > new CreateDB > Datum: 31.3.2010 18:02:29 > ---------------------------------------- > Hi Jiri, > > you may set the properties for the given Context by simply calling: > > // set CHOP to false > > CONTEXT.prop.set("CHOP",false); > If you are looking at the Example at [1] & [2]: > http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample > You would want to put the Prop change right before calling the CreateDB > statement. > > Hope this works out for you, don't hesitate to ask for more :-). > > Kind Regards > Michael > > [1] http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample > > [2] You may check your DB either via console, by > open and then > info > or in the GUI with help of the OPEN Dialog > > Am 31.03.2010 um 16:38 schrieb Ji?? Kadlec: > > > Hi Guys, > > > > How can I preserve whitespaces in XML document, when i'm using new > CreateDB(..) object for creating new database from Java code. When I export data > with new Export(..) I get document with choped whitespaces. I found out, that > there is a possibility to preserve whitespaces when I create DB from BaseX gui. > There is a possibility to uncheck option chop whitespaces which gives me > required result. Is there any way how to do this from Java. > > > > Thank you > > > > Jiri > > _______________________________________________ > > BaseX-Talk mailing list > > BaseX-Talk at mailman.uni-konstanz.de > > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > > > From michael.seiferle at uni-konstanz.de Thu Apr 1 18:22:47 2010 From: michael.seiferle at uni-konstanz.de (Michael Seiferle) Date: Thu, 1 Apr 2010 18:22:47 +0200 Subject: [basex-talk] Leave whitespaces in XML when loading XML file with new CreateDB In-Reply-To: <26215.2507.8683-15642-1575456786-1270124854@post.cz> References: <26215.2507.8683-15642-1575456786-1270124854@post.cz> Message-ID: <7091532F-6849-4FD7-9EE6-993D3C8F5F76@uni-konstanz.de> Dear Jiri, after a quick look at the code I have to confirm that the doctype is not preserved by the parser. As Christian wrote it I am sure he will provide us with further information on this. As a quick and rather dirty fix you might rewrite the Doctype declaration as a processing instruction > and take care of that prior to importing / after exporting. Sorry for not having a more convenient solution at the moment, we'll keep you updated. Kind regards Michael Am 01.04.2010 um 14:27 schrieb Ji?? Kadlec: > Thanks Michael > > It works well. May I ask one more question. Is it possible to preserve doctype declaration in same way. For e.g I have documet which looks like this one: > > > > > > > > > Subjects available in Mechanical Engineering. > 2.303 > ... > > > and when I export the document I loose information about DOCTYPE and connection to DTD, is there any way how to do this. > > Thank you very much > > Jiri > >> ------------ P?vodn? zpr?va ------------ >> Od: Michael Seiferle >> P?edm?t: Re: [basex-talk] Leave whitespaces in XML when loading XML file with >> new CreateDB >> Datum: 31.3.2010 18:02:29 >> ---------------------------------------- >> Hi Jiri, >> >> you may set the properties for the given Context by simply calling: >>> // set CHOP to false >>> CONTEXT.prop.set("CHOP",false); >> If you are looking at the Example at [1] & [2]: >> http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample >> You would want to put the Prop change right before calling the CreateDB >> statement. >> >> Hope this works out for you, don't hesitate to ask for more :-). >> >> Kind Regards >> Michael >> >> [1] http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample >> >> [2] You may check your DB either via console, by >> open and then >> info >> or in the GUI with help of the OPEN Dialog >> >> Am 31.03.2010 um 16:38 schrieb Ji?? Kadlec: >> >>> Hi Guys, >>> >>> How can I preserve whitespaces in XML document, when i'm using new >> CreateDB(..) object for creating new database from Java code. When I export data >> with new Export(..) I get document with choped whitespaces. I found out, that >> there is a possibility to preserve whitespaces when I create DB from BaseX gui. >> There is a possibility to uncheck option chop whitespaces which gives me >> required result. Is there any way how to do this from Java. >>> >>> Thank you >>> >>> Jiri >>> _______________________________________________ >>> BaseX-Talk mailing list >>> BaseX-Talk at mailman.uni-konstanz.de >>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> >> >> From yasmeenzabash at yahoo.com Fri Apr 2 12:45:07 2010 From: yasmeenzabash at yahoo.com (yasmeenzabash at yahoo.com) Date: Fri, 2 Apr 2010 12:45:07 +0200 (CEST) Subject: [basex-talk] question: how to connect with base Message-ID: <20100402104508.093481CF6F6@ariel02.inf.uni-konstanz.de> Dear Sirs: My name is yasmin and I have a question about how to connect to Basex vis VS2008. I' a student in the Web Sience master and it is a small project for us to deploy one of the natinve XML DB. in a website. so it is quite confusing for me to deal with such DB. it would be agreat help from you to guide me through the steps to find how I can see and connect to BaseX via Visual Stusio 2008. and kindly would you answer my request as soon as possible. best regards. Yasmin Zabash From andreas.weiler at uni-konstanz.de Fri Apr 2 12:50:26 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Fri, 02 Apr 2010 12:50:26 +0200 Subject: [basex-talk] question: how to connect with base In-Reply-To: <20100402104508.093481CF6F6@ariel02.inf.uni-konstanz.de> References: <20100402104508.093481CF6F6@ariel02.inf.uni-konstanz.de> Message-ID: <4BB5CBF2.6070103@uni-konstanz.de> Dear Yasmin, we currently finished a C# Version which can be launched with Visual Studio. (You can also get the Project or Solution File if needed) You can find it in the repository: https://svn.uni-konstanz.de/dbis/basex/trunk/api/etc/c%23/ If you like to get another programming language, please let us know so we try to get that done. Dont hesitate to ask for more information and assistance, kind regards Andreas (BaseX Team) yasmeenzabash at yahoo.com schrieb: > Dear Sirs: > My name is yasmin and I have a question about how to connect to Basex vis VS2008. > I' a student in the Web Sience master and it is a small project for us to deploy one of the natinve XML DB. in a website. > so it is quite confusing for me to deal with such DB. > it would be agreat help from you to guide me through the steps to find how I can see and connect to BaseX via Visual Stusio 2008. > and kindly would you answer my request as soon as possible. > best regards. > Yasmin Zabash > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From tjwebb at vt.edu Sat Apr 3 19:47:52 2010 From: tjwebb at vt.edu (Travis Webb) Date: Sat, 3 Apr 2010 13:47:52 -0400 Subject: [basex-talk] .basex config file Message-ID: I have another question regarding the .basex config file. How does basex determine the home directory of the current user? by looking at $HOME? I'd like to trick basex into thinking this file is somewhere else, because the hard restriction that this file must reside in the home directory of the current user will not work for our use. -tjw -------------- next part -------------- An HTML attachment was scrubbed... URL: From tjwebb at vt.edu Sun Apr 4 04:44:20 2010 From: tjwebb at vt.edu (Travis Webb) Date: Sat, 3 Apr 2010 22:44:20 -0400 Subject: [basex-talk] xqconnection issue Message-ID: I am having a strange issue using the XQJ libary. Anytime I make a change to the database (inserting / updating a node), subsequent queries perform as if that change was never made. However, if I create a new XQConnection to the database, those changes are reflected. So every time I update the database, I'm having to establish a new connection in order to see my changes. Is this expected behavior? If not, any ideas why this is happening? Thanks -tjw -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.weiler at uni-konstanz.de Sun Apr 4 10:35:10 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Sun, 04 Apr 2010 10:35:10 +0200 Subject: [basex-talk] .basex config file In-Reply-To: References: Message-ID: <4BB84F3E.8020706@uni-konstanz.de> Dear Travis, you can change the path of the databases in the .basex file in the entry DBPATH = .... Another way is to change the path of the databases in the GUI, at Options -> Preferences -> Database Path. Kind regards, Andreas (BaseX Team) Travis Webb schrieb: > I have another question regarding the .basex config file. How does > basex determine the home directory of the current user? by looking at > $HOME? I'd like to trick basex into thinking this file is somewhere > else, because the hard restriction that this file must reside in the > home directory of the current user will not work for our use. > > -tjw > ------------------------------------------------------------------------ > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From andreas.weiler at uni-konstanz.de Sun Apr 4 10:39:14 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Sun, 04 Apr 2010 10:39:14 +0200 Subject: [basex-talk] .basex config file In-Reply-To: <4BB84F3E.8020706@uni-konstanz.de> References: <4BB84F3E.8020706@uni-konstanz.de> Message-ID: <4BB85032.8030406@uni-konstanz.de> Dear Travis, if you want to change the location of the .basex file, you can do that in the source in org.basex.core.Prop.java. Here you can set the HOME String to a different location. Kind regards, Andreas (BaseX Team) Andreas Weiler schrieb: > Dear Travis, > > you can change the path of the databases in the .basex file in the > entry DBPATH = .... > Another way is to change the path of the databases in the GUI, at > Options -> Preferences -> Database Path. > > Kind regards, > Andreas (BaseX Team) > > Travis Webb schrieb: >> I have another question regarding the .basex config file. How does >> basex determine the home directory of the current user? by looking at >> $HOME? I'd like to trick basex into thinking this file is somewhere >> else, because the hard restriction that this file must reside in the >> home directory of the current user will not work for our use. >> >> -tjw >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk From andreas.weiler at uni-konstanz.de Sun Apr 4 10:51:36 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Sun, 04 Apr 2010 10:51:36 +0200 Subject: [basex-talk] xqconnection issue In-Reply-To: References: Message-ID: <4BB85318.7000804@uni-konstanz.de> Dear Travis, for a quick solution you could use our own code APIs. We try to keep the XQJ API bug free and we will search for the problem soon. Kind regards, Andreas (BaseX Team) Travis Webb schrieb: > I am having a strange issue using the XQJ libary. Anytime I make a > change to the database (inserting / updating a node), subsequent > queries perform as if that change was never made. However, if I create > a new XQConnection to the database, those changes are reflected. So > every time I update the database, I'm having to establish a new > connection in order to see my changes. Is this expected behavior? If > not, any ideas why this is happening? > > Thanks > -tjw > ------------------------------------------------------------------------ > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From christian.gruen at gmail.com Mon Apr 5 12:16:19 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 5 Apr 2010 13:16:19 +0300 Subject: [basex-talk] Bug: baseX can't create XMLDB with non utf-8 xml String In-Reply-To: <0F019579-CC3A-42A2-88C2-3CAEDD399BD3@uni-konstanz.de> References: <20100331043826.C21B81CF8D9@ariel02.inf.uni-konstanz.de> <0F019579-CC3A-42A2-88C2-3CAEDD399BD3@uni-konstanz.de> Message-ID: Dear Ruby, thanks for your thoughts on the BaseX sources. As Michael correctly pointed out, Strings in Java are always encoded in UTF-16. If the IO.get() receives an input string with a dubious encoding, something must have gone wrong before that method was called. Hope this helps; if not, feel free to dig deeper. Christian ___________________________ On Wed, Mar 31, 2010 at 7:06 PM, Michael Seiferle wrote: > Hi Ruby, > > thank you for your feedback. > I guess this is by design, as Java internally treats Strings as Unicode. Perhaps Christian has some thoughts on this. > > You may overcome this easily by reading in a file (w.r.t. the encoding) or converting your (XML-)String to Unicode beforehand. > You might as well check out the latest BaseX release (6.0) or the sources via http://www.inf.uni-konstanz.de/dbis/basex/community > as I saw you were using 5.7. > > Kind regards > Michael > > -- (-: ------------------ > P.S. Ruby sorry for the double reply, I forgot to CC the list. > > Am 31.03.2010 um 06:38 schrieb l0979365428 at gmail.com: > >> Dear baseX creater: >> >> If it is xml file ,it 's ok. >> If it is xml String, BaseX only receives utf-8 encoding of XML. >> The reasion is : >> //---------------------------------------------------// >> public static IO get(final String s) { >> ? ?if(s == null) return new IOFile(""); >> ? ?if(s.startsWith("<")) return newIOContent(Token.token(s)); >> ? ?if(s.startsWith("http://")) return new IOUrl(s); >> ? ?return new IOFile(s); >> //---------------------------------------------------------// >> public static byte[] token(final String s) { >> ? ?final int l = s.length(); >> ? ?if(l == 0) return EMPTY; >> ? ?final byte[] bytes = new byte[l]; >> ? ?for(int i = 0; i < l; i++) { >> ? ? ?final char c = s.charAt(i); >> ? ? ?if(c > 0x7F) return utf8(s); >> ? ? ?bytes[i] = (byte) c; >> ? ?} >> ? ?return bytes; >> //-----------------------------------------------// >> Doesn't parse with the head of XML file. But this programe create xml struts with Sax which pares the xml with the head info. For this reason?it'll make mistakes once the XML String is not UTF-8. >> >> I fix it : >> if(s.startsWith("<")) return new IOContent(Token.encoding(s)); >> //----------------------------------------------// >> public static byte[] encoding(final String s) { >> ? ? ? ? final int l = s.length(); >> ? ? ? ? ? if(l == 0) return EMPTY; >> ? ? ? ? int i=0; >> ? ? ? ? int j =0; >> ? ? ? ? StringBuilder ss=new StringBuilder(); >> ? ? ? ? char hope[]=new char[]{'c','=','"','"'}; >> ? ? ? ? while (true) >> ? ? ? ? { >> ? ? ? ? ? ? ? ? final char c = s.charAt(i); >> >> ? ? ? ? ? ? ? ? if(hope[j]==c) j++; >> ? ? ? ? ? ? ? ? if(j==4) break; >> ? ? ? ? ? ? ? ? ? ? ? ? if(j>2&&c!=hope[j-1]) >> ? ? ? ? ? ? ? ? ? ? ? ? { >> ? ? ? ? ? ? ? ? ss.append(c); >> ? ? ? ? ? ? ? ? ? ? ? ? } >> >> ? ? ? ? ? ? ? ? i++; >> ? ? ? ? } >> >> ? ?final byte[] bytes = new byte[l]; >> ? ?for(int k = 0; k < l; k++) { >> ? ? ?final char c = s.charAt(k); >> ? ? ?if(c > 0x7F) return others(s,ss.toString()); >> ? ? ?bytes[k] = (byte) c; >> ? ?} >> ? ?return bytes; >> ?} >> //-----------------------------------------------// >> >> I wonder if you could fix this bug in the next version. >> Also BaseX doesn't support the String of xml with namespace build DB. And I have no idea. >> PS: ? BaseX57,Jdk1.5 >> >> >> best wishes >> Ruby >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From christian.gruen at gmail.com Mon Apr 5 12:41:38 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 5 Apr 2010 13:41:38 +0300 Subject: [basex-talk] Leave whitespaces in XML when loading XML file with new CreateDB In-Reply-To: <7091532F-6849-4FD7-9EE6-993D3C8F5F76@uni-konstanz.de> References: <26215.2507.8683-15642-1575456786-1270124854@post.cz> <7091532F-6849-4FD7-9EE6-993D3C8F5F76@uni-konstanz.de> Message-ID: Ji??, you can set serialization parameters to include doctypes in the query output: $ basex -s doctype-system=subjects.dtd -q " or, using BaseX commands: > set serializer doctype-system=subjects.dtd > xquery The serialization features have been added after the official release; please compile the sources, or run the latest Maven build: http://www.inf.uni-konstanz.de/dbis/basex/maven/org/basex/basex/6.0.6/ The official docs on serializing XSLT and XQuery can be found at: http://www.w3.org/TR/xslt-xquery-serialization/ Christian 2010/4/1 Michael Seiferle : > Dear Jiri, > > after a quick look at the code I have to confirm that the doctype is not preserved by the parser. > As Christian wrote it I am sure he will provide us with further information on this. > > As a quick and rather dirty fix you might rewrite the Doctype declaration as a processing instruction >> > and take care of that prior to importing / after exporting. > Sorry for not having a more convenient solution at the moment, we'll keep you updated. > > Kind regards > Michael > > > Am 01.04.2010 um 14:27 schrieb Ji?? Kadlec: > >> Thanks Michael >> >> It works well. May I ask one more question. Is it possible to preserve doctype declaration in same way. For e.g I have documet which looks like this one: >> >> >> >> >> >> >> >> >> ?Subjects available in Mechanical Engineering. >> ?2.303 >> ... >> >> >> and when I export the document I loose information about DOCTYPE and connection to DTD, is there any way how to do this. >> >> Thank you very much >> >> Jiri >> >>> ------------ P?vodn? zpr?va ------------ >>> Od: Michael Seiferle >>> P?edm?t: Re: [basex-talk] Leave whitespaces in XML when loading XML file with >>> new CreateDB >>> Datum: 31.3.2010 18:02:29 >>> ---------------------------------------- >>> Hi Jiri, >>> >>> you may set the properties for the given Context by simply calling: >>>> ? ?// set CHOP to false >>>> ? ?CONTEXT.prop.set("CHOP",false); >>> If you are looking at the Example at [1] & [2]: >>> http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample >>> You would want to put the Prop change right before calling the CreateDB >>> statement. >>> >>> Hope this works out for you, don't hesitate to ask for more :-). >>> >>> Kind Regards >>> Michael >>> >>> [1] ?http://www.inf.uni-konstanz.de/dbis/basex/code.php?code=DatabaseExample >>> >>> [2] ?You may check your DB either via console, by >>> ? ? ?open and then >>> ? ? ?info >>> ? ? ?or in the GUI with help of the OPEN Dialog >>> >>> Am 31.03.2010 um 16:38 schrieb Ji?? Kadlec: >>> >>>> Hi Guys, >>>> >>>> How can I preserve whitespaces in XML document, when i'm using new >>> CreateDB(..) object for creating new database from Java code. When I export data >>> with new Export(..) I get document with choped whitespaces. I found out, that >>> there is a possibility to preserve whitespaces when I create DB from BaseX gui. >>> There is a possibility to uncheck option chop whitespaces which gives me >>> required result. Is there any way how to do this from Java. >>>> >>>> Thank you >>>> >>>> Jiri >>>> _______________________________________________ >>>> BaseX-Talk mailing list >>>> BaseX-Talk at mailman.uni-konstanz.de >>>> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >>> >>> >>> >>> > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From christian.gruen at gmail.com Mon Apr 5 12:43:56 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 5 Apr 2010 13:43:56 +0300 Subject: [basex-talk] xqconnection issue In-Reply-To: <4BB85318.7000804@uni-konstanz.de> References: <4BB85318.7000804@uni-konstanz.de> Message-ID: Travis, to speed up things, please send as some example code that demonstrates your observations. Christian On Sun, Apr 4, 2010 at 11:51 AM, Andreas Weiler wrote: > Dear Travis, > > for a quick solution you could use our own code APIs. > We try to keep the XQJ API bug free and we will search for the problem soon. > > Kind regards, > Andreas (BaseX Team) > > Travis Webb schrieb: >> >> I am having a strange issue using the XQJ libary. Anytime I make a change >> to the database (inserting / updating a node), subsequent queries perform as >> if that change was never made. However, if I create a new XQConnection to >> the database, those changes are reflected. So every time I update the >> database, I'm having to establish a new connection in order to see my >> changes. Is this expected behavior? If not, any ideas why this is happening? >> >> Thanks >> -tjw ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From christian.gruen at gmail.com Wed Apr 7 00:25:57 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Wed, 7 Apr 2010 01:25:57 +0300 Subject: [basex-talk] basex xquery optimization not using attribute index on "joins"? In-Reply-To: References: <1954.58.175.120.154.1269653290.squirrel@webmail.unimelb.edu.au> <1413.58.175.120.154.1269729820.squirrel@webmail.unimelb.edu.au> Message-ID: Sandra, I'm glad to tell you that we have put some additional work into our query optimizer. Your query, which was using as index terms, should now be recognized by the compiler and evaluated by the index. You are welcome to check out the latest sources from our repository (note that the current code is still at a beta stage, so any feedback is more than welcome). Hope this helps, Christian ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen On Sun, Mar 28, 2010 at 5:30 AM, Christian Gr?n wrote: > Sandra, > > yes, it feels necessary to put some additional work in the optimizer > to support queries like the one you detailed. In a nutshell, we'll > think about a generic way to rewrite the index methods to also support > arguments other than strings and atomic values (...such as variables, > or item sequences). While some optimizations look quite obvious on > paper, it has turned out in the past that they mean a lot of work in > the final compilation steps, as XQuery is much more flexible than e.g. > SQL, or strictly typed lanaguges. Still? be sure your concerns are not > in vain. > > Feedback is always welcome, > Christian > > > On Sat, Mar 27, 2010 at 11:43 PM, Sandra Maria Silcot > wrote: >> Christian, >> >> Your suggestion to add "let $person := //person" does speed things up >> considerably, down from a minute to about 10 seconds. I understand the >> reasons for your optimization logic. For example, when I tried to halve >> the no. of //person elements scanned, limiting it to males: >> >> let $person := //person[@sex="M"] >> >> the overhead of that check slightly increased the time needed! >> >> However, is a large xml database and wanting to "join" documents using >> what are in effect unique keys such a "special case"? I am wondering if a >> different decision could be applied by the optimiser, fairly simply, based >> on db size (say the target indexed attribute or element occurs > 10,000 >> times)? >> >> I would also suggest that a useful (necessary?) optimisation enhancement >> is that indexes should always be used when xml:id / xml:idref attributes >> are involved, because these must always represent unique identifiers for >> well formed xml. I modified my query slightly to try and target elements >> on their xml:id ... >> >> let $person:= //sources/* >> ?for $rs in //rs[@corresp="om22451"]/../..//rs >> ?let $keyval := data($rs/@corresp) >> ?return $person[@xml:id=$keyval] >> >> And got the same time, about 10 seconds. FYI, here is the query info result: >> >> Result: let $person := root()/descendant::*:sources/* for $rs in >> IndexAccess(ATV,"om22451")/self::*:corresp/parent::*:rs/../../descendant::*:rs >> let $keyval := data($rs/@*:corresp) return $person[@xml:id = $keyval] >> >> I concede that in 4-6 years, Moores law will get this query down to 2-3 >> seconds, but in that time, the database may will have grown similarly! >> Btw, running BaseX6.jar on a 1.8MHz Core2Duo 2.5gb ram, assigning the JVM >> 1024M, just an average kind of machine, but not too far short of our >> server's cpu speed. >> >> Thanks for your reply. I have one other semi-related question regards how >> to address the separate documents in the db, but I'll post separately on >> that. >> >> Many thanks again. >> >> Sandra. >> >>> Sandra, >>> >>> thanks for your comprehensive analysis. It's true, the BaseX query >> compiler optimises only static equality comparisons. If a dynamic >> variable is embedded in a predicate, we would have to decide in >>> runtime if we want to apply the index, or not. The main reason why we >> don't use runtime optimisations here is that there are many cases in which >> sequential executions turn out to be faster (e.g. if the path to a >> predicate is cheap), and it's difficult to decide which variant will yield >> faster results. In your special case, however, it would seem quite obvious >> that the index would be preferable. >>> >>> Apart from that, you may try to speed up your given query by putting the >> //person into a variable: >>> >>> ?let $person := //person >>> ?for $rs in //rs[@corresp="c31a31061000"]/../..//rs >>> ?let $keyval := data($rs/@corresp) >>> ?return $person[@key=$keyval] >>> >>> By the way, the use of the eval() method is an interesting >>> (implementation specific) option which didn't come to my mind before? >>> >>> Feel free to ask for more, >>> Christian >>> >>> >>> >>> On Sat, Mar 27, 2010 at 2:28 AM, Sandra Maria Silcot >>> wrote: >>>> Hi all, >>>> First, thanks to the developers for a great piece of software. >>>> I am having difficulty getting an xquery on a large database to run >> using >>>> indexed attributes when a "join" idiom is used. I have a large basex >> database, with multiple documents. One of those contains elements as >>>> shown below, where the @corresp attribute contains values which are >> identical to the @key attribute on elements, which live in >> multiple separate files: >>>> >>>> Corper, Jno (Pn:1000C)... >>>> Corper, John (Pn:1000C)... >>>> Corper, Jno (Pn:1000CC)... >>>> >>>> I know indexes have been built as xpaths like this are lightening >> quick: >>>> //person[@key="c23a2866"] >>>> or >>>> //rs[@corresp="dlm18192024"] >>>> But when I do this, it is glacial (nearly 1 minute): >>>> EG(A) >>>> for $rs in //rs[@corresp="c31a31061000"]/../..//rs >>>> let $keyval := data($rs/@corresp) >>>> return //person[@key=$keyval] >>>> I am using BaseX6.jar on XP. When I look at the query plan, the ONLY >> time >>>> the attribute index used is on the //rs[@corresp="c31a31061000"] part. >> I can get it to run fast and return the 3 matched elements using >>>> the attribute index using basex:eval, like this: >>>> EG(B) >>>> for $rs in data(//rs[@corresp="c31a31061000"]/../..//rs/@corresp) let >> $s := concat("//person[@key='",$rs,"']") >>>> return basex:eval($s) >>>> So rather than execute this query asa "join" -- a manner which seem >> widespread in the xquery world -- I must manually build and execute each >>>> //person[@key='string'] request "manually" to get basex to use its >> attribute index. Whilst this works, it seems a rather strange idiom to >> have to employ, and locks my queries into basex. >>>> Is the behaviour of EG(A) by design, or is it a bug that the query >> optimizer is failing to recognise it can use the attribute index on the >> //person[@key=$keyval] part? >>>> Any guidance much appreciated. >>>> Best wishes to all, >>>> Sandra. > > ___________________________ > > Christian Gruen > Universitaet Konstanz > Department of Computer & Information Science > D-78457 Konstanz, Germany > Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 > http://www.inf.uni-konstanz.de/~gruen > From tsuxia at gmail.com Wed Apr 7 08:39:35 2010 From: tsuxia at gmail.com (=?GB2312?B?x/zPxA==?=) Date: Wed, 7 Apr 2010 14:39:35 +0800 Subject: [basex-talk] How can I connected to the server usering XQJ Message-ID: Hi, I am a freshman here using BaseX6. I want to use XQJ API to connect with the BaseX Server, I tried many kinds of properties, but it does not work, did anyone try it before? thanks a lot.. -- Xia Qu Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences Beijing, 100190, China Email (work):quxia08 at otcaix.iscas.ac.cn Email (personal): tsuxia at gmail.com Mobile:(86) 1300-1010-069 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.weiler at uni-konstanz.de Wed Apr 7 08:49:52 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Wed, 07 Apr 2010 08:49:52 +0200 Subject: [basex-talk] How can I connected to the server usering XQJ In-Reply-To: References: Message-ID: <4BBC2B10.4050406@uni-konstanz.de> Dear Xia Qu, the XQJ API is not ready to connect to the BaseXServer yet. Perhaps it will be developed in future. You can use our own APIs to connect to the server like in the server examples on this page: http://www.inf.uni-konstanz.de/dbis/basex/sources.php Kind regards, Andreas (BaseX Team) ?? schrieb: > Hi, I am a freshman here using BaseX6. > > I want to use XQJ API to connect with the BaseX Server, I tried many > kinds of properties, but it does not work, did anyone try it before? > > thanks a lot.. > > -- > Xia Qu > Technology Center of Software Engineering, > Institute of Software, > Chinese Academy of Sciences > Beijing, 100190, China > Email (work):quxia08 at otcaix.iscas.ac.cn > > Email (personal): tsuxia at gmail.com > Mobile:(86) 1300-1010-069 > ------------------------------------------------------------------------ > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From tsuxia at gmail.com Wed Apr 7 08:54:18 2010 From: tsuxia at gmail.com (=?GB2312?B?x/zPxA==?=) Date: Wed, 7 Apr 2010 14:54:18 +0800 Subject: [basex-talk] How can I connected to the server usering XQJ In-Reply-To: <4BBC2B10.4050406@uni-konstanz.de> References: <4BBC2B10.4050406@uni-konstanz.de> Message-ID: That's a really quick response. it does help a lot, thanks~ 2010/4/7 Andreas Weiler > Dear Xia Qu, > > the XQJ API is not ready to connect to the BaseXServer yet. Perhaps it will > be developed in future. > You can use our own APIs to connect to the server like in the server > examples on this page: > http://www.inf.uni-konstanz.de/dbis/basex/sources.php > > Kind regards, > Andreas (BaseX Team) > > ?? schrieb: > >> Hi, I am a freshman here using BaseX6. >> >> I want to use XQJ API to connect with the BaseX Server, I tried many >> kinds of properties, but it does not work, did anyone try it before? >> >> thanks a lot.. >> >> -- >> Xia Qu >> Technology Center of Software Engineering, >> Institute of Software, >> Chinese Academy of Sciences >> Beijing, 100190, China >> Email (work):quxia08 at otcaix.iscas.ac.cn > quxia08 at otcaix.iscas.ac.cn> >> Email (personal): tsuxia at gmail.com >> >> Mobile:(86) 1300-1010-069 >> ------------------------------------------------------------------------ >> >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> >> > > -- Xia Qu Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences Beijing, 100190, China Email (work):quxia08 at otcaix.iscas.ac.cn Email (personal): tsuxia at gmail.com Mobile:(86) 1300-1010-069 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tsuxia at gmail.com Thu Apr 8 10:33:35 2010 From: tsuxia at gmail.com (Qu Xia) Date: Thu, 8 Apr 2010 16:33:35 +0800 Subject: [basex-talk] Question for XQJ to update Message-ID: I made a simple XML called order.xml like this: -------------order.xml-------------- cola 3.0 Number 1 coffee 5.0 Number 2 -------------------------------------------- Now I want to update the price of the coffee to 6.0 with XQJ, so I got the following code: String driverName = "org.basex.api.xqj.BXQDataSource"; Class driverClass = Class.forName(driverName); XQDataSource dataSource = (XQDataSource)driverClass.newInstance(); XQConnection xqc = dataSource.getConnection(); String updateString = "declare variable $node := doc('etc/xml/orders.xml')//order[name='coffee']; "+ "replace value of node $node/price with '5.0', " + "return " + "put(doc('etc/xml/orders.xml'), 'orders.xml')"; XQExpression xqu = xqc.createExpression(); xqu.executeQuery(updateString); xqu.close(); unfortunately, it throws an exception. I tried many different ways and fails all the time. could any tell me the right "updateString"? thanks a lot. -- Xia Qu Technology Center of Software Engineering, Institute of Software, Chinese Academy of Sciences Beijing, 100190, China Email (work):quxia08 at otcaix.iscas.ac.cn Email (personal): tsuxia at gmail.com Mobile:(86) 1300-1010-069 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.weiler at uni-konstanz.de Thu Apr 8 11:04:45 2010 From: andreas.weiler at uni-konstanz.de (Andreas Weiler) Date: Thu, 08 Apr 2010 11:04:45 +0200 Subject: [basex-talk] Question for XQJ to update In-Reply-To: References: Message-ID: <4BBD9C2D.9090803@uni-konstanz.de> Dear Qu Xia, i just checked your query and the problem was at the put function. I have rewritten it like this: put (copy $doc := doc('orders.xml') modify replace value of node $doc//order[name='coffee']/price with '5.0' return $doc, 'orders.xml') Maybe there are other solutions but this worked for me. Kind regards, Andreas Qu Xia schrieb: > I made a simple XML called order.xml like this: > -------------order.xml-------------- > > > cola > 3.0 > Number 1 > > > coffee > 5.0 > Number 2 > > > -------------------------------------------- > > Now I want to update the price of the coffee to 6.0 with XQJ, so I got > the following code: > > String driverName = "org.basex.api.xqj.BXQDataSource"; > Class driverClass = Class.forName(driverName); > XQDataSource dataSource = (XQDataSource)driverClass.newInstance(); > XQConnection xqc = dataSource.getConnection(); > > String updateString = "declare variable $node := > doc('etc/xml/orders.xml')//order[name='coffee']; "+ > "replace value of node $node/price with '5.0', " + > "return " + > "put(doc('etc/xml/orders.xml'), 'orders.xml')"; > XQExpression xqu = xqc.createExpression(); > xqu.executeQuery(updateString); > xqu.close(); > > unfortunately, it throws an exception. I tried many different ways and > fails all the time. could any tell me the right "updateString"? > > thanks a lot. > > -- > Xia Qu > Technology Center of Software Engineering, > Institute of Software, > Chinese Academy of Sciences > Beijing, 100190, China > Email (work):quxia08 at otcaix.iscas.ac.cn > > Email (personal): tsuxia at gmail.com > Mobile:(86) 1300-1010-069 > ------------------------------------------------------------------------ > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From dglick at dracorp.com Fri Apr 9 00:08:10 2010 From: dglick at dracorp.com (Dave Glick) Date: Thu, 8 Apr 2010 15:08:10 -0700 Subject: [basex-talk] Possible Bug When Descending After a Predicate In-Reply-To: References: <26215.2507.8683-15642-1575456786-1270124854@post.cz> <7091532F-6849-4FD7-9EE6-993D3C8F5F76@uni-konstanz.de> Message-ID: Hello, I think I've found a possible bug. I've attached a source XML file. The following query returns 36 results in the most recent BaseX version (updated today and built from source): /Region/Sections/Section[./V[@id='Section_ID']='"Maritime Environment Regions"']//RegionList/Region However, I think it should be returning 10 results (and indeed it does in previous versions of BaseX as well as Saxon). The interesting part is that it does return a single result (as expected) for the first part of the query: /Region/Sections/Section[./V[@id='Section_ID']='"Maritime Environment Regions"'] ...so it appears as though the last part of the query (//RegionList/Region) is descending from the root and not from the single node returned in the first part as I would expect. Is this a bug in BaseX or a misunderstanding on my part of some subtlety of the standard? Thanks, Dave -------------- next part -------------- A non-text attachment was scrubbed... Name: Region.xml Type: application/xml Size: 84670 bytes Desc: Region.xml URL: From christian.gruen at gmail.com Sat Apr 10 16:31:22 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Sat, 10 Apr 2010 16:31:22 +0200 Subject: [basex-talk] Possible Bug When Descending After a Predicate In-Reply-To: References: <26215.2507.8683-15642-1575456786-1270124854@post.cz> <7091532F-6849-4FD7-9EE6-993D3C8F5F76@uni-konstanz.de> Message-ID: Hello Dave, thanks again for your helpful report. The obvious bug has been fixed; feel free to check out the latest sources. All the best, Christian On Fri, Apr 9, 2010 at 12:08 AM, Dave Glick wrote: > Hello, > > I think I've found a possible bug. I've attached a source XML file. The following query returns 36 results in the most recent BaseX version (updated today and built from source): > > /Region/Sections/Section[./V[@id='Section_ID']='"Maritime Environment Regions"']//RegionList/Region > > However, I think it should be returning 10 results (and indeed it does in previous versions of BaseX as well as Saxon). The interesting part is that it does return a single result (as expected) for the first part of the query: > > /Region/Sections/Section[./V[@id='Section_ID']='"Maritime Environment Regions"'] > > ...so it appears as though the last part of the query (//RegionList/Region) is descending from the root and not from the single node returned in the first part as I would expect. Is this a bug in BaseX or a misunderstanding on my part of some subtlety of the standard? > > Thanks, > > Dave > > > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > > From ssilcot at unimelb.edu.au Tue Apr 13 12:35:03 2010 From: ssilcot at unimelb.edu.au (Sandra Maria Silcot) Date: Tue, 13 Apr 2010 20:35:03 +1000 (EST) Subject: [basex-talk] how can I get java bindings in basex working? Message-ID: <2899.58.175.120.154.1271154903.squirrel@webmail.unimelb.edu.au> Fellow basex users, First, I can report that the recent optimisation enhancements have solved the performance issue I had reported -- thanks to the basex team. Basex most definitely rocks. Second, I am trying to implement a java binding as described here: http://www.inf.uni-konstanz.de/dbis/basex/xquery Thanks to the recent extra instruction added by the kindly basex developers, I have been able to use maven (2.2.1) on a ubuntu 64bit server to successfully compile basex from source. Excellent. But I am now wanting to do this in a basex xquery: declare namespace sim = "java:smstest.b4asims"; let $sim := sim:b4asims(xs:string("smith"), xs:string("smyth")) where this is a little jar I built around the simmetrics similarity library, like this: jar -cvf smstest.jar smstest/b4asims.class This successfully runs from the command line, under the same user the basex server runs under, like so (with the jar in my $CLASSPATH): BaseX 6.0.8 [Server] Server was started. fas at devfas: ~ $ java smstest.b4asims smith smythe ..str1=smith first=m Soundex score 0.9222222:smith:smythe Levenshtein score 0.6666666:smith:smythe JaroWinkler score 0.8577778:smith:smythe - total [smythe]=2.4466667 == score=2.4466667 bestScore=2.4466667 bestMatch=[smythe] #### bestScore=2.4466667 bestMatch=[smythe] I have tried every possible variation of the namespace definition and invoking the function in basex but it always says; [XPST0017] Unknown function "sim:b4asims(...)" In the pom.xml for basex I have added this: smstest.b4asims b4asims system 1.0 /media/disk2/fasrepo/common-bin/java/smstest.jar and it compiles successfully, and I can then do a mvn 'package', and deploy the jar to my basex home dir, and run it but I simply cannot get the java bindings to work. I also tried alot of variations here, but to no avail. Clearly there is something really basic I am missing? I have tried the examples given on the basex documentation (the Math and file writer egs) and get exactly the same results -- Unknown function. All of my other java stuff on this box seems to work fine. I'm guessing that there is something in maven or eclipse which supplies the magic which I'm missing. I'm just using maven on the server, not eclipse. Any suggestions for a non-java developer would be most gratefully received. Best wishes to all, Sandra. From christian.gruen at gmail.com Tue Apr 13 19:47:57 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Tue, 13 Apr 2010 19:47:57 +0200 Subject: [basex-talk] Next BaseX release Message-ID: Dear all, BaseX 6.1 will be released this weekend. We regard our current source code base to be stable and well-tested. If you think that there are some serious issues to be fixed, please don't hesitate to give us feedback just in time. Next, we would be _very_ thankful if you could give us a short & quick summary (min. one line, max. one paragraph) on your project, company, both industrial and adademic. If we get enough feedback, we will extend basex.org by a reference page, possibly linking to your homepage. Thanks to everyone for supporting the project! Christian ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From jir.kadlec at post.cz Thu Apr 15 11:43:34 2010 From: jir.kadlec at post.cz (=?iso-8859-2?Q?Ji=F8=ED=20Kadlec?=) Date: Thu, 15 Apr 2010 11:43:34 +0200 (CEST) Subject: [basex-talk] Using XML catalogs in BASE-X, right flow of actions for working with !DOCTYPE or !ENTITY declarations Message-ID: <26422.4104.12031-17821-1950557239-1271324614@post.cz> Hi all, Is it possible to use XML catalogs for getting documents referenced in DTD's with BASE-X database? My second question is about right procedure for dealing with DOCTYPE declaration. I'm using BASE-X for modifications in lot of different files. Some of them has DOCTYPE declaration defined and I would like to preserve this definition when I finish changes on the file. Its possible to use export functions with specified properties doctype-system, doctype-public, but is there any way how to get original doctype for me to be able to pass it as export property at the end or this must be specified by user who is modifying the file? I'm having the same issue with declarations of !ENTITY when i finish changes all entities are gone. Any help appreciated Jiri From christian.gruen at gmail.com Thu Apr 15 16:41:43 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Thu, 15 Apr 2010 16:41:43 +0200 Subject: [basex-talk] how can I get java bindings in basex working? In-Reply-To: <2899.58.175.120.154.1271154903.squirrel@webmail.unimelb.edu.au> References: <2899.58.175.120.154.1271154903.squirrel@webmail.unimelb.edu.au> Message-ID: Sandra, thanks for your comments. Just some quick answers back: ? I'm not sure if you were able to run the examples from our homepage (Math/file writer)? ? have you checked if the b4asims class is included in the resulting jar file (by simply opening it as zip file), and if it has the correct path? Hope this helps, Christian On Tue, Apr 13, 2010 at 12:35 PM, Sandra Maria Silcot wrote: > Fellow basex users, > > First, I can report that the recent optimisation enhancements have solved > the performance issue I had reported -- thanks to the basex team. Basex > most definitely rocks. > > Second, I am trying to implement a java binding as described here: > > http://www.inf.uni-konstanz.de/dbis/basex/xquery > > Thanks to the recent extra instruction added by the kindly basex > developers, I have been able to use maven (2.2.1) on a ubuntu 64bit server > to successfully compile basex from source. Excellent. > > But I am now wanting to do this in a basex xquery: > > declare namespace sim = "java:smstest.b4asims"; > let $sim := sim:b4asims(xs:string("smith"), xs:string("smyth")) > > where this is a little jar I built around the simmetrics similarity > library, like this: > > jar -cvf smstest.jar smstest/b4asims.class > > This successfully runs from the command line, under the same user the > basex server runs under, like so (with the jar in my $CLASSPATH): > > BaseX 6.0.8 [Server] > Server was started. > fas at devfas: ~ $ java smstest.b4asims smith smythe > ..str1=smith first=m > Soundex score 0.9222222:smith:smythe > Levenshtein score 0.6666666:smith:smythe > JaroWinkler score 0.8577778:smith:smythe > - total [smythe]=2.4466667 > == score=2.4466667 bestScore=2.4466667 bestMatch=[smythe] > #### ?bestScore=2.4466667 bestMatch=[smythe] > > I have tried every possible variation of the namespace definition and > invoking the function in basex but it always says; > > [XPST0017] Unknown function "sim:b4asims(...)" > > In the pom.xml for basex I have added this: > > smstest.b4asims > b4asims > system > 1.0 > /media/disk2/fasrepo/common-bin/java/smstest.jar > > > and it compiles successfully, and I can then do a mvn 'package', and > deploy the jar to my basex home dir, and run it but I simply cannot get > the java bindings to work. I also tried alot of variations here, but to no > avail. > > Clearly there is something really basic I am missing? I have tried the > examples given on the basex documentation (the Math and file writer egs) > and get exactly the same results -- Unknown function. All of my other java > stuff on this box seems to work fine. > > I'm guessing that there is something in maven or eclipse which supplies > the magic which I'm missing. I'm just using maven on the server, not > eclipse. > > Any suggestions for a non-java developer would be most gratefully > received. > > Best wishes to all, > > Sandra. ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From christian.gruen at gmail.com Thu Apr 15 16:45:06 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Thu, 15 Apr 2010 16:45:06 +0200 Subject: [basex-talk] Using XML catalogs in BASE-X, right flow of actions for working with !DOCTYPE or !ENTITY declarations In-Reply-To: <26422.4104.12031-17821-1950557239-1271324614@post.cz> References: <26422.4104.12031-17821-1950557239-1271324614@post.cz> Message-ID: Ji??, > Is it possible to use XML catalogs for getting documents referenced in DTD's with BASE-X database? Do you want to know if files, which are referenced by DTDs, can be stored in a BaseX database? Yes ? as long as they are well-formed XML; note, however, that they have to be manually added. > My second question is about right procedure for dealing with DOCTYPE declaration. I'm using BASE-X for modifications in lot of different files. Some of them has DOCTYPE declaration defined and I would like to preserve this definition when I finish changes on the file. Its possible to use export functions with specified properties doctype-system, doctype-public, but is there any way how to get original doctype for me to be able to pass it as export property at the end or this must be specified by user who is modifying the file? I'm having the same issue with declarations of !ENTITY when i finish changes all entities are gone. That's not possible? as DOCTYPE declarations aren't registered during parsing. Christian From christian.gruen at gmail.com Sun Apr 18 22:43:01 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Sun, 18 Apr 2010 22:43:01 +0200 Subject: [basex-talk] Release BaseX 6.1 Message-ID: Dear all, once more, we are delighted to announce a new release of BaseX. Version 6.1 comes with the following improvements: - a new REST API, based on the JAX-RX Interface, to communicate with BaseX via HTTP. - new bindings to use BaseX from other programming languages. - support for all XSLT/XQuery serialization parameters. - advanced query optimizations to apply index structures whenever appropriate. - enhanced conformance with XQuery Update/Full Text Recommendations. BaseX is open source. It is developed by the DBIS Group at University of Konstanz. Please find more information at http://basex.org/ All the best, Christian Gr?n BaseX Team ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From gerrit.imsieke at le-tex.de Mon Apr 19 00:26:49 2010 From: gerrit.imsieke at le-tex.de (Imsieke, Gerrit, le-tex) Date: Mon, 19 Apr 2010 00:26:49 +0200 Subject: [basex-talk] flat collections Message-ID: <4BCB8729.8000209@le-tex.de> Dear BaseX Team, We are looking at BaseX to serve as the fulltext query engine for a customer's content store. The customer is a publishing company. They have organized their content in a directory structure like /works/ work1/ src/ chap1.xml chap2.xml ... /work2/ src/ chap1.xml chap2.xml ... ... If I import all content into a database (which seems to map to, or even is synonymous to, a collection in BaseX lingo), there's no way to restrict queries to just one specific work. I thought that looking for something below //root()[matches(document-uri(.), '/work2')] might help, only to discover that a) all documents in this collection are flat, i.e., 'work1' or 'work2' isn't part of any root node's document-uri() and b) this kind of query seems to be very inefficient. In qizx, I create a what they call library group, import all documents below a certain local directory into that library group and then query it by, e.g., for $d in collection('/works/work2')//*[. ftcontains 'foo' ] return {$d} Not only that I'm not able to restrict a query to a certain subdirectory, I cannot create links to search results in BaseX. The publisher's content resides in an svn repository. Update of the XML search engine's data pool is being triggered by an svn commit hook. The user should get a URL like http://svn.acme.com/viewsvn/?do=view&project=works&path=/work2/src/chap2.xml as a query result, in order to be able to browse the content. (Until versioning becomes part of a client/server, XQFT-enabled XML database that can also store arbitrary non-XML files, they will probably continue to use svn as their content repository.) In BaseX, we cannot generate links to work2/src/chap2.xml since chap2.xml's document uri is lacking the path parts. I was thinking about putting each work in a collection of its own. But then I don't see how I could possibly perform a full text search of the whole content (all collections). And if each project contains a substructure work2/ trunk/ src/ chap1.xml chap2.xml ... tags/ ed04/ src/ chap1.xml chap2.xml then the number of collection to create or query still grows. Can you recommend a BaseX way of dealing with these requirements? Maybe inserting path information as a processing instruction into each XML file (this could be performed by a commit hook, too)? Inserting the paths as content or as an attribute might not be possible because some of the schemas -- ranging from custom DTDs to public XHTML or DocBook schemas -- might not be altered, or rather: patching the files to accomodate for an XML database seems acceptable, while altering the schemas or creating custom derived schemas from public ones seems unacceptable. Searching PIs may be inefficient however. Any other ideas? Best regards, Gerrit From christian.gruen at gmail.com Mon Apr 19 00:49:55 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 19 Apr 2010 00:49:55 +0200 Subject: [basex-talk] flat collections In-Reply-To: <4BCB8729.8000209@le-tex.de> References: <4BCB8729.8000209@le-tex.de> Message-ID: Gerrit, thanks for your feedback. As you correctly observed, all collections in BaseX are flat, i.e., don't mirror the original document structure. The preservation of file paths is on our todo list, though; you'll get a notification as soon as this issue is resolved. Christian On Mon, Apr 19, 2010 at 12:26 AM, Imsieke, Gerrit, le-tex wrote: > Dear BaseX Team, > > We are looking at BaseX to serve as the fulltext query engine for a > customer's content store. > > The customer is a publishing company. They have organized their content in a > directory structure like > > /works/ > ?work1/ > ? ?src/ > ? ? ?chap1.xml > ? ? ?chap2.xml > ? ? ?... > ?/work2/ > ? ?src/ > ? ? ?chap1.xml > ? ? ?chap2.xml > ? ? ?... > ?... > > If I import all content into a database (which seems to map to, or even is > synonymous to, a collection in BaseX lingo), there's no way to restrict > queries to just one specific work. I thought that looking for something > below //root()[matches(document-uri(.), '/work2')] might help, only to > discover that a) all documents in this collection are flat, i.e., 'work1' or > 'work2' isn't part of any root node's document-uri() and b) this kind of > query seems to be very inefficient. > > In qizx, I create a what they call library group, import all documents below > a certain local directory into that library group and then query it by, > e.g., > for $d in ?collection('/works/work2')//*[. ftcontains 'foo' ] > return {$d} > > Not only that I'm not able to restrict a query to a certain subdirectory, I > cannot create links to search results in BaseX. The publisher's content > resides in an svn repository. Update of the XML search engine's data pool is > being triggered by an svn commit hook. The user should get a URL like > http://svn.acme.com/viewsvn/?do=view&project=works&path=/work2/src/chap2.xml > as a query result, in order to be able to browse the content. (Until > versioning becomes part of a client/server, XQFT-enabled XML database that > can also store arbitrary non-XML files, they will probably continue to use > svn as their content repository.) In BaseX, we cannot generate links to > work2/src/chap2.xml since chap2.xml's document uri is lacking the path > parts. > > I was thinking about putting each work in a collection of its own. But then > I don't see how I could possibly perform a full text search of the whole > content (all collections). And if each project contains a substructure > ?work2/ > ? ?trunk/ > ? ? ?src/ > ? ? ? ?chap1.xml > ? ? ? ?chap2.xml > ? ? ? ?... > ? ?tags/ > ? ? ?ed04/ > ? ? ? ?src/ > ? ? ? ? ?chap1.xml > ? ? ? ? ?chap2.xml > then the number of collection to create or query still grows. > > Can you recommend a BaseX way of dealing with these requirements? Maybe > inserting path information as a processing instruction into each XML file > (this could be performed by a commit hook, too)? Inserting the paths as > content or as an attribute might not be possible because some of the schemas > -- ranging from custom DTDs to public XHTML or DocBook schemas -- might not > be altered, or rather: patching the files to accomodate for an XML database > seems acceptable, while altering the schemas or creating custom derived > schemas from public ones seems unacceptable. Searching PIs may be > inefficient however. Any other ideas? > > Best regards, > > Gerrit ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From soft at softlist.net Mon Apr 19 02:00:10 2010 From: soft at softlist.net (SoftList) Date: Sun, 18 Apr 2010 20:00:10 -0400 Subject: [basex-talk] Software Submitted - BaseX 6.1 Message-ID: Dear DBIS Group, University of Konstanz, Thank you for your submission - "BaseX 6.1" to SoftList. Please allow a few days until we review and place it on our site. Sincerely, SoftList.Net http://www.softlist.net ? 2000-2008, SoftList.Net -------------- next part -------------- An HTML attachment was scrubbed... URL: From team at bluechillies.com Mon Apr 19 02:15:03 2010 From: team at bluechillies.com (BlueChillies.com) Date: Sun, 18 Apr 2010 17:15:03 -0700 Subject: [basex-talk] BlueChillies.com - Software submitted Message-ID: <04e8bf6029d8151aa49b17021c6cd8ff@www.bluechillies.com> Thank you for your submission "BaseX" Please allow few days to review and publish your software. Best Regards, BlueChillies Team http://www.bluechillies.com/ ? BlueChillies, 2000-2007 From jasonbruins at yahoo.com Thu Apr 22 17:31:08 2010 From: jasonbruins at yahoo.com (Jason Durham) Date: Thu, 22 Apr 2010 08:31:08 -0700 (PDT) Subject: [basex-talk] data import Message-ID: <915947.73629.qm@web32806.mail.mud.yahoo.com> Is there a way to import data from an existing base such as MS Excel or Access? -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Thu Apr 22 17:37:08 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Thu, 22 Apr 2010 17:37:08 +0200 Subject: [basex-talk] data import In-Reply-To: <915947.73629.qm@web32806.mail.mud.yahoo.com> References: <915947.73629.qm@web32806.mail.mud.yahoo.com> Message-ID: Jason, > Is there a way to import data from an existing base such as MS Excel or Access? To keep BaseX small and compact, we have decided not to add any proprietary importers. However, reg. Excel, you can export data as XML; this way, you will be able to access additional meta data of the original source. Hope this helps, Christian ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From achambers.home at googlemail.com Sat Apr 24 02:37:34 2010 From: achambers.home at googlemail.com (Andy Chambers) Date: Sat, 24 Apr 2010 01:37:34 +0100 Subject: [basex-talk] language binding for common lisp Message-ID: Hey All, I've recently discovered basex and it seems to be a pretty cool project. Thanks for making it open source. Here's a common lisp language binding to add to the mix. I developed it on sbcl against basex version 6.1 by transcribing the python version. Thanks again, Andy ;;; file: example.lisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defpackage :basex-user (:use :cl :basex)) (in-package :basex-user) (time (let ((session (make-instance 'session))) (if (execute session "xquery 1 to 10") (print (result session)) (print (info session))) (close-session session))) ;;; file: basex-client.lisp ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defpackage :basex (:use :cl :usocket) (:export :session :execute :close-session :info :result)) (in-package :basex) (defconstant +null+ (code-char 0)) (defclass session () ((host :initarg :host :initform "localhost") (port :initarg :port :initform 1984) (user :initarg :user :initform "admin") (pw :initarg :pw :initform "admin") (sock :initform nil) (result :initform nil :accessor result) (info :initform nil :accessor info))) (defmethod initialize-instance :after ((self session) &key) (with-slots (host port user pw sock) self (setf sock (socket-connect host port :element-type '(unsigned-byte 8))) (unless (hand-shake self) (error "Could not initiate connection")))) (defun hand-shake (session) (declare (optimize debug)) (labels ((md5 (str) (string-downcase (with-output-to-string (s) (loop for hex across (sb-md5:md5sum-string str) do (format s "~2,'0x" hex))))) (auth-token (pw timestamp) (md5 (format nil "~a~a" (md5 pw) timestamp)))) (with-slots (user pw sock) session (let* ((ts (read-null-terminated (socket-stream sock))) (auth (auth-token pw ts))) (write-null-terminated user (socket-stream sock)) (write-null-terminated auth (socket-stream sock)) (force-output (socket-stream sock)) (eq 0 (read-byte (socket-stream sock))))))) (defun read-null-terminated (in) (with-output-to-string (s) (loop for char = (code-char (read-byte in)) until (char= char +null+) do (write-char char s)))) (defun write-null-terminated (string out) (loop for char across string do (write-byte (char-code char) out)) (write-byte (char-code +null+) out)) (defmethod execute ((self session) query) (with-slots (sock) self (let ((stream (socket-stream sock))) (write-null-terminated query stream) (force-output stream) (setf (result self) (read-null-terminated stream) (info self) (read-null-terminated stream)) (eq 0 (read-byte (socket-stream sock)))))) (defmethod open-session ((self session)) (unwind-protect (unless (hand-shake self) (error "Could not open session")) (close-session self))) (defmethod close-session ((self session)) (with-slots (sock) self (write-null-terminated "exit" (socket-stream sock)) (socket-close sock))) -- ---- Andy Chambers Formedix Ltd From tjwebb at vt.edu Sun Apr 25 22:52:29 2010 From: tjwebb at vt.edu (Travis Webb) Date: Sun, 25 Apr 2010 16:52:29 -0400 Subject: [basex-talk] google app engine Message-ID: Has anyone on this list successfully installed BaseX onto the Google App Engine hosting platform? -tjw -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Mon Apr 26 01:23:06 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 26 Apr 2010 01:23:06 +0200 Subject: [basex-talk] language binding for common lisp In-Reply-To: References: Message-ID: Thanks a lot Andy for the Lisp binding! It will be included and referenced on the homepage today or tomorrow. All the best, Christian On Sat, Apr 24, 2010 at 2:37 AM, Andy Chambers wrote: > Hey All, > > I've recently discovered basex and it seems to be a pretty cool > project. ?Thanks for making it > open source. ?Here's a common lisp language binding to add to the mix. > ?I developed it on sbcl > against basex version 6.1 by transcribing the python version. > > Thanks again, > Andy > > ;;; file: example.lisp > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > (defpackage :basex-user > ?(:use :cl :basex)) > > (in-package :basex-user) > > (time > ?(let ((session (make-instance 'session))) > ? (if (execute session "xquery 1 to 10") > ? ? ? (print (result session)) > ? ? ? (print (info session))) > > ? (close-session session))) > > > ;;; file: basex-client.lisp > ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; > > (defpackage :basex > ?(:use :cl :usocket) > ?(:export :session > ? ? ? ? ? :execute > ? ? ? ? ? :close-session > ? ? ? ? ? :info > ? ? ? ? ? :result)) > > (in-package :basex) > > (defconstant +null+ (code-char 0)) > > (defclass session () > ?((host :initarg :host :initform "localhost") > ? (port :initarg :port :initform 1984) > ? (user :initarg :user :initform "admin") > ? (pw :initarg :pw :initform "admin") > ? (sock :initform nil) > ? (result :initform nil :accessor result) > ? (info :initform nil :accessor info))) > > (defmethod initialize-instance :after ((self session) &key) > ?(with-slots (host port user pw sock) self > ? ?(setf sock (socket-connect host port :element-type '(unsigned-byte 8))) > ? ?(unless (hand-shake self) > ? ? ?(error "Could not initiate connection")))) > > (defun hand-shake (session) > ?(declare (optimize debug)) > ?(labels ((md5 (str) > ? ? ? ? ? ? (string-downcase (with-output-to-string (s) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(loop for hex across > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (sb-md5:md5sum-string str) > ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? do (format s "~2,'0x" hex))))) > ? ? ? ? ? (auth-token (pw timestamp) > ? ? ? ? ? ? (md5 (format nil "~a~a" > ? ? ? ? ? ? ? ? ? ? ? ? ?(md5 pw) timestamp)))) > > ? ?(with-slots (user pw sock) session > ? ? ?(let* ((ts (read-null-terminated (socket-stream sock))) > ? ? ? ? ? ? (auth (auth-token pw ts))) > ? ? ? ?(write-null-terminated user (socket-stream sock)) > ? ? ? ?(write-null-terminated auth (socket-stream sock)) > ? ? ? ?(force-output (socket-stream sock)) > ? ? ? ?(eq 0 (read-byte (socket-stream sock))))))) > > (defun read-null-terminated (in) > ?(with-output-to-string (s) > ? ?(loop for char = (code-char (read-byte in)) > ? ? ? ? until (char= char +null+) > ? ? ? ? do (write-char char s)))) > > (defun write-null-terminated (string out) > ?(loop for char across string > ? ? ? do (write-byte (char-code char) out)) > ?(write-byte (char-code +null+) out)) > > (defmethod execute ((self session) query) > ?(with-slots (sock) self > ? ?(let ((stream (socket-stream sock))) > ? ? ?(write-null-terminated query stream) > ? ? ?(force-output stream) > ? ? ?(setf (result self) (read-null-terminated stream) > ? ? ? ? ? ?(info self) (read-null-terminated stream)) > ? ? ?(eq 0 (read-byte (socket-stream sock)))))) > > (defmethod open-session ((self session)) > ?(unwind-protect > ? ? ? (unless (hand-shake self) > ? ? ? ? (error "Could not open session")) > ? ?(close-session self))) > > (defmethod close-session ((self session)) > ?(with-slots (sock) self > ? ?(write-null-terminated "exit" (socket-stream sock)) > ? ?(socket-close sock))) > > > > > > > -- > ---- > Andy Chambers > Formedix Ltd > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk > From christian.gruen at gmail.com Mon Apr 26 11:55:01 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 26 Apr 2010 11:55:01 +0200 Subject: [basex-talk] language binding for common lisp In-Reply-To: References: Message-ID: ?your solution is now linked at http://basex.org/api Thanks once more, Christian > On Sat, Apr 24, 2010 at 2:37 AM, Andy Chambers > wrote: >> Hey All, >> >> I've recently discovered basex and it seems to be a pretty cool >> project. ?Thanks for making it >> open source. ?Here's a common lisp language binding to add to the mix. >> ?I developed it on sbcl >> against basex version 6.1 by transcribing the python version. >> >> Thanks again, >> Andy >> >> ;;; file: example.lisp >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> >> (defpackage :basex-user >> ?(:use :cl :basex)) >> >> (in-package :basex-user) >> >> (time >> ?(let ((session (make-instance 'session))) >> ? (if (execute session "xquery 1 to 10") >> ? ? ? (print (result session)) >> ? ? ? (print (info session))) >> >> ? (close-session session))) >> >> >> ;;; file: basex-client.lisp >> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; >> >> (defpackage :basex >> ?(:use :cl :usocket) >> ?(:export :session >> ? ? ? ? ? :execute >> ? ? ? ? ? :close-session >> ? ? ? ? ? :info >> ? ? ? ? ? :result)) >> >> (in-package :basex) >> >> (defconstant +null+ (code-char 0)) >> >> (defclass session () >> ?((host :initarg :host :initform "localhost") >> ? (port :initarg :port :initform 1984) >> ? (user :initarg :user :initform "admin") >> ? (pw :initarg :pw :initform "admin") >> ? (sock :initform nil) >> ? (result :initform nil :accessor result) >> ? (info :initform nil :accessor info))) >> >> (defmethod initialize-instance :after ((self session) &key) >> ?(with-slots (host port user pw sock) self >> ? ?(setf sock (socket-connect host port :element-type '(unsigned-byte 8))) >> ? ?(unless (hand-shake self) >> ? ? ?(error "Could not initiate connection")))) >> >> (defun hand-shake (session) >> ?(declare (optimize debug)) >> ?(labels ((md5 (str) >> ? ? ? ? ? ? (string-downcase (with-output-to-string (s) >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ?(loop for hex across >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? (sb-md5:md5sum-string str) >> ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? do (format s "~2,'0x" hex))))) >> ? ? ? ? ? (auth-token (pw timestamp) >> ? ? ? ? ? ? (md5 (format nil "~a~a" >> ? ? ? ? ? ? ? ? ? ? ? ? ?(md5 pw) timestamp)))) >> >> ? ?(with-slots (user pw sock) session >> ? ? ?(let* ((ts (read-null-terminated (socket-stream sock))) >> ? ? ? ? ? ? (auth (auth-token pw ts))) >> ? ? ? ?(write-null-terminated user (socket-stream sock)) >> ? ? ? ?(write-null-terminated auth (socket-stream sock)) >> ? ? ? ?(force-output (socket-stream sock)) >> ? ? ? ?(eq 0 (read-byte (socket-stream sock))))))) >> >> (defun read-null-terminated (in) >> ?(with-output-to-string (s) >> ? ?(loop for char = (code-char (read-byte in)) >> ? ? ? ? until (char= char +null+) >> ? ? ? ? do (write-char char s)))) >> >> (defun write-null-terminated (string out) >> ?(loop for char across string >> ? ? ? do (write-byte (char-code char) out)) >> ?(write-byte (char-code +null+) out)) >> >> (defmethod execute ((self session) query) >> ?(with-slots (sock) self >> ? ?(let ((stream (socket-stream sock))) >> ? ? ?(write-null-terminated query stream) >> ? ? ?(force-output stream) >> ? ? ?(setf (result self) (read-null-terminated stream) >> ? ? ? ? ? ?(info self) (read-null-terminated stream)) >> ? ? ?(eq 0 (read-byte (socket-stream sock)))))) >> >> (defmethod open-session ((self session)) >> ?(unwind-protect >> ? ? ? (unless (hand-shake self) >> ? ? ? ? (error "Could not open session")) >> ? ?(close-session self))) >> >> (defmethod close-session ((self session)) >> ?(with-slots (sock) self >> ? ?(write-null-terminated "exit" (socket-stream sock)) >> ? ?(socket-close sock))) >> >> >> >> >> >> >> -- >> ---- >> Andy Chambers >> Formedix Ltd >> _______________________________________________ >> BaseX-Talk mailing list >> BaseX-Talk at mailman.uni-konstanz.de >> https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk >> > From bea.sancho at gmail.com Mon Apr 26 23:50:16 2010 From: bea.sancho at gmail.com (Beatriz Sancho) Date: Mon, 26 Apr 2010 23:50:16 +0200 Subject: [basex-talk] one question about Result and how to use it In-Reply-To: References: <105576A4-9C3E-4E75-AF9D-13BAAE566FEB@uni-konstanz.de> Message-ID: Thank you very much for the information i feel a little stupid because i usually think that i am understanding something and i am not.... now it works perfectly!! my application is for analyze student interactions in a social network, gives the results to the teacher in order to improve the collaborative learning, alerting them when some roles are detected (for example, an isolated student). All the interactions between students and documentes in bscw or in wikis are stored and some parsers transform it into a XML file, then my application have to analize that.... I will tell in my final doc why i have choosed Basex, and i will mention your efficiency and kindy. (sorry for my english again). 2010/4/26 Christian Gr?n > > I think you are confusing the database with the source document. > > The moment you add a document to your database there is no "link" to the > source document anymore. > > > > Once you perform update operations on a database the updates are > reflected only in the database. > > The (source) XML document is stored independently, this is why you call > export to overwrite your source XML file. > > Good hint! You can set the WRITEBACK flag to store changes in the > original documents by e.g.? > > new Set(Prop.WRITEBACK, true).execute(context); > > Christian > -------------- next part -------------- An HTML attachment was scrubbed... URL: From christian.gruen at gmail.com Mon Apr 26 23:58:25 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Mon, 26 Apr 2010 23:58:25 +0200 Subject: [basex-talk] one question about Result and how to use it In-Reply-To: References: <105576A4-9C3E-4E75-AF9D-13BAAE566FEB@uni-konstanz.de> Message-ID: Thanks Beatriz for your update, we're looking forward to receiving your final results. Feel free to ask for more, Christian On Mon, Apr 26, 2010 at 11:50 PM, Beatriz Sancho wrote: > Thank you very much for the information > i feel a little stupid because i usually think that i am understanding > something and i am not.... > now it works perfectly!! > > my application is for analyze student interactions in a social network, > gives the results to the teacher in order to improve the collaborative > learning, alerting them when some roles are detected (for example, an > isolated student). All the interactions between students and documentes in > bscw or in wikis are stored and some parsers transform it into a XML file, > then my application have to analize that.... > I will tell in my final doc why i have choosed Basex, and i will mention > your efficiency and kindy. > > (sorry for my english again). > > > 2010/4/26 Christian Gr?n >> >> > I think you are confusing the database with the source document. >> > The moment you add a document to your database there is no "link" to the >> > source document anymore. >> > >> > Once you perform update operations on a database the updates are >> > reflected only in the database. >> > The (source) XML document is stored independently, this is why you call >> > export to overwrite your source XML file. >> >> Good hint! You can set the WRITEBACK flag to store changes in the >> original documents by e.g.? >> >> ?new Set(Prop.WRITEBACK, true).execute(context); >> >> Christian From christian.gruen at gmail.com Thu Apr 29 16:51:00 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Thu, 29 Apr 2010 16:51:00 +0200 Subject: [basex-talk] Strange query output In-Reply-To: <7DF2365FF07C0E4E89419D65CCC93C9E01789EB191B4@EXCHANGE11.campus.tue.nl> References: <7DF2365FF07C0E4E89419D65CCC93C9E01789EB191B4@EXCHANGE11.campus.tue.nl> Message-ID: Dear Toon Calders, thanks for your detailed bug report. Yes, this was a serious issue; the predicate was optimized for an accessing the index, although it was dependent on the query context. This is now fixed in the repository version 6.1.1 of BaseX: http://basex.org/maven/org/basex/basex/6.1.1/ I've forwarded your mail to the mailing list to let others know about it as well. All the best, Christian On Thu, Apr 29, 2010 at 12:17 PM, Calders, T.G.K. wrote: > Dear BaseX developers, > > First of all, many thanks for making this nice tool freely available. I use > it in my Database class so the students can practice a bit with XPath and > XQuery and they are all, without any exception, very enthusiastic about the > tool. > > During class today, however, one of the students encountered a strange query > output; I reduced the example to its essence: > > For the following document: > > > ??????????????? > ??????????????? > > > ?We ran the query ?//instructor[@sname=../lecturer/@sname]? which returned > an empty answer when executed with BaseX 6.1. (with previous versions it > seems to work fine; e.g., 5.7). > > On the other hand, the query: > > let $x:= > ??????????????? > ??????????????? > > > return $x//instructor[@sname=../lecturer/@sname] > > does return: > > > Best regards, > Toon Calders > TU Eindhoven ___________________________ Christian Gruen Universitaet Konstanz Department of Computer & Information Science D-78457 Konstanz, Germany Tel: +49 (0)7531/88-4449, Fax: +49 (0)7531/88-3577 http://www.inf.uni-konstanz.de/~gruen From christian.gruen at gmail.com Thu Apr 29 17:48:36 2010 From: christian.gruen at gmail.com (=?ISO-8859-1?Q?Christian_Gr=FCn?=) Date: Thu, 29 Apr 2010 17:48:36 +0200 Subject: [basex-talk] Fwd: Strange query output In-Reply-To: References: <7DF2365FF07C0E4E89419D65CCC93C9E01789EB191B4@EXCHANGE11.campus.tue.nl> <5A59C6AA-8CDC-4A6D-846F-215421A54C3C@olivercomputing.com> <89DB48B2-5F69-4082-BCA8-E54DE4F34A6B@olivercomputing.com> Message-ID: Philip, as long as you don't work with our "api" and "example" packages, you don't need Maven at all. Talking about myself? I'm only using the Maven plugin to dissolve dependencies. I've posted this to the list, so maybe someone else can help you with that? Christian On Thu, Apr 29, 2010 at 5:40 PM, Philip Oliver wrote: > Christian - I was trying to update my Eclipse installation (Galileo SR2 on OS X) with the maven integration and it blew up my Eclipse installation. Not a BaseX problem but still annoying. I don't know much about Maven but I think I'd prefer to just build from the command line if possible using 'mvn' which is what I was doing with the 'mvn install'. ?Can you say what I should do in order to use 'mvn' at the command line (rather than Eclipse) to build BaseX to get a jar? > > Phil > > On Apr 29, 2010, at 11:37 AM, Christian Gr?n wrote: > >> Philip, >> >> thanks for the hint, it was work in progress. All JUnit tests should >> now run as expected. If not, just tell us (we note that many people >> have difficulties with the Eclipse/Maven integration, so I'm not sure >> if the current configuration meets all demands). >> >> Christian >> >> >> >> On Thu, Apr 29, 2010 at 5:00 PM, Philip Oliver >> wrote: >>> Christian, >>> >>> In light of the bug report, I updated my SVN repository copy and did a 'mvn install', and got the following errors in the automated tests: >>> >>> ------------------------------------------------------- >>> ?T E S T S >>> ------------------------------------------------------- >>> Running org.basex.test.query.NamespaceTest >>> Tests run: 4, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.418 sec <<< FAILURE! >>> Running org.basex.test.query.FTTest >>> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.09 sec <<< FAILURE! >>> Running org.basex.test.cs.SemaphoreTest >>> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.004 sec <<< FAILURE! >>> Running org.basex.test.cs.PermissionTest >>> BaseX 6.1.1 [Server] >>> >>> >>> >>> I don't know how significant these are, or if it's a result of me not properly building BaseX, but FYI. >>> >>> >> > >