>Ok - great advantage to take a rest from my writing :-) Happy to be of service! >SUN Ultra1, Solaris 2.7 with gcc and GNU make, reports no problem ... >I have compiled libxdbm-1.0.6.tar.gz libunicode-0.5.tar.gz and >pcre-2.08.tar.gz ( I skipped the doc part of libxdbm-1.0.6.tar.gz which >needed cweb) >Except for minor changes in Makefiles (-L's and -I's) there were no >problems. Great! Thanks much for trying this out! >However, I don't know how to test if everything is really ok >... in fact I have not been listening to this list since month's - so I >don't even know what I tried to compile. ;-) XDBM is a library that provides an XML database functionality. It can take XML files and then convert them into 'XDBM format' which is a preparsed format. It then provides functions for searching this format which will be (hopefully) much faster than the standard python DOM stuff. XDBM will hopefully soon have a python binding which will allow a DOM and SAX interface to the library. The plan is that XDBM will do all of the xml storage manipulation for Loci. >Does anyone (Brad !!!) has a test script or something similar ? Right, I checked into this and got the following. At the end of this mail are three C programs that will test different functions of XDBM. According to the docs, you need to link against libxdbm, libunicode, libpcre, and libXpat when compiling the tests. Of course, since I haven't got it working yet, I can't offer any other advice, but it seems like you are waaaay ahead of me... >Brad, what problems did you encounter ? I am actually surprised that there >were no problems at all on the SUN. Usually I am prepared for a lot of >hacking when I try to port anything to our machines - maybe I can help ? I hope so! I'm really stuck for something to try next. After the changes I made that I detailed in my last e-mail, I can compile up until the utils directory, when I get the following: gmake[1]: Entering directory `/usr/local/libxdbm-1.0.5/utils' #gcc295 -g -pg -static -L../../lib -L../lib xml2xdbm.o -o xml2xdbm -lxdbm -lunicode -lXpat -lm gcc295 -L../../lib -L../lib xml2xdbm.o -o xml2xdbm -lxdbm -lunicode -lXpat -lpcre -lm ../../lib/libXpat.so: undefined reference to `stderr' ../../lib/libunicode.so: undefined reference to `towlower' ../../lib/libXpat.so: undefined reference to `__fxstat' collect2: ld returned 1 exit status I'm not positive why I'm not finding these functions. Not being experienced at all with C programming/porting, I'm not positive where to turn next. Any advice you could offer would be *greatly* appreciated! Thanks again for testing this out for me. Below is the C code and the xml file they work on. Brad //test 1: test all of the functions Node *node, *nodeb, *nodec; NodeList nlist; Uchar *foo = u_utf8_to_uc( "foo"); Uchar *wop = u_utf8_to_uc( "wop"); Uchar *goo = u_utf8_to_uc( "goo"); Uchar *flop = u_utf8_to_uc( "flop"); puts("/* test xdbm_fetch, xdbm_name */"); nlist = xdbm_fetch(doc, goo, wop, foo, NULL); do{ printf("%s\n",u_uc_to_utf8(xdbm_name(nlist[0]))); printf("%s\n",u_uc_to_utf8(xdbm_value(nlist[0]))); node = nlist[0]; }while((++nlist)[0]); printf("%s\n","/* test xdbm_all_attributes */"); nlist = xdbm_all_attributes(node); do{ printf("%s\n",u_uc_to_utf8(xdbm_name(nlist[0]))); printf("%s\n", u_uc_to_utf8(xdbm_value(nlist[0]))); }while((++nlist)[0]); printf("%s\n","/* test xdbm_attribute */"); printf("%s\n",u_uc_to_utf8(xdbm_attribute(node, flop))); printf("%s\n","/* test xdbm_fetch_first */"); node = xdbm_fetch_first(doc); printf("%s\n",u_uc_to_utf8(xdbm_name(node))); printf("%s\n","/* test xdbm_fetch_child_name */"); nlist = xdbm_fetch_child_name(node, wop); do{ printf("%s\n",u_uc_to_utf8(xdbm_name(nlist[0]))); printf("%s\n",u_uc_to_utf8(xdbm_value(nlist[0]))); }while((++nlist)[0]); printf("%s\n","/* test xdbm_fetch_child_value */"); nlist = xdbm_fetch_child_value(node, "dollop.+wollop"); do{ printf("%s\n",u_uc_to_utf8(xdbm_name(nlist[0]))); printf("%s\n",u_uc_to_utf8(xdbm_value(nlist[0]))); }while((++nlist)[0]); printf("%s\n","/* test xdbm_fetch_child_nodetype */"); nlist = xdbm_fetch_child_nodetype(node, XDBM_NODE_TEXT); do{ printf("%s\n",u_uc_to_utf8(xdbm_name(nlist[0]))); printf("%s\n",u_uc_to_utf8(xdbm_value(nlist[0]))); }while((++nlist)[0]); printf("%s\n","/* test xdbm_first_child */"); nodeb = xdbm_first_child(node); printf("%s\n",u_uc_to_utf8(xdbm_value(nodeb))); printf("%s\n","/* test xdbm_next_sibling */"); nodec = xdbm_next_sibling(nodeb); printf("%s\n",u_uc_to_utf8(xdbm_value(nodec))); printf("%s\n","/* test xdbm_next_sibling */"); nodeb = xdbm_next_sibling(nodec); printf("%s\n",u_uc_to_utf8(xdbm_value(nodeb))); printf("%s\n","/* test xdbm_next_sibling */"); nodec = xdbm_next_sibling(nodeb); printf("%s\n",u_uc_to_utf8(xdbm_value(nodec))); printf("%s\n","/* test xdbm_last_child */"); nodeb = xdbm_last_child(node); printf("%s\n",u_uc_to_utf8(xdbm_value(nodeb))); printf("%s\n","/* test xdbm_previous_sibling */"); nodec = xdbm_previous_sibling(nodeb); printf("%s\n",u_uc_to_utf8(xdbm_value(nodec))); printf("%s\n","/* test xdbm_previous_sibling */"); nodeb = xdbm_previous_sibling(nodec); printf("%s\n",u_uc_to_utf8(xdbm_name(nodeb))); printf("%s\n","/* test xdbm_previous_sibling */"); nodec = xdbm_previous_sibling(nodeb); printf("%s\n",u_uc_to_utf8(xdbm_value(nodec))); //test 2: test manipulation function Node *node, *nodeb, *nodec; NodeList nlist; Uchar *foo = u_utf8_to_uc( "foo"); Uchar *wop = u_utf8_to_uc( "wop"); Uchar *goo = u_utf8_to_uc( "goo"); Uchar *flop = u_utf8_to_uc( "flop"); puts("/* test xdbm_fetch, xdbm_name */"); nlist = xdbm_fetch(doc, goo, wop, foo, NULL); do{ xdbm_delete_node(nlist[0]); xdbm_free_node(nlist[0]); }while((++nlist)[0]); node = nlist[0]; nodeb = xdbm_fetch_first(doc); nlist = xdbm_fetch(doc, wop, foo, NULL); nodec = nlist[0]; xdbm_insert(doc, nodeb, nodec, node); //test 3: test memory usage int i; for( i = 0; i < doc->numberDatum; i++){ (void) __xdbm_load_node(doc->searchDatumList[i]->nodePos, doc->fp, doc); # the XML file--I didn't make this up, so please don't ask me to explain it! <?xml version="1.0" encoding="utf-8" standalone="yes" ?> <foo> dollop of wollop danny boy dollops of wollops <bar yurp="kundy"> one .. </bar> <wop> <goo flop="flollop" burp="barney&rubble"> two three four <cream /> </goo> </wop> bunkum</foo>