xmldb-org-xapi Mailing List for XML:DB Initiative for XML Databases
Brought to you by:
reinhapa
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(10) |
Jul
(23) |
Aug
(6) |
Sep
(7) |
Oct
|
Nov
(4) |
Dec
(1) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: yuqiang f. <fan...@gm...> - 2009-04-08 09:11:39
|
hi I have saw the example and I use the code below to insert a xml text: XMLResource resource = (XMLResource) collection.createResource(rid, XMLResource.RESOURCE_TYPE); resource.setContent(content); collection.storeResource(resource); It works.but the problem is that will append the content after the xmldb, like this: <users> <user></user> </users> <user></user> but what I want is <users> <user></user> <user></user> </users> so,how can I get this? my xml db is basex. basex implemented the xmldb api. thank you |
From: Per N. <per...@us...> - 2005-10-29 08:51:13
|
Hi Tomas, This is a Xindice specific question that would be better to ask on the Xindice user list. Best regards, Per On Friday 21 October 2005 15.08, Thomas Loder wrote: > Hi there, > > I am new to xml db and to this list. I have set up a xindice db and would > like to access it from a servlet running on tomcat. > Could anybody please provide a sample code or URL. I know it works as an > application but I don't how to turn into a servlet. I keep getting error > regarding the driver. > > Many thanks in advance > Thomas > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: > Power Architecture Resource Center: Free content, downloads, discussions, > and more. http://solutions.newsforge.com/ibmarch.tmpl > _______________________________________________ > Xmldb-org-xapi mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmldb-org-xapi |
From: Thomas L. <tl...@gm...> - 2005-10-21 13:08:11
|
Hi there, I am new to xml db and to this list. I have set up a xindice db and would like to access it from a servlet running on tomcat. Could anybody please provide a sample code or URL. I know it works as an application but I don't how to turn into a servlet. I keep getting error regarding the driver. Many thanks in advance Thomas |
From: Slou <ele...@cy...> - 2005-07-06 09:35:46
|
Hi all I was wondering if there is any Python or C-implementation of XML:DB = API? Thanks |
From: Per N. <per...@us...> - 2005-03-24 16:56:29
|
Hi, I think it looks OK but I'd much rather keep the the old syntax. Is there n= o=20 way we could keep the current idea of xmldb:vendor:// and still "do the rig= ht=20 thing"? If we have to change it I would also like to do something to separate=20 collection path from the URI xmldb://ozonedb@localhost/a/b/c/d I cannot separate collection name from URI which means i do not know when t= he=20 directory ends and the collection begins. This means that I can only connec= t=20 to root collections (assuming the last part is the root collection name) no= t=20 get to a child. Lets pretend the root collectionname above is c there is a= =20 childcollection c/d we could do something like xmldb://ozonedb@localhost/a/b?collection=3Dc/d Referncing a resource could follow the same idea e.g. xmldb://ozonedb@localhost/a/b?collection=3Dc/d&id=3D12 Regards, Per s=F6ndagen den 19 september 2004 01.27 skrev Jens K=F6cke: > Hi, > I just wrote a BNF for an alternative URI-Scheme. It supports URIs like > this: > xmldb://vender@host:port/path/to/collection > I wrote it in a few minutes, just as a suggestion. What do you think? > > Adios, > Jens K=F6cke > > Walter Sobchak: "Fuck it Dude, Let's go bowling." > --- The Big Lebowski ( http://www.imdb.com/title/tt0118715 ) > > PGP-Encrypted Mail welcome. > Public-Key: http://www.koecke.net/Ochnygosch.asc > > Webmaster von: > http://www.Koecke.net > http://www.Ochnygosch.org > http://www.Squash-Wesel.de |
From: <ko...@if...> - 2005-03-10 15:26:23
|
Hello, you may look at http://exist-db.org/devguide.html#N1042C this shows how eXist uses the Api-extension mechanism for this purpose. Stephan Heiko Schefter wrote: > Hy, > > a hava a question: Will it be possible to add users and roles to a > native xml database using xml:db-api. When or maybe who or maybe why not? > > Thanks > Heiko > > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT Products from real users. > Discover which products truly live up to the hype. Start reading now. > http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click > _______________________________________________ > Xmldb-org-xapi mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmldb-org-xapi > |
From: Heiko S. <hei...@gm...> - 2005-03-07 08:26:58
|
Hy, a hava a question: Will it be possible to add users and roles to a native xml database using xml:db-api. When or maybe who or maybe why not? Thanks Heiko |
From: Rona <ro...@21...> - 2004-12-09 02:35:37
|
Dear manager, See security products at www.dtc.com.cn or www.dvitec.com , you'll discover a good variety of CCD cameras available from a reliable manufacturer. Await your favorable reply at soonest time . Best wishes, Miss kelly Tel: 0086-755-25927770-5 (5L) Fax:0086-755-25928078 www.dtc.com.cn Email: ke...@dv... |
From: <lov...@ya...> - 2004-11-15 02:42:38
|
$B%M%C%H%"%$%I%k$G%[!<%`%Z!<%8%G%S%e!<$7$^$7$?!y(B $B%W%i%$%Y!<%H<L??$d$A$g$C$H$-$o$I$$!J!)!K<L??$H$+$b(B $B%"%C%W$7$F$^$9!z8+$KMh$F$/$@$5$$$M"v(B http://www.eyc.jp/~apple/index2.php?id=eG1sZGItb3JnLXhhcGlAbGlzdHMuc291cmNlZm9yZ2UubmV0 |
From: Odetta R. <jil...@cc...> - 2004-11-01 17:07:11
|
<HTML> <HEAD> <!--INSTRUCTIONS FOR ADDING META TAGS--> <!--KEYWORDS, ADD Keywords out of the Article TITLE to this content, separa= te each with a comma--> <META NAME=3D"Keywords" Content=3D"Top 500 Women Owned Business in the U= nited States Announced</B></SPAN> , Supplier Diversity, Woman Owned Business= News,Hispanic News,Latino News,Black News"> <META NAME=3D"Description" Content=3D"Top 500 Women Owned Business in the U= nited States Announced</B></SPAN> " > <!--TITLE, after Div2000.com News, change this to the title of the Article-= -> <TITLE>DiversityBusiness.com News | Top 500 Women Owned Business in the Uni= ted States Announced</B></SPAN> </TITLE> <!--END OF INSTRUCTIONS--> <link rel=3D"stylesheet" type=3D"text/css" href=3D"http://www.div2000.com/= Global.css"> <style> <!-- li.MsoNormal {mso-style-parent:""; margin-bottom:.0001pt; font-size:12.0pt; font-family:"Times New Roman"; margin-left:0in; margin-right:0in; margin-top:0in} h1 {margin-bottom:.0001pt; page-break-after:avoid; font-size:12.0pt; font-family:"Times New Roman"; margin-left:0in; margin-right:0in; margin-top:0in} div.Section1 {page:Section1;} .release { margin-left: 1.0em; margin-right: 1.0em; } address.text { margin-left: 1.0em; margin-right: 1.0em; } --> </style> </HEAD> <BODY> <br> <center> <TABLE border=3D0 cellPadding=3D0 cellSpacing=3D3 width=3D"570"> <TR> <TD align=3D"left"><a href=3D"http://www.div2000.com" target=3D"_blank"= ><img src=3D"http://www.Div2000.com/images/logos/061202Div.jpg" alt=3D"Div20= 00.com" border=3D0 width=3D"218" height=3D"43"></a><a href=3D"http://www.div= 2000.com/Resources/News" target=3D"_blank"><img src=3D"http://www.Div2000.co= m/images/logos/DivNews.jpg" alt=3D"Div2000.com Multicultural Business News" = border=3D0 width=3D"87" height=3D"26"></a></TD> <td align=3Dright valign=3Dtop colspan=3D"2" nowrap><A href=3D"javascript:= window.print()"><img src=3D"http://www.div2000.com/images/divprinter.jpg" al= t=3D"Print Article" border=3D"0"></A> | <A id=3Dbutton1 onclick=3DJavascript:window.close() href=3D"#" name=3Dbut= ton1><font size=3D"-2">Close Window</font></A></td> </TR> </TABLE> <TABLE border=3D0 cellPadding=3D0 cellSpacing=3D0 width=3D"570"> <tr width=3D"100%"> <td colspan=3D"2" bgcolor=3D"#dddddd" width=3D"100%" align=3D"middle"><IMG= src=3D"http://www.div2000.com/images/ClearSpacer.gif" width=3D"100%" height= =3D"1"></td> </tr> =09=20 <tr width=3D"100%"> <TD align=3Dleft colspan=3D"2" width=3D"100%"><b> <font face=3D"Verdana" size=3D"1"><span class=3Dbody_bold>Top 500 Women Ow= ned Business Announced</span></font></b></TD> =09=20=20=20=20 <tr width=3D"100%"> <td colspan=3D"2" bgcolor=3D"#dddddd" width=3D"100%" align=3D"middle"><IMG= src=3D"http://www.div2000.com/images/ClearSpacer.gif" width=3D"100%" height= =3D"1"></td> </tr> </TABLE> <TABLE border=3D0 cellPadding=3D2 cellSpacing=3D0 width=3D"570" align=3Dcent= er> <TR> <TD align=3Dleft> <P><font face=3D"Verdana" size=3D"1"><b>November 01, 2004<BR> </b= ></font></P></TD> </TR> <TR> <TD> <center> <table cellSpacing=3D"0" cellPadding=3D"0" border=3D"0" id=3D"table1" widt= h=3D"570" height=3D"402"> <tr vAlign=3D"top"> <td width=3D"570"> <div class=3D"Section1"> <div> <div class=3D"newstext"> <H3>Top 500 Women Owned Business in the United States Announced</H3> =09=09=09=09=09=09=09 <P> <P> <p><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-family:= Verdana; color:black'> SOUTHPORT, CT, November 1,2004 /<b>DiversityBusiness.com</b>/ -- Diversi= tyBusiness.com, the nation=92s=92 leading multicultural B2B online portal, today announced the Div500, the 5<sup>th</sup> annual listing of the nat= ion=92s top 500 Women owned businesses. Ranging in revenue size from $5 million = to over $1 billion, the companies listed on the Div500 represent the nation=92s = top earners and challenge the long-held notion that Women-owned businesses a= re small or insignificant.<o:p></o:p></span></p> <p><span style=3D'font-size:10.0pt;font-family:Verdana;color:black'>At t= he top of 2004=92s Div500 are </span><span style=3D'font-size:10.0pt;font-family:V= erdana'>Omega World Travel<span style=3D'color:black'>, headquartered in </span><st1:C= ity w:st=3D"on">Fairfax</st1:City><span style=3D'color:black'>, <st1:State w= :st=3D"on">VA</st1:State>, with $1.1 billion in 2003 revenues, </span>Travel Solutions, Inc<span style=3D'color:black'>, based in </span><st1:City w:st=3D"on">Westervill= e</st1:City><span style=3D'color:black'>, <st1:State w:st=3D"on">OH</st1:State></span>, wi= th 700 million in 2003 revenues, <span style=3D'color:black'>and </span>AVI FOODSYSTEMS= , Inc.<span style=3D'color:black'>, headquartered in </span><st1:place w:st=3D"on"><= st1:City w:st=3D"on">Warren</st1:City><span style=3D'color:black'>, <st1:State w= :st=3D"on">OH</st1:State></span></st1:place><span style=3D'color:black'>, with $400 million in 2003 revenues. The top comp= anies will be honored at a special awards ceremony at DiversityBusiness.com=92= s 5th Annual Multicultural Business Conference, taking place March 30 =96 Apri= l 1, 2005 at the Foxwoods Resort Casino in <st1:place w:st=3D"on"><st1:City w:st= =3D"on">Mashantucket</st1:City>, <st1:State w:st=3D"on">Connecticut</st1:State></st1:place>.<o:p></o:p><= /span></span></p> <p><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-family:= Verdana; color:black'>=93Diversity-owned businesses contribute over $1.4 trillion= in sales to the <st1:place w:st=3D"on"><st1:country-region w:st=3D"on">U.S.</st1:= country-region></st1:place> economy,=94 said Kenton Clarke, CEO of Computer Consulting Associates International, the company that built DiversityBusiness.com.<span style=3D'mso-spacerun:yes'>=A0 </span>=93It is no longer just =93the rig= ht thing=94 to do business with diversity suppliers. Because of recent economic and demogr= aphic trends and changes, major corporations are realizing that having a diver= se supplier list positively impacts their business.=94<o:p></o:p></span></p= > <p><b><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-fami= ly:Verdana; color:black'>The Div500</span></b><span style=3D'font-size:10.0pt;mso-bi= di-font-size: 7.5pt;font-family:Verdana;color:black'> <br> The Div500 is a classification that represents the top 500 Women owned businesses in the <st1:country-region w:st=3D"on"><st1:place w:st=3D"on"= >U.S.</st1:place></st1:country-region>, in sectors such as technology, manufacturing, food service and professio= nal services. Major corporations, government agencies and college/universiti= es throughout the country that do business with multicultural and women-own= ed businesses use the list The Div500 is produced annually by DiversityBusiness.com, the nation's leading multicultural B2B Internet p= ortal that links large organizational buyers to multicultural product and serv= ice businesses. <br> <br> =93The Div500 companies are the heroes of diversity-owned business in <s= t1:place w:st=3D"on"><st1:country-region w:st=3D"on">America</st1:country-region>= </st1:place>,=94 said Kenton Clarke. These are the women that have conquered the hurdles = and made the sacrifices, building and strengthening their communities, provi= ding jobs and helping to keep the fabric of the <st1:country-region w:st=3D"o= n"><st1:place w:st=3D"on">U.S.</st1:place></st1:country-region> economy together.=94 = <br> <br> For the complete list of winning companies, please visit:<br> </span><span style=3D'mso-bidi-font-size:7.5pt;font-family:Verdana;color= :black'><a href=3D"http://www.diversitybusiness.com/">www.DiversityBusiness.com</a>= </span><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-family:Verdana; color:black'><span style=3D'mso-spacerun:yes'>=A0 </span><br> <br style=3D'mso-special-character:line-break'> <![if !supportLineBreakNewLine]><br style=3D'mso-special-character:line-= break'> <![endif]><o:p></o:p></span></p> <p><b><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-fami= ly:Verdana; color:black'>About DiversityBusiness.com <o:p></o:p></span></b></p> <p><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-family:= Verdana; color:black'>Launched in 1999, DiversityBusiness.com with over 26,000 me= mbers is the largest organization of diversity-owned businesses throughout the= United States that provide goods and services to Fortune 1000 companies, govern= ment agencies and colleges and universities. The site has gained national recognition and has won numerous awards for its content and design.</spa= n><span style=3D'font-size:7.5pt;font-family:Verdana;color:black'> </span><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-family:Verdana; color:black'>It is a membership-based exchange platform that facilitates= contacts and communication, streamlines business processes and provides = vital business news and information. DiversityBusiness.com is produced by Comp= uter Consulting Associates International Inc. (CCAii.com) of Southport, CT. F= ounded in 1980 by CEO Kenton Clarke; CCAii is the one of the country=92s most s= uccessful African-American owned computer-consulting and diversity specialist firm= s.<o:p></o:p></span></p> <p><b><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font-fami= ly:Verdana; color:black'>Press Contact:<br> </span></b><span style=3D'font-size:10.0pt;mso-bidi-font-size:7.5pt;font= -family: Verdana;color:black'><a href=3D"http://www.div2000.com/DivInfo/Contact/"= >Odetta Rogers</a><br> Director of Communications<br> <a href=3D"https://www.diversitybusiness.com/">DiversityBusiness.com</a>= <o:p></o:p></span></p> <p class=3DMsoNormal><b><span style=3D'mso-bidi-font-size:7.5pt;font-fam= ily:Verdana; color:black'>Source: </span></b><span style=3D'mso-bidi-font-size:7.5pt;= font-family:Verdana;color:black'>DiversityBusiness.com</span></p> =09=09=09=09=20=20=20=20=20=20=20=20=20=20=20=20 <BR><BR><font size=3D"1" face=3D"Verdana,Arial, Helvetica"><STRONG> = Source: BUSINESS WIRE</STRONG></font></P> =09=09=09=09=09=09=09=09=09=09=09=09=09=09 </div> </div> </div></td> </tr> <tr vAlign=3D"top"> <td width=3D"655"> </td> </tr> </table> </center></TD> </TR> <BR> </TABLE> =20 <TABLE border=3D0 cellPadding=3D0 cellSpacing=3D0 width=3D"570"> <tr> <td align=3D"middle"><hr size=3D"1" color=3D"#dddddd" noshade></td> </tr> <tr> <TD align=3D"right"><A id=3Dbutton1 onclick=3DJavascript:window.close() hr= ef=3D"#" name=3Dbutton1><font size=3D"-2">Close Window</font></A><p></p></TD= > </tr> </TABLE>=20=20=20=20=20=20=20 </center> </BODY> </HTML> |
From: Jens <Jens@Koecke.net> - 2004-09-24 00:44:11
|
Hi, I just changed the DatabaseManager class, so that it will no longer use the deprecated method Database.getName(). I include the output of cvs diff in this mail. As I am not a developer of this project, could one of the Member please add it to the source if my changes are OK? Adios, Jens K=F6cke The Dude: "And, you know, he's got emotional problems, man." Walter Sobchak: "You mean... beyond pacifism? " --- The Big Lebowski ( http://www.imdb.com/title/tt0118715 ) PGP-Encrypted Mail welcome. Public-Key: http://www.koecke.net/Ochnygosch.asc Webmaster von: http://www.Koecke.net http://www.Ochnygosch.org http://www.Squash-Wesel.de |
From: Jens <Jens@Koecke.net> - 2004-09-18 23:27:40
|
Hi, I just wrote a BNF for an alternative URI-Scheme. It supports URIs like this: xmldb://vender@host:port/path/to/collection I wrote it in a few minutes, just as a suggestion. What do you think? Adios, Jens K=F6cke Walter Sobchak: "Fuck it Dude, Let's go bowling." --- The Big Lebowski ( http://www.imdb.com/title/tt0118715 ) PGP-Encrypted Mail welcome. Public-Key: http://www.koecke.net/Ochnygosch.asc Webmaster von: http://www.Koecke.net http://www.Ochnygosch.org http://www.Squash-Wesel.de |
From: Jens <Jens@Koecke.net> - 2004-09-13 12:49:48
|
> If it is syntactically wrong we should fix this IMHO. Well, it is not syntactically wrong. > What would you suggest instead, just dropping xmldb from from the URI to = get=20 > vendorx://db.xmlmovies.com:2030/movies? I wouldn't drop the xmldb: it is the scheme of the URI (just like http: or ftp:). I'd rather use something like: xmldb://vendorx/movies for local machine or xmldb://ve...@db...:2030/movies for a remote machine and xmldb://vendorx;user:pa...@db...:2030/movies or xmldb://vendorx;us...@db...:2030/movies for a remote machine with authentication What do you think about that? Adios, Jens K=F6cke Walter Sobchak: "Am I wrong?" The Dude: "No..." Walter "Sobchak: Am I wrong?" The Dude: "You're not wrong, Walter, you're just an asshole!" --- The Big Lebowski ( http://www.imdb.com/title/tt0118715 ) PGP-Encrypted Mail welcome. Public-Key: http://www.koecke.net/Ochnygosch.asc Webmaster von: http://www.Koecke.net http://www.Ochnygosch.org http://www.Squash-Wesel.de |
From: Per N. <per...@re...> - 2004-09-13 07:45:53
|
If it is syntactically wrong we should fix this IMHO. What would you suggest instead, just dropping xmldb from from the URI to ge= t=20 vendorx://db.xmlmovies.com:2030/movies? Regards, Per l=F6rdagen den 11 september 2004 01.55 skrev Jens K=F6cke: > Hy, > > I've got a rather simple question: > Why isn't a URI-Schema used, which is valid according to the RFC 2396? > For example in the API Use Cases document > (http://xmldb-org.sourceforge.net/xapi/UseCases.html#Nff2413 ) this URI > is used : > "xmldb:vendorx://db.xmlmovies.com:2030/movies" > > But according to the above RFC something like "xmldb:vendor://" is not > allowed (take a look at the BNF). > > Wouldn't it be better if the API used a RFC-conform format? > > > By, > Jens K=F6cke > > Teddy: "I am *not* a toy!" > --- A.I. ( http://www.imdb.com/title/tt0212720 ) > > PGP-Encrypted Mail welcome. > Public-Key: http://www.koecke.net/Ochnygosch.asc > > Webmaster von: > http://www.Koecke.net > http://www.Ochnygosch.org > http://www.Squash-Wesel.de > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 > Project Admins to receive an Apple iPod Mini FREE for your judgement on > who ports your project to Linux PPC the best. Sponsored by IBM. > Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php > _______________________________________________ > Xmldb-org-xapi mailing list > Xml...@li... > https://lists.sourceforge.net/lists/listinfo/xmldb-org-xapi |
From: Jens <Jens@Koecke.net> - 2004-09-10 23:56:25
|
Hy, I've got a rather simple question: Why isn't a URI-Schema used, which is valid according to the RFC 2396? For example in the API Use Cases document (http://xmldb-org.sourceforge.net/xapi/UseCases.html#Nff2413 ) this URI is used : "xmldb:vendorx://db.xmlmovies.com:2030/movies" But according to the above RFC something like "xmldb:vendor://" is not allowed (take a look at the BNF). Wouldn't it be better if the API used a RFC-conform format? By, Jens K=F6cke Teddy: "I am *not* a toy!" --- A.I. ( http://www.imdb.com/title/tt0212720 ) PGP-Encrypted Mail welcome. Public-Key: http://www.koecke.net/Ochnygosch.asc Webmaster von: http://www.Koecke.net http://www.Ochnygosch.org http://www.Squash-Wesel.de |
From: <adm...@tp...> - 2004-08-30 01:18:10
|
MailMarshal for Staff Exchange has stopped the following message: Message: B000227563.00000000.mml From: xml...@li... To: kohcn@TP.EDU.SG Subject: RE: Protected message The original mail message and its processing log are attached. MailMarshal Rule: Staff to Student & External : Block EXECUTABLE Files If you have any queries, please call CIS Helpdesk at 5933. Email security by CIS Department. |
From: <adm...@tp...> - 2004-08-27 01:12:58
|
MailMarshal for Staff Exchange has stopped the following message: Message: B00021ea9d.00000000.mml From: xml...@li... To: kohcn@TP.EDU.SG Subject: New changes The original mail message and its processing log are attached. MailMarshal Rule: Staff to Student & External : Block EXECUTABLE Files If you have any queries, please call CIS Helpdesk at 5933. Email security by CIS Department. |
From: <adm...@tp...> - 2004-08-26 09:01:09
|
MailMarshal for Staff Exchange has stopped the following message: Message: B00021c048.00000000.mml From: xml...@li... To: kohcn@TP.EDU.SG Subject: Fax Message Received The original mail message and its processing log are attached. MailMarshal Rule: Staff to Student & External : Block EXECUTABLE Files If you have any queries, please call CIS Helpdesk at 5933. Email security by CIS Department. |
From: <adm...@tp...> - 2004-08-26 07:44:15
|
MailMarshal for Staff Exchange has stopped the following message: Message: B00021b737.00000000.mml From: xml...@li... To: kohcn@TP.EDU.SG Subject: Fax Message Received The original mail message and its processing log are attached. MailMarshal Rule: Staff to Student & External : Block EXECUTABLE Files If you have any queries, please call CIS Helpdesk at 5933. Email security by CIS Department. |
From: Per N. <per...@us...> - 2004-07-31 09:40:19
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25659/xmldb.org/xapi/src/api/org/xmldb/api/tests Modified Files: ResourceTest.java Added Files: StringContentHandler.java Log Message: fixed equals testing of XML Strings. --- NEW FILE: StringContentHandler.java --- package org.xmldb.api.tests; import org.xml.sax.helpers.DefaultHandler; import org.xml.sax.Attributes; import org.xml.sax.SAXException; /* * The XML:DB Initiative Software License, Version 1.0 * * * Copyright (c) 2000-2003 The XML:DB Initiative. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * XML:DB Initiative (http://www.xmldb.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The name "XML:DB Initiative" must not be used to endorse or * promote products derived from this software without prior written * permission. For written permission, please contact in...@xm.... * * 5. Products derived from this software may not be called "XML:DB", * nor may "XML:DB" appear in their name, without prior written * permission of the XML:DB Initiative. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the XML:DB Initiative. For more information * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ /** * This a a simple content handler that makes it possible * to do equals comparisons with XML strings * @author Per Nyfelt */ public class StringContentHandler extends DefaultHandler { String result = ""; public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException { result = result + "<" + localName; for (int i = 0; i < attributes.getLength(); i++) { result = result + " " + attributes.getLocalName(i) + "='" + attributes.getValue(i) + "'"; } result = result + ">"; } public void endElement(String uri, String localName, String qName) throws SAXException { result = result + "</" + localName + ">"; } public void characters(char ch[], int start, int length) throws SAXException { result = result + new String(ch, start, length); } public String toString() { return result; } } Index: ResourceTest.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/tests/ResourceTest.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ResourceTest.java 27 Jul 2004 20:32:11 -0000 1.2 +++ ResourceTest.java 31 Jul 2004 09:40:10 -0000 1.3 @@ -131,7 +131,12 @@ String result = (String) res.getContent(); assertTrue(result != null); - assertTrue(content.equals(result)); + // the resource could come back as valid XML but with whitespace + String processedContent = compressXMLString(content); + String processedResult = compressXMLString(result); + //System.out.println("processedContent = " + processedContent); + //System.out.println("processedResult = " + processedResult); + assertTrue(processedContent.equals(processedResult)); Node node = res.getContentAsDOM(); assertTrue(node != null); @@ -153,7 +158,9 @@ XMLReader xr = new SAXParser(); ContentHandler handler = res.setContentAsSAX(); xr.setContentHandler(handler); - xr.setErrorHandler((ErrorHandler) handler); + if (handler instanceof ErrorHandler) { + xr.setErrorHandler((ErrorHandler) handler); + } if (content != null) { xr.parse(new InputSource(new StringReader(content))); } @@ -165,6 +172,14 @@ } } + private String compressXMLString(String xml) throws Exception { + XMLReader xr = new SAXParser(); + ContentHandler handler = new StringContentHandler(); + xr.setContentHandler(handler); + xr.parse(new InputSource(new StringReader(xml))); + return handler.toString(); + } + public void testStub() { try { |
From: Per N. <per...@us...> - 2004-07-27 20:32:21
|
Update of /cvsroot/xmldb-org/xapi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14298/xmldb.org/xapi Modified Files: build.xml xapi.iml Log Message: improved test slightly and fixed build issues with dist target Index: xapi.iml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/xapi.iml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- xapi.iml 17 Jul 2004 16:59:38 -0000 1.5 +++ xapi.iml 27 Jul 2004 20:32:13 -0000 1.6 @@ -46,6 +46,15 @@ <SOURCES /> </library> </orderEntry> + <orderEntry type="module-library"> + <library> + <CLASSES> + <root url="jar://$MODULE_DIR$/src/lib/junit.jar!/" /> + </CLASSES> + <JAVADOC /> + <SOURCES /> + </library> + </orderEntry> </component> </module> Index: build.xml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/build.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- build.xml 17 Jul 2004 09:27:36 -0000 1.4 +++ build.xml 27 Jul 2004 20:32:13 -0000 1.5 @@ -57,10 +57,11 @@ <fileset dir="src/api/org"/> </copy> <ant dir="src" target="dist" inheritall="false" /> - <copy tofile="dist/xmldb/xmldb.jar"> - <fileset dir="src/lib/xmldb-api-*.jar"/> + <copy todir="dist/xmldb/" > + <fileset file="src/build/jar/*.jar"/> </copy> - <tar tarfile="../downloads/xmldb-api-${DSTAMP}.tar.gz" compression="gzip" > + <delete file="downloads/xmldb-api-${DSTAMP}.tar.gz" /> + <tar tarfile="downloads/xmldb-api-${DSTAMP}.tar.gz" compression="gzip" > <tarfileset dir="dist" /> </tar> </target> |
From: Per N. <per...@us...> - 2004-07-27 20:32:21
|
Update of /cvsroot/xmldb-org/xapi/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14298/xmldb.org/xapi/src Modified Files: build.xml Log Message: improved test slightly and fixed build issues with dist target Index: build.xml =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/build.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- build.xml 17 Jul 2004 16:59:38 -0000 1.5 +++ build.xml 27 Jul 2004 20:32:12 -0000 1.6 @@ -20,139 +20,144 @@ <project name="xmldb.xapi.api" default="main" basedir="."> - <!-- =================================================================== --> - <!-- Initializes the build process --> - <!-- =================================================================== --> - <!-- default directory structure definitions --> - <property name="root.dir" value="${basedir}"/> - <property name="jar.dir" value="${root.dir}/lib"/> - <property name="src.dir" value="${root.dir}/api"/> - <property name="common.src.dir" value="${root.dir}/common"/> - <property name="build.dir" value="${root.dir}/build"/> - <property name="jar.build.dir" value="${build.dir}/jar"/> - <property name="build.doc" value="${build.dir}/javadoc"/> - <property name="api.build.dir" value="${build.dir}/classes-api"/> - <property name="sdk.build.dir" value="${build.dir}/classes-sdk"/> - <property name="common.build.dir" value="${build.dir}/common"/> - <property name="dist.build.dir" value="${root.dir}/dist/xmldb"/> - - <property name="javadoc.pkgs" value="org.xmldb.*"/> - - <!-- classpath to use within project --> - <path id="project.classpath"> + <!-- =================================================================== --> + <!-- Initializes the build process --> + <!-- =================================================================== --> + <!-- default directory structure definitions --> + <property name="root.dir" value="${basedir}"/> + <property name="jar.dir" value="${root.dir}/lib"/> + <property name="src.dir" value="${root.dir}/api"/> + <property name="common.src.dir" value="${root.dir}/common"/> + <property name="build.dir" value="${root.dir}/build"/> + <property name="jar.build.dir" value="${build.dir}/jar"/> + <property name="build.doc" value="${build.dir}/javadoc"/> + <property name="api.build.dir" value="${build.dir}/classes-api"/> + <property name="sdk.build.dir" value="${build.dir}/classes-sdk"/> + <property name="common.build.dir" value="${build.dir}/common"/> + <property name="dist.build.dir" value="${root.dir}/dist/xmldb"/> - <!-- compiled classes directory --> - <pathelement location="${api.build.dir}"/> - <pathelement location="${sdk.build.dir}"/> + <property name="javadoc.pkgs" value="org.xmldb.*"/> - <!-- all jars in jar directory --> - <fileset dir="${jar.dir}" /> + <!-- classpath to use within project --> + <path id="project.classpath"> - <!-- system property, environment classpath --> - <pathelement path="${java.class.path}"/> - </path> - - <target name="init"> - <tstamp/> - <property name="jarname" value="xmldb-api"/> - <property name="sdk.jarname" value="xmldb-api-sdk"/> - <property name="common.jarname" value="xmldb-common"/> - </target> + <!-- compiled classes directory --> + <pathelement location="${api.build.dir}"/> + <pathelement location="${sdk.build.dir}"/> - <!-- =================================================================== --> - <!-- Prepares the build directory --> - <!-- =================================================================== --> - <target name="prepare" depends="init"> - <mkdir dir="${api.build.dir}"/> - <mkdir dir="${sdk.build.dir}"/> - <mkdir dir="${common.build.dir}"/> - <mkdir dir="${jar.build.dir}"/> - <mkdir dir="${jar.dir}"/> - </target> - - <target name="main" depends="bin-jar, bin-jar-sdk, bin-jar-common"> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XML:DB API sources --> - <!-- =================================================================== --> - <target name="compile-api" depends="prepare"> - <echo message="Compiling XML:DB API - Interfaces"/> - <javac srcdir="${src.dir}" - destdir="${api.build.dir}" - excludes="org/xmldb/api/reference/**, org/xmldb/api/sdk/**, org/xmldb/api/tests/**" - classpathref="project.classpath" /> - <!--classpath refid="project.classpath"/--> - </target> + <!-- all jars in jar directory --> + <fileset dir="${jar.dir}"/> - <target name="bin-jar" depends="prepare, compile-api"> - <jar jarfile="${jar.build.dir}/${jarname}.jar" - basedir="${api.build.dir}"/> - </target> - - <target name="sdk" depends="compile-sdk, bin-jar-sdk"> - </target> - - <target name="compile-sdk" depends="prepare, compile-api"> - <echo message="Compiling XML:DB API - SDK"/> - <javac srcdir="${src.dir}" - destdir="${sdk.build.dir}" - debug="off" - deprecation="off" - excludes="org/xmldb/api/base/**, org/xmldb/api/modules/**"> - <classpath refid="project.classpath"/> - </javac> - </target> - - <target name="bin-jar-sdk" depends="prepare, compile-sdk"> - <jar jarfile="${jar.build.dir}/${sdk.jarname}.jar" - basedir="${sdk.build.dir}" - /> - </target> + <!-- system property, environment classpath --> + <pathelement path="${java.class.path}"/> + </path> + + <target name="init"> + <tstamp/> + <property name="jarname" value="xmldb-api"/> + <property name="sdk.jarname" value="xmldb-api-sdk"/> + <property name="common.jarname" value="xmldb-common"/> + </target> + + <!-- =================================================================== --> + <!-- Prepares the build directory --> + <!-- =================================================================== --> + <target name="prepare" depends="init"> + <mkdir dir="${api.build.dir}"/> + <mkdir dir="${sdk.build.dir}"/> + <mkdir dir="${common.build.dir}"/> + <mkdir dir="${jar.build.dir}"/> + <mkdir dir="${jar.dir}"/> + </target> + + <target name="main" depends="bin-jar, bin-jar-sdk, bin-jar-common"> + </target> + + <!-- =================================================================== --> + <!-- Compiles the XML:DB API sources --> + <!-- =================================================================== --> + <target name="compile-api" depends="prepare"> + <echo message="Compiling XML:DB API - Interfaces"/> + <javac srcdir="${src.dir}" + destdir="${api.build.dir}" + excludes="org/xmldb/api/reference/**, org/xmldb/api/sdk/**, org/xmldb/api/tests/**" + classpathref="project.classpath"/> + <!--classpath refid="project.classpath"/--> + </target> + + <target name="bin-jar" depends="prepare, compile-api"> + <jar jarfile="${jar.build.dir}/${jarname}.jar" + basedir="${api.build.dir}"/> + </target> + + <target name="sdk" depends="compile-sdk, bin-jar-sdk"> + </target> + + <target name="compile-sdk" depends="prepare, compile-api"> + <echo message="Compiling XML:DB API - SDK"/> + <javac srcdir="${src.dir}" + destdir="${sdk.build.dir}" + debug="off" + deprecation="off" + excludes="org/xmldb/api/base/**, org/xmldb/api/modules/**"> + <classpath refid="project.classpath"/> + </javac> + </target> + + <target name="bin-jar-sdk" depends="prepare, compile-sdk"> + <jar jarfile="${jar.build.dir}/${sdk.jarname}.jar" + basedir="${sdk.build.dir}" + /> + </target> <!-- =================================================================== --> <!-- Compiles the XML:DB Common sources --> <!-- =================================================================== --> <target name="compile-common" depends="prepare"> - <echo message="Compiling XML:DB common"/> - <javac srcdir="${common.src.dir}" - destdir="${common.build.dir}" - classpathref="project.classpath" /> - <!--classpath refid="project.classpath"/--> - </target> + <echo message="Compiling XML:DB common"/> + <javac srcdir="${common.src.dir}" + destdir="${common.build.dir}" + classpathref="project.classpath"/> + <!--classpath refid="project.classpath"/--> + </target> - <target name="bin-jar-common" depends="compile-common"> - <jar jarfile="${jar.build.dir}/${common.jarname}.jar" - basedir="${common.build.dir}" - /> - </target> + <target name="bin-jar-common" depends="compile-common"> + <jar jarfile="${jar.build.dir}/${common.jarname}.jar" + basedir="${common.build.dir}" + /> + </target> - <!-- =================================================================== --> - <!-- Tasks to manage execution of tests --> - <!-- =================================================================== --> - <target name="tests" depends="setup"> - <java classpathref="project.class.path" - classname="org.xmldb.api.tests.XMLDBTestSuite" - fork="true"/> - </target> - - <!-- Setup the repository for the tests. --> - <target name="setup"> - <mkdir dir="data/child1/subchild1"/> - <mkdir dir="data/child1/subchild2"/> - <mkdir dir="data/child2/subchild1"/> + <!-- =================================================================== --> + <!-- Compiles all code --> + <!-- =================================================================== --> + <target name="compile" depends="compile-common, compile-api, compile-sdk"/> - <copy todir="data/child1"> - <fileset dir="tests/files" excludes="**/CVS"/> - </copy> - </target> - - <!-- =================================================================== --> - <!-- Build Full API docs including SDK files --> - <!-- =================================================================== --> - <target name="javadoc-full" depends="prepare"> - <delete dir="${build.doc}/full"/> + <!-- =================================================================== --> + <!-- Tasks to manage execution of tests --> + <!-- =================================================================== --> + <target name="tests" depends="setup"> + <java classpathref="project.class.path" + classname="org.xmldb.api.tests.XMLDBTestSuite" + fork="true"/> + </target> + + <!-- Setup the repository for the tests. --> + <target name="setup"> + <mkdir dir="data/child1/subchild1"/> + <mkdir dir="data/child1/subchild2"/> + <mkdir dir="data/child2/subchild1"/> + + <copy todir="data/child1"> + <fileset dir="tests/files" excludes="**/CVS"/> + </copy> + </target> + + <!-- =================================================================== --> + <!-- Build Full API docs including SDK files --> + <!-- =================================================================== --> + <target name="javadoc-full" depends="prepare"> + <delete dir="${build.doc}/full"/> <mkdir dir="${build.doc}/full"/> @@ -171,20 +176,20 @@ </javadoc> - </target> - - <!-- =================================================================== --> - <!-- Build API Specification --> - <!-- =================================================================== --> - <target name="javadoc-spec" depends="prepare"> - <deltree dir="${build.doc}/api"/> - - <mkdir dir="${build.doc}/api"/> + </target> + + <!-- =================================================================== --> + <!-- Build API Specification --> + <!-- =================================================================== --> + <target name="javadoc-spec" depends="prepare"> + <deltree dir="${build.doc}/api"/> + + <mkdir dir="${build.doc}/api"/> <javadoc packagenames="org.xmldb.api, - org.xmldb.api.base, - org.xmldb.api.modules" + org.xmldb.api.base, + org.xmldb.api.modules" sourcepath="${src.dir}" destdir="${build.doc}/api" public="true" @@ -194,54 +199,54 @@ header="<b>XML:DB API</b>" bottom="<font size=2>Copyright (C) <a href=http://xmldb-org.sourceforge.net>XML:DB Initiative</a>. All rights reserved.%lt;/font>" classpathref="project.classpath"/> - </target> - - <!-- =================================================================== --> - <!-- Builds the distribution tar and zips --> - <!-- =================================================================== --> - <target name="dist" depends="main, sdk, javadoc-full, setup, clean-build"> - - <mkdir dir="${dist.build.dir}"/> - - <copy todir="${dist.build.dir}"> - <fileset dir="." excludes="**/CVS, **/classes-common/**, **/data/**, **/dist/**"/> - </copy> - - <!-- finally build the archives --> - <antcall target="dist-archive"/> - </target> - - <!-- - Build the dist jar and zip archive files - --> - <target name="dist-archive" depends="init"> - <property name="distrib.file" value="${jarname}-${DSTAMP}"/> - - <tar tarfile="${distrib.file}.tar" basedir="${dist.build.dir}/.."/> - <gzip zipfile="../downloads/${distrib.file}.tar.gz" src="${distrib.file}.tar"/> - <delete file="${distrib.file}.tar"/> - - <!--zip zipfile="${distrib.file}.zip" basedir="${distrib.file}"/--> - </target> - - <!-- =================================================================== --> - <!-- Cleans everything --> - <!-- =================================================================== --> - <target name="clean" depends="init, clean-build, clean-jar"> - <delete dir="${dist.build.dir}"/> - <delete dir="data"/> - </target> + </target> + + <!-- =================================================================== --> + <!-- Builds the distribution tar and zips --> + <!-- =================================================================== --> + <target name="dist" depends="clean-build, main, sdk, javadoc-full, setup"> + + <mkdir dir="${dist.build.dir}"/> + + <copy todir="${dist.build.dir}"> + <fileset dir="." excludes="**/CVS, **/classes-common/**, **/data/**, **/dist/**"/> + </copy> + + <!-- finally build the archives --> + <antcall target="dist-archive"/> + </target> + + <!-- + Build the dist jar and zip archive files + --> + <target name="dist-archive" depends="init"> + <property name="distrib.file" value="${jarname}-${DSTAMP}"/> + + <tar tarfile="${distrib.file}.tar" basedir="${dist.build.dir}/.."/> + <gzip zipfile="../downloads/${distrib.file}.tar.gz" src="${distrib.file}.tar"/> + <delete file="${distrib.file}.tar"/> + + <!--zip zipfile="${distrib.file}.zip" basedir="${distrib.file}"/--> + </target> + + <!-- =================================================================== --> + <!-- Cleans everything --> + <!-- =================================================================== --> + <target name="clean" depends="init, clean-build, clean-jar"> + <delete dir="${dist.build.dir}"/> + <delete dir="data"/> + </target> + + <target name="clean-build"> + <delete dir="${build.dir}"/> + <delete dir="${sdk.build.dir}"/> + <delete dir="${common.build.dir}"/> + </target> + + <target name="clean-jar"> + <delete file="${jar.dir}/${jarname}.jar"/> + <delete file="${jar.dir}/${sdk.jarname}.jar"/> + <delete file="${jar.dir}/${common.jarname}.jar"/> + </target> - <target name="clean-build"> - <delete dir="${build.dir}"/> - <delete dir="${sdk.build.dir}"/> - <delete dir="${common.build.dir}"/> - </target> - - <target name="clean-jar"> - <delete file="${jar.dir}/${jarname}.jar"/> - <delete file="${jar.dir}/${sdk.jarname}.jar"/> - <delete file="${jar.dir}/${common.jarname}.jar"/> - </target> - </project> |
From: Per N. <per...@us...> - 2004-07-27 20:32:21
|
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14298/xmldb.org/xapi/src/api/org/xmldb/api/tests Modified Files: ResourceTest.java Log Message: improved test slightly and fixed build issues with dist target Index: ResourceTest.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/tests/ResourceTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ResourceTest.java 30 May 2004 11:54:45 -0000 1.1 +++ ResourceTest.java 27 Jul 2004 20:32:11 -0000 1.2 @@ -53,104 +53,123 @@ * on the XML:DB Initiative, please see <http://www.xmldb.org/>. */ -import java.io.*; - import junit.framework.*; +import org.apache.xerces.parsers.SAXParser; +import org.w3c.dom.Node; +import org.xml.sax.ContentHandler; +import org.xml.sax.ErrorHandler; +import org.xml.sax.InputSource; +import org.xml.sax.XMLReader; +import org.xmldb.api.base.Resource; +import org.xmldb.api.base.XMLDBException; +import org.xmldb.api.modules.BinaryResource; +import org.xmldb.api.modules.XMLResource; -import org.xmldb.api.modules.*; - -import org.w3c.dom.*; -import org.xml.sax.*; -import org.apache.xerces.parsers.*; +import java.io.StringReader; public class ResourceTest extends XMLDBTestCase { - - public ResourceTest(String name) { - super(name); - } - - public static Test suite() { - return new TestSuite(ResourceTest.class); - } - - public void testBinaryResource() { - try { - if ( supportsBinary ) { - byte[] content = new byte[3]; - content[0] = 0x1; - content[1] = 0x2; - content[2] = 0x3; - BinaryResource res = - (BinaryResource) col.createResource("test", BinaryResource.RESOURCE_TYPE); - assertTrue(res.getId().equals("test")); + + private static final String resId = "test"; + + public ResourceTest(String name) { + super(name); + } + + public static Test suite() { + return new TestSuite(ResourceTest.class); + } + + private void cleanupExistingResource() throws XMLDBException { + // cleanup from lefovers due to previous failures etc. + Resource temp = col.getResource(resId); + if (temp != null) { + col.removeResource(temp); + } + } + + public void testBinaryResource() { + try { + if (supportsBinary) { + byte[] content = new byte[3]; + content[0] = 0x1; + content[1] = 0x2; + content[2] = 0x3; + + cleanupExistingResource(); + + BinaryResource res = + (BinaryResource) col.createResource(resId, BinaryResource.RESOURCE_TYPE); + assertTrue(res.getId().equals(resId)); + assertTrue(res.getParentCollection() == col); + + res.setContent(content); + byte[] result = (byte[]) res.getContent(); + + assertTrue(result != null); + assertTrue(result[0] == 0x1); + assertTrue(result[1] == 0x2); + assertTrue(result[2] == 0x3); + } + } catch (Exception e) { + fail(e.getMessage()); + } + } + + public void testXMLResource() { + try { + String content = "<?xml version=\"1.0\"?><tag1><tag2>value</tag2></tag1>"; + + cleanupExistingResource(); + + XMLResource res = + (XMLResource) col.createResource(resId, XMLResource.RESOURCE_TYPE); + assertTrue(res.getId().equals(resId)); + assertTrue(res.getId().equals(res.getDocumentId())); assertTrue(res.getParentCollection() == col); - - res.setContent(content); - byte[] result = (byte[]) res.getContent(); - + + res.setContent(content); + String result = (String) res.getContent(); + assertTrue(result != null); - assertTrue(result[0] == 0x1); - assertTrue(result[1] == 0x2); - assertTrue(result[2] == 0x3); - } - } catch (Exception e) { - fail( e.getMessage( ) ); - } - } - - public void testXMLResource() { - try { - String content = "<?xml version=\"1.0\"?><tag1><tag2>value</tag2></tag1>"; - - XMLResource res = - (XMLResource) col.createResource("test", XMLResource.RESOURCE_TYPE); - assertTrue(res.getId().equals("test")); - assertTrue(res.getId().equals(res.getDocumentId())); - assertTrue(res.getParentCollection() == col); - - res.setContent(content); - String result = (String) res.getContent(); - - assertTrue(result != null); - assertTrue(content.equals(result)); + assertTrue(content.equals(result)); - Node node = res.getContentAsDOM(); - assertTrue(node != null); - - res.setContentAsDOM(node); - Node node2 = res.getContentAsDOM(); - assertTrue(node2 != null); - - // TODO: better validate DOM handling - // Test creation via DOM - // Test setContentAsDOM INVALID_RESOURCE exception - // Test setContentAsDOM WRONG_CONTENT_TYPE exception - - // TODO: add SAX validation - content = "<?xml version=\"1.0\"?><tag1 name=\"tag1\">"; - content += "<tag2 name=\"tag2\" xmlns:pre=\"http:///pre\">"; - content += "<pre:tag3>value& Ꭶ </pre:tag3>\n"; - content += "</tag2></tag1><?pi-test value=\"none\"?>"; - XMLReader xr = new SAXParser(); - ContentHandler handler = res.setContentAsSAX(); - xr.setContentHandler(handler); - xr.setErrorHandler((ErrorHandler) handler); - if (content != null) { - xr.parse(new InputSource(new StringReader(content))); - } - // TODO: turn this into a real test case. - assertNotNull(res.getContent()); - } catch (Exception e) { - e.printStackTrace(); - fail( e.getMessage( ) ); - } - } - - public void testStub() { - try { - - } catch (Exception e) { - fail( e.getMessage( ) ); - } - } + Node node = res.getContentAsDOM(); + assertTrue(node != null); + + res.setContentAsDOM(node); + Node node2 = res.getContentAsDOM(); + assertTrue(node2 != null); + + // TODO: better validate DOM handling + // Test creation via DOM + // Test setContentAsDOM INVALID_RESOURCE exception + // Test setContentAsDOM WRONG_CONTENT_TYPE exception + + // TODO: add SAX validation + content = "<?xml version=\"1.0\"?><tag1 name=\"tag1\">"; + content += "<tag2 name=\"tag2\" xmlns:pre=\"http:///pre\">"; + content += "<pre:tag3>value& Ꭶ </pre:tag3>\n"; + content += "</tag2></tag1><?pi-test value=\"none\"?>"; + XMLReader xr = new SAXParser(); + ContentHandler handler = res.setContentAsSAX(); + xr.setContentHandler(handler); + xr.setErrorHandler((ErrorHandler) handler); + if (content != null) { + xr.parse(new InputSource(new StringReader(content))); + } + // TODO: turn this into a real test case. + assertNotNull(res.getContent()); + } catch (Exception e) { + e.printStackTrace(); + fail(e.getMessage()); + } + } + + public void testStub() { + try { + + } catch (Exception e) { + fail(e.getMessage()); + } + } } |
From: Per N. <per...@us...> - 2004-07-25 17:08:30
|
Update of /cvsroot/xmldb-org/xapi/src/common/org/xmldb/common/xml/queries In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13717/xmldb.org/xapi/src/common/org/xmldb/common/xml/queries Modified Files: XUpdateQueryFactory.java Log Message: added constant names to match IDL spec (and strong type coding possible) Index: XUpdateQueryFactory.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/common/org/xmldb/common/xml/queries/XUpdateQueryFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XUpdateQueryFactory.java 30 May 2004 11:54:45 -0000 1.1 +++ XUpdateQueryFactory.java 25 Jul 2004 17:07:52 -0000 1.2 @@ -63,13 +63,15 @@ public abstract class XUpdateQueryFactory { + public static final String FACTORY_KEY = "org.xmldb.common.xml.queries.XUpdateQueryFactory"; + public XUpdateQueryFactory() { } public static XUpdateQueryFactory newInstance() { - String factoryName = System.getProperty("org.xmldb.common.xml.queries.XUpdateQueryFactory", - "org.xmldb.lexus.XUpdateQueryFactoryImpl"); + String factoryName = System.getProperty(FACTORY_KEY, + "org.xmldb.xupdate.lexus.XUpdateQueryFactoryImpl"); XUpdateQueryFactory factory = null; |
Update of /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13717/xmldb.org/xapi/src/api/org/xmldb/api/modules Modified Files: CollectionManagementService.java TransactionService.java XPathQueryService.java XQueryService.java XUpdateQueryService.java Log Message: added constant names to match IDL spec (and strong type coding possible) Index: XPathQueryService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XPathQueryService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XPathQueryService.java 12 Jun 2004 20:39:17 -0000 1.2 +++ XPathQueryService.java 25 Jul 2004 17:07:52 -0000 1.3 @@ -61,7 +61,9 @@ * single XML <code>Resource</code> stored in the <code>Collection</code>. */ public interface XPathQueryService extends Service { - + + public static final String SERVICE_NAME = "XPathQueryService"; + /** * Sets a namespace mapping in the internal namespace map used to evaluate * queries. If <code>prefix</code> is null or empty the default namespace is Index: TransactionService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/TransactionService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TransactionService.java 12 Jun 2004 20:39:17 -0000 1.2 +++ TransactionService.java 25 Jul 2004 17:07:52 -0000 1.3 @@ -61,6 +61,8 @@ * <b>Note: This interface needs much better definition</b> */ public interface TransactionService extends Service { + + public static final String SERVICE_NAME = "TransactionService"; /** * Begin the transaction * Index: XQueryService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XQueryService.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- XQueryService.java 12 Jun 2004 20:39:17 -0000 1.1 +++ XQueryService.java 25 Jul 2004 17:07:52 -0000 1.2 @@ -58,6 +58,8 @@ public interface XQueryService extends Service { + public static final String SERVICE_NAME = "XQueryService"; + /** * Sets a namespace mapping in the internal namespace map used to evaluate * queries. If <code>prefix</code> is null or empty the default namespace is Index: XUpdateQueryService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/XUpdateQueryService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XUpdateQueryService.java 12 Jun 2004 20:39:17 -0000 1.2 +++ XUpdateQueryService.java 25 Jul 2004 17:07:52 -0000 1.3 @@ -61,6 +61,9 @@ * single document stored in a collection. */ public interface XUpdateQueryService extends Service { + + public static final String SERVICE_NAME = "XUpdateQueryService"; + /** * Runs a set of XUpdate operations against the collection. All selected * documents are to be updated and stored back to the repository. Index: CollectionManagementService.java =================================================================== RCS file: /cvsroot/xmldb-org/xapi/src/api/org/xmldb/api/modules/CollectionManagementService.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- CollectionManagementService.java 12 Jun 2004 20:39:17 -0000 1.2 +++ CollectionManagementService.java 25 Jul 2004 17:07:52 -0000 1.3 @@ -62,6 +62,8 @@ * to implement this basic functionality. */ public interface CollectionManagementService extends Service { + + public static final String SERVICE_NAME = "CollectionManagementService"; /** * Creates a new <code>Collection</code> in the database. The default * configuration of the database is determined by the implementer. The |