You can subscribe to this list here.
| 2004 |
Jan
|
Feb
|
Mar
(57) |
Apr
(103) |
May
(164) |
Jun
(139) |
Jul
(173) |
Aug
(196) |
Sep
(221) |
Oct
(333) |
Nov
(214) |
Dec
(88) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2005 |
Jan
(163) |
Feb
(165) |
Mar
(98) |
Apr
(93) |
May
(199) |
Jun
(118) |
Jul
(200) |
Aug
(212) |
Sep
(185) |
Oct
(297) |
Nov
(437) |
Dec
(272) |
| 2006 |
Jan
(542) |
Feb
(329) |
Mar
(267) |
Apr
(332) |
May
(267) |
Jun
(130) |
Jul
(161) |
Aug
(348) |
Sep
(166) |
Oct
(305) |
Nov
(173) |
Dec
(173) |
| 2007 |
Jan
(199) |
Feb
(118) |
Mar
(133) |
Apr
(200) |
May
(208) |
Jun
(146) |
Jul
(198) |
Aug
(146) |
Sep
(187) |
Oct
(182) |
Nov
(181) |
Dec
(83) |
| 2008 |
Jan
(252) |
Feb
(124) |
Mar
(124) |
Apr
(101) |
May
(143) |
Jun
(122) |
Jul
(129) |
Aug
(60) |
Sep
(80) |
Oct
(89) |
Nov
(54) |
Dec
(112) |
| 2009 |
Jan
(88) |
Feb
(145) |
Mar
(105) |
Apr
(164) |
May
(123) |
Jun
(154) |
Jul
(374) |
Aug
(341) |
Sep
(219) |
Oct
(137) |
Nov
(373) |
Dec
(240) |
| 2010 |
Jan
(197) |
Feb
(270) |
Mar
(253) |
Apr
(150) |
May
(102) |
Jun
(51) |
Jul
(300) |
Aug
(512) |
Sep
(254) |
Oct
(258) |
Nov
(288) |
Dec
(143) |
| 2011 |
Jan
(238) |
Feb
(179) |
Mar
(253) |
Apr
(332) |
May
(248) |
Jun
(255) |
Jul
(216) |
Aug
(282) |
Sep
(146) |
Oct
(77) |
Nov
(86) |
Dec
(69) |
| 2012 |
Jan
(172) |
Feb
(234) |
Mar
(229) |
Apr
(101) |
May
(212) |
Jun
(267) |
Jul
(129) |
Aug
(210) |
Sep
(239) |
Oct
(271) |
Nov
(368) |
Dec
(220) |
| 2013 |
Jan
(179) |
Feb
(155) |
Mar
(59) |
Apr
(47) |
May
(99) |
Jun
(158) |
Jul
(185) |
Aug
(16) |
Sep
(16) |
Oct
(7) |
Nov
(20) |
Dec
(12) |
| 2014 |
Jan
(21) |
Feb
(17) |
Mar
(18) |
Apr
(13) |
May
(27) |
Jun
(15) |
Jul
(19) |
Aug
(22) |
Sep
(30) |
Oct
(16) |
Nov
(19) |
Dec
(16) |
| 2015 |
Jan
(14) |
Feb
(24) |
Mar
(33) |
Apr
(41) |
May
(14) |
Jun
(80) |
Jul
(53) |
Aug
(8) |
Sep
(7) |
Oct
(15) |
Nov
(13) |
Dec
(2) |
| 2016 |
Jan
(22) |
Feb
(12) |
Mar
(30) |
Apr
(6) |
May
(33) |
Jun
(16) |
Jul
(8) |
Aug
(20) |
Sep
(12) |
Oct
(18) |
Nov
(12) |
Dec
(11) |
| 2017 |
Jan
(24) |
Feb
(26) |
Mar
(47) |
Apr
(23) |
May
(19) |
Jun
(14) |
Jul
(28) |
Aug
(30) |
Sep
(17) |
Oct
|
Nov
|
Dec
|
| 2019 |
Jan
(1) |
Feb
(73) |
Mar
(90) |
Apr
(42) |
May
(116) |
Jun
(90) |
Jul
(127) |
Aug
(103) |
Sep
(56) |
Oct
(42) |
Nov
(95) |
Dec
(58) |
| 2020 |
Jan
(102) |
Feb
(31) |
Mar
(93) |
Apr
(60) |
May
(57) |
Jun
(45) |
Jul
(29) |
Aug
(32) |
Sep
(44) |
Oct
(86) |
Nov
(51) |
Dec
(71) |
| 2021 |
Jan
(44) |
Feb
(25) |
Mar
(78) |
Apr
(130) |
May
(64) |
Jun
(74) |
Jul
(21) |
Aug
(64) |
Sep
(40) |
Oct
(43) |
Nov
(21) |
Dec
(99) |
| 2022 |
Jan
(154) |
Feb
(64) |
Mar
(45) |
Apr
(95) |
May
(62) |
Jun
(48) |
Jul
(73) |
Aug
(37) |
Sep
(71) |
Oct
(27) |
Nov
(40) |
Dec
(65) |
| 2023 |
Jan
(89) |
Feb
(130) |
Mar
(124) |
Apr
(50) |
May
(93) |
Jun
(46) |
Jul
(45) |
Aug
(68) |
Sep
(62) |
Oct
(71) |
Nov
(108) |
Dec
(82) |
| 2024 |
Jan
(53) |
Feb
(76) |
Mar
(64) |
Apr
(75) |
May
(36) |
Jun
(54) |
Jul
(98) |
Aug
(137) |
Sep
(58) |
Oct
(177) |
Nov
(84) |
Dec
(52) |
| 2025 |
Jan
(70) |
Feb
(53) |
Mar
(72) |
Apr
(47) |
May
(88) |
Jun
(49) |
Jul
(86) |
Aug
(51) |
Sep
(65) |
Oct
(91) |
Nov
(18) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
1
(17) |
2
(17) |
3
(5) |
4
(6) |
5
(12) |
|
6
(27) |
7
(2) |
8
(8) |
9
(16) |
10
(9) |
11
(5) |
12
(22) |
|
13
(9) |
14
|
15
(1) |
16
(2) |
17
(9) |
18
(8) |
19
(3) |
|
20
(5) |
21
(6) |
22
(1) |
23
(3) |
24
(9) |
25
|
26
(5) |
|
27
(5) |
28
(6) |
29
(27) |
30
(7) |
31
(1) |
|
|
|
From: <di...@us...> - 2011-03-31 12:56:45
|
Revision: 14064
http://exist.svn.sourceforge.net/exist/?rev=14064&view=rev
Author: dizzzz
Date: 2011-03-31 12:56:39 +0000 (Thu, 31 Mar 2011)
Log Message:
-----------
[ignore] ignore expath jar file
Property Changed:
----------------
stable/eXist-1.4.x/lib/extensions/
Property changes on: stable/eXist-1.4.x/lib/extensions
___________________________________________________________________
Modified: svn:ignore
- exist-modules.jar
exist-ngram-module.jar
exist-spatial-module.jar
exist-jmx.jar
exist-lucene-module.jar
exist-versioning.jar
exist-debuggee.jar
xprocxq.jar
exist-xqdoc.jar
exist-xslt.jar
exist-webdav-milton.jar
+ exist-debuggee.jar
exist-expath-20100109.jar
exist-jmx.jar
exist-lucene-module.jar
exist-modules.jar
exist-ngram-module.jar
exist-spatial-module.jar
exist-versioning.jar
exist-webdav-milton.jar
exist-xqdoc.jar
exist-xslt.jar
xprocxq.jar
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Pierrick B. <pie...@fr...> - 2011-03-30 16:59:22
|
Hi, Le 30/03/2011 11:11, Tobi Krebs a écrit : > Mmmh sorry for breaking the build. > > I tried to reproduce the error but so far without luck. > > What i tried is: > > ./build.sh clean clean-all installer > > Which produces an working installer. > > Am i running the wrong target? errr... ./build.sh test would be more relevant, no ? Cheers, p.b. |
|
From: <del...@us...> - 2011-03-30 12:00:32
|
Revision: 14063
http://exist.svn.sourceforge.net/exist/?rev=14063&view=rev
Author: deliriumsky
Date: 2011-03-30 12:00:25 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
[bugfix] Corrected the code, I had misunderstood the RFC for the MAIL FROM and RCPT TO addresses. Backport of rev 14060 from trunk
Revision Links:
--------------
http://exist.svn.sourceforge.net/exist/?rev=14060&view=rev
Modified Paths:
--------------
stable/eXist-1.4.x/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java
Modified: stable/eXist-1.4.x/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java
===================================================================
--- stable/eXist-1.4.x/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java 2011-03-30 11:14:00 UTC (rev 14062)
+++ stable/eXist-1.4.x/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java 2011-03-30 12:00:25 UTC (rev 14063)
@@ -358,12 +358,12 @@
if(mail.getFrom().indexOf("<") != -1)
{
//yes, just send the email address
- smtpOut.println("MAIL FROM: " + mail.getFrom().substring(mail.getFrom().indexOf("<") + 1, mail.getFrom().indexOf(">")));
+ smtpOut.println("MAIL FROM:<" + mail.getFrom().substring(mail.getFrom().indexOf("<") + 1, mail.getFrom().indexOf(">")) + ">");
}
else
{
//no, doesnt include a name so send the email address
- smtpOut.println("MAIL FROM: " + mail.getFrom());
+ smtpOut.println("MAIL FROM:<" + mail.getFrom() + ">");
}
smtpOut.flush();
@@ -388,11 +388,11 @@
if(((String)allrecipients.get(x)).indexOf("<") != -1)
{
//yes, just send the email address
- smtpOut.println("RCPT TO: " + ((String)allrecipients.get(x)).substring(((String)allrecipients.get(x)).indexOf("<") + 1, ((String)allrecipients.get(x)).indexOf(">")));
+ smtpOut.println("RCPT TO:<" + ((String)allrecipients.get(x)).substring(((String)allrecipients.get(x)).indexOf("<") + 1, ((String)allrecipients.get(x)).indexOf(">")) + ">");
}
else
{
- smtpOut.println("RCPT TO: " + ((String)allrecipients.get(x)));
+ smtpOut.println("RCPT TO:<" + ((String)allrecipients.get(x)) + ">");
}
smtpOut.flush();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zw...@us...> - 2011-03-30 11:14:06
|
Revision: 14062
http://exist.svn.sourceforge.net/exist/?rev=14062&view=rev
Author: zwobit
Date: 2011-03-30 11:14:00 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
[betterFORM-extension] :
- recompiled jar with java 1.5
Modified Paths:
--------------
stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterform.jar
Modified: stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterform.jar
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jen...@us...> - 2011-03-30 09:51:15
|
Revision: 14061
http://exist.svn.sourceforge.net/exist/?rev=14061&view=rev
Author: jenspetersen
Date: 2011-03-30 09:51:09 +0000 (Wed, 30 Mar 2011)
Log Message:
-----------
Clicking "Remove" activated/installed the app again. "Remove" still only removes the app from the list - it does not delete it from db.
Modified Paths:
--------------
trunk/eXist/webapp/admin/repo.xqm
Modified: trunk/eXist/webapp/admin/repo.xqm
===================================================================
--- trunk/eXist/webapp/admin/repo.xqm 2011-03-29 22:04:28 UTC (rev 14060)
+++ trunk/eXist/webapp/admin/repo.xqm 2011-03-30 09:51:09 UTC (rev 14061)
@@ -229,7 +229,7 @@
else (
<a href="?panel=repo&action=activate&name={$package-name}&package={$pkg-name}&type={$type}">Install</a>,
<span> | </span>,
- <a href="?panel=repo&action=activate&name={$package-name}">Remove</a>
+ <a href="?panel=repo&action=remove&name={$package-name}">Remove</a>
)
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Tobi K. <tob...@be...> - 2011-03-30 09:11:53
|
On Tuesday 29 March 2011 20:56:08 Pierrick Brihaye wrote: > Hi, Hello > This one broke the build... see > http://serengeti.friprogramvarusyndikatet.se:8111/viewLog.html?buildId=5421 > &tab=buildChangesDiv&buildTypeId=bt9 Mmmh sorry for breaking the build. I tried to reproduce the error but so far without luck. What i tried is: ./build.sh clean clean-all installer Which produces an working installer. Am i running the wrong target? I used java 1.6 and izpack-4.3.3. > > Cheers, > > p.b. Bye Tobi |
|
From: Adam R. <ada...@go...> - 2011-03-30 07:50:49
|
2011/3/30 Jens Østergaard Petersen <oe...@gm...>: > Hi Adam, > > You have been the only one who has committed revisions to sharing.xqm. > > <http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/webapp/biblio/mods/apps/mods/search/sharing.xqm?view=log&pathrev=13378> > <http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm?view=log&pathrev=14044> > > At 13833 Wolfgang moved the file to repo, but he moved your 13286, as he should. > > If you have fixed it before, you probably forgot to commit it? Well I guess that is indeed possible ;-) > Jens > > On Mar 29, 2011, at 1:01 PM, del...@us... wrote: > >> Revision: 14044 >> http://exist.svn.sourceforge.net/exist/?rev=14044&view=rev >> Author: deliriumsky >> Date: 2011-03-29 11:01:13 +0000 (Tue, 29 Mar 2011) >> >> Log Message: >> ----------- >> Fixed inequality comparrisons and cardinality. Again I am sure I have fixed this one in the past?!? >> >> Modified Paths: >> -------------- >> trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm >> >> Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm >> =================================================================== >> --- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 10:50:16 UTC (rev 14043) >> +++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 11:01:13 UTC (rev 14044) >> @@ -147,7 +147,7 @@ >> else() >> }; >> >> -declare function sharing:update-group($group-name as xs:string, $group-members as xs:string) as xs:string >> +declare function sharing:update-group($group-name as xs:string, $group-members as xs:string+) as xs:string >> { >> let $group := fn:collection($config:groups-collection)/group:group[group:name eq $group-name], >> $group-id := $group/@id, >> @@ -155,7 +155,7 @@ >> $existing-group-members := security:get-group-members($system-group), >> $group-modifications := ( >> for $existing-group-member in $existing-group-members return >> - if(fn:contains($group-members, $existing-group-member))then >> + if($group-members = $existing-group-member)then >> ( >> (: user is in both lists, do nothing :) >> ) >> @@ -170,7 +170,7 @@ >> ) >> , >> for $group-member in $group-members return >> - if(fn:contains($existing-group-members, $group-member))then >> + if($existing-group-members = $group-member)then >> ( >> (: user is in both lists, do nothing :) >> ) >> >> >> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >> >> ------------------------------------------------------------------------------ >> Enable your software for Intel(R) Active Management Technology to meet the >> growing manageability and security demands of your customers. Businesses >> are taking advantage of Intel(R) vPro (TM) technology - will your software >> be a part of the solution? Download the Intel(R) Manageability Checker >> today! http://p.sf.net/sfu/intel-dev2devmar >> _______________________________________________ >> Exist-commits mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-commits > > -- Adam Retter skype: adam.retter tweet: adamretter http://www.adamretter.org.uk |
|
From: Jens Ø. P. <oe...@gm...> - 2011-03-30 07:34:05
|
Hi Adam, You have been the only one who has committed revisions to sharing.xqm. <http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/webapp/biblio/mods/apps/mods/search/sharing.xqm?view=log&pathrev=13378> <http://exist.svn.sourceforge.net/viewvc/exist/trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm?view=log&pathrev=14044> At 13833 Wolfgang moved the file to repo, but he moved your 13286, as he should. If you have fixed it before, you probably forgot to commit it? Jens On Mar 29, 2011, at 1:01 PM, del...@us... wrote: > Revision: 14044 > http://exist.svn.sourceforge.net/exist/?rev=14044&view=rev > Author: deliriumsky > Date: 2011-03-29 11:01:13 +0000 (Tue, 29 Mar 2011) > > Log Message: > ----------- > Fixed inequality comparrisons and cardinality. Again I am sure I have fixed this one in the past?!? > > Modified Paths: > -------------- > trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm > > Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm > =================================================================== > --- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 10:50:16 UTC (rev 14043) > +++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 11:01:13 UTC (rev 14044) > @@ -147,7 +147,7 @@ > else() > }; > > -declare function sharing:update-group($group-name as xs:string, $group-members as xs:string) as xs:string > +declare function sharing:update-group($group-name as xs:string, $group-members as xs:string+) as xs:string > { > let $group := fn:collection($config:groups-collection)/group:group[group:name eq $group-name], > $group-id := $group/@id, > @@ -155,7 +155,7 @@ > $existing-group-members := security:get-group-members($system-group), > $group-modifications := ( > for $existing-group-member in $existing-group-members return > - if(fn:contains($group-members, $existing-group-member))then > + if($group-members = $existing-group-member)then > ( > (: user is in both lists, do nothing :) > ) > @@ -170,7 +170,7 @@ > ) > , > for $group-member in $group-members return > - if(fn:contains($existing-group-members, $group-member))then > + if($existing-group-members = $group-member)then > ( > (: user is in both lists, do nothing :) > ) > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Enable your software for Intel(R) Active Management Technology to meet the > growing manageability and security demands of your customers. Businesses > are taking advantage of Intel(R) vPro (TM) technology - will your software > be a part of the solution? Download the Intel(R) Manageability Checker > today! http://p.sf.net/sfu/intel-dev2devmar > _______________________________________________ > Exist-commits mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-commits |
|
From: <del...@us...> - 2011-03-29 22:04:35
|
Revision: 14060
http://exist.svn.sourceforge.net/exist/?rev=14060&view=rev
Author: deliriumsky
Date: 2011-03-29 22:04:28 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[bugfix] Corrected the code, I had misunderstood the RFC for the MAIL FROM and RCPT TO addresses
Modified Paths:
--------------
trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java
Modified: trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java
===================================================================
--- trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java 2011-03-29 21:43:46 UTC (rev 14059)
+++ trunk/eXist/extensions/modules/src/org/exist/xquery/modules/mail/SendEmailFunction.java 2011-03-29 22:04:28 UTC (rev 14060)
@@ -456,12 +456,12 @@
if(mail.getFrom().indexOf("<") != -1)
{
//yes, just send the email address
- smtpOut.println("MAIL FROM: " + mail.getFrom().substring(mail.getFrom().indexOf("<") + 1, mail.getFrom().indexOf(">")));
+ smtpOut.println("MAIL FROM:<" + mail.getFrom().substring(mail.getFrom().indexOf("<") + 1, mail.getFrom().indexOf(">")) + ">");
}
else
{
//no, doesnt include a name so send the email address
- smtpOut.println("MAIL FROM: " + mail.getFrom());
+ smtpOut.println("MAIL FROM:<" + mail.getFrom() + ">");
}
smtpOut.flush();
@@ -486,11 +486,11 @@
if(((String)allrecipients.get(x)).indexOf("<") != -1)
{
//yes, just send the email address
- smtpOut.println("RCPT TO: " + ((String)allrecipients.get(x)).substring(((String)allrecipients.get(x)).indexOf("<") + 1, ((String)allrecipients.get(x)).indexOf(">")));
+ smtpOut.println("RCPT TO:<" + ((String)allrecipients.get(x)).substring(((String)allrecipients.get(x)).indexOf("<") + 1, ((String)allrecipients.get(x)).indexOf(">")) + ">");
}
else
{
- smtpOut.println("RCPT TO: " + ((String)allrecipients.get(x)));
+ smtpOut.println("RCPT TO:<" + ((String)allrecipients.get(x)) + ">");
}
smtpOut.flush();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 21:43:52
|
Revision: 14059
http://exist.svn.sourceforge.net/exist/?rev=14059&view=rev
Author: deliriumsky
Date: 2011-03-29 21:43:46 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Working towards group removal
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/search.xql
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm
trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql 2011-03-29 21:42:27 UTC (rev 14058)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql 2011-03-29 21:43:46 UTC (rev 14059)
@@ -51,6 +51,14 @@
<status id="removed">{$collection}</status>
};
+declare function op:remove-group($groupId as xs:string) as element(status) {
+ let $result := sharing:remove-group($groupId) return
+ if($result)then
+ <status id="removed">{$groupId}</status>
+ else
+ <status>invalid permissions</status>
+};
+
declare function op:update-collection-sharing($collection as xs:string, $sharing-collection-with as xs:string*, $group-list as xs:string?, $group-member as xs:string*, $group-sharing-permissions as xs:string*, $other-sharing-permissions as xs:string*) as element(status) {
(: other :)
@@ -193,29 +201,33 @@
};
declare function op:get-sharing-group-members($groupId as xs:string) as element(members){
- <members group-id="{$groupId}">
- <owner>{element {sharing:is-group-owner($groupId, security:get-user-credential-from-session()[1])} {""}}</owner>
- {
- for $group-member in sharing:get-group-members($groupId) return
- <member>{$group-member}</member>
- }
- </members>
+ let $user := security:get-user-credential-from-session()[1] return
+
+ <members group-id="{$groupId}" owner="{sharing:is-group-owner($groupId, $user)}">
+ <owner>{element {sharing:is-group-owner($groupId, security:get-user-credential-from-session()[1])} {""}}</owner>
+ {
+ for $group-member in sharing:get-group-members($groupId) return
+ <member>{$group-member}</member>
+ }
+ </members>
};
declare function op:get-groups($collection as xs:string) as element(groups) {
<group:groups>
{
- for $group in sharing:get-users-groups(security:get-user-credential-from-session()[1]) return
- element group:group {
- $group/@*,
- if($group/group:system/group:group eq security:get-group($collection))then
- (
- attribute collection { $collection },
- for $member in sharing:get-group-members($group/@id) return
- <group:member>{$member}</group:member>
- )else(),
- $group/child::node()
- }
+ let $user := security:get-user-credential-from-session()[1] return
+ for $group in sharing:get-users-groups($user) return
+ element group:group {
+ $group/@*,
+ if($group/group:system/group:group eq security:get-group($collection))then
+ (
+ attribute collection { $collection },
+ attribute owner { sharing:is-group-owner($group/@id, $user) },
+ for $member in sharing:get-group-members($group/@id) return
+ <group:member>{$member}</group:member>
+ )else(),
+ $group/child::node()
+ }
}
</group:groups>
};
@@ -284,5 +296,7 @@
op:move-resource(request:get-parameter("resource",()), request:get-parameter("path",()))
else if($action eq "get-collection-sharing")then
op:get-collection-sharing($collection)
+ else if($action eq "remove-group")then
+ op:remove-group(request:get-parameter("groupId",()))
else
op:unknown-action($action)
\ No newline at end of file
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/search.xql
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/search.xql 2011-03-29 21:42:27 UTC (rev 14058)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/search.xql 2011-03-29 21:43:46 UTC (rev 14059)
@@ -787,6 +787,7 @@
)
}
</select>
+ <input id="remove-group-button" type="button" value="Remove Group"/>
<input id="new-group-button" type="button" value="New Group"/>
</div>
<div id="group-members">
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 21:42:27 UTC (rev 14058)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 21:43:46 UTC (rev 14059)
@@ -147,6 +147,13 @@
else()
};
+declare function sharing:remove-group($group-id as xs:string) as xs:boolean {
+ let $group := sharing:get-group($group-id),
+ $sys-group-name := $group/group:system/group:group return
+ () (: TODO call securitymanager:remove-group() :)
+
+};
+
declare function sharing:update-group($group-id as xs:string, $group-members as xs:string+) as xs:string
{
let $group := fn:collection($config:groups-collection)/group:group[@id eq $group-id],
Modified: trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 21:42:27 UTC (rev 14058)
+++ trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 21:43:46 UTC (rev 14059)
@@ -16,6 +16,8 @@
$('#collection-sharing').hide();
$('#collection-create-resource').hide();
+ $('#remove-group-button').hide();
+
});
/* sharing dialog actions */
@@ -70,6 +72,9 @@
});
//add group events
+ $('#remove-group-button').click(function(){
+ removeGroup();
+ });
$('#new-group-button').click(function(){
$('#new-group-sharing-dialog').dialog('open');
});
@@ -80,7 +85,7 @@
});
});
-
+/*
function getActiveGroup()
{
var selectedGroupId = $('#group-list').val();
@@ -89,7 +94,7 @@
} else {
return $('#group-list option[0]').val();
}
-}
+}*/
function getCurrentCollection() {
return "/db" + $('#simple-search-form input[name = collection]').val();
@@ -542,6 +547,9 @@
//called when the collection/folder sharing dialog is opened
function updateSharingDialog() {
+ //hide remove group button by default, may be re-enabled below if permissions are correct
+ $('#remove-group-button').hide();
+
var collection = getCurrentCollection();
//load the groups and select the current group
@@ -549,10 +557,16 @@
$.get("operations.xql", params, function(data) {
var groups = $(data).find("groups").children();
if(groups != null) {
+
+ //clear all current entries
var groupList = $('#group-list').find('option').remove().end();
+ groupList.append('<option disabled="disabled" value=""></option>');
+
+ //add entries from server
$(groups).each(function(){
var v = $(this).attr('id');
var n = $(this).find('name').text();
+
if($(this).attr('collection') != null){
$(groupList).append('<option selected="selected" value="' + v + '">' + n + '</option>');
} else {
@@ -561,8 +575,13 @@
});
//update group sharing details
- var groupId = $(data).find('group[collection]').attr('id');
- updateSharingGroupMembers(groupId);
+ $(groups).each(function(){
+ if($(this).attr('collection') != null) {
+ var groupId = $(this).attr('id');
+ updateSharingGroupMembers(groupId);
+ return false;
+ }
+ });
}
});
@@ -595,9 +614,20 @@
$(data).find('member').each(function(){
addMemberToSharingGroupMembers($(this).text(), owner);
});
+
+ //if we are the owner of the group, we can show a button to remove the group
+ if($(data).find('members').attr('owner') != null) {
+ $('#remove-group-button').show();
+ } else {
+ $('#remove-group-button').hide();
+ }
});
updateSharingGroupCheckboxes(groupId);
+ } else {
+
+ //if there is no group id, we cant remove the group so hide the option
+ $('#remove-group-button').hide();
}
}
@@ -716,3 +746,16 @@
//update the members etc
updateSharingGroupMembers($('#group-list').val());
}
+
+function removeGroup() {
+ var answer = confirm("Whilst you are the Group owner, there may be other users reliant on this group. Are you sure you wish to remove the group?");
+ if(answer) {
+ var groupId = $('#group-list > option[selected = "selected"]').attr('value');
+ var params = { action: "remove-group", groupId: groupId };
+ $.get("operations.xql", params, function(data) {
+
+ //refresh the sharing dialog
+ updateSharingDialog();
+ });
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 21:42:34
|
Revision: 14058
http://exist.svn.sourceforge.net/exist/?rev=14058&view=rev
Author: deliriumsky
Date: 2011-03-29 21:42:27 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Functions for removing a group
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java
Added Paths:
-----------
trunk/eXist/src/org/exist/xquery/functions/securitymanager/DeleteGroupFunction.java
Added: trunk/eXist/src/org/exist/xquery/functions/securitymanager/DeleteGroupFunction.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/securitymanager/DeleteGroupFunction.java (rev 0)
+++ trunk/eXist/src/org/exist/xquery/functions/securitymanager/DeleteGroupFunction.java 2011-03-29 21:42:27 UTC (rev 14058)
@@ -0,0 +1,90 @@
+package org.exist.xquery.functions.securitymanager;
+
+import org.exist.EXistException;
+import org.exist.dom.QName;
+import org.exist.security.Group;
+import org.exist.security.PermissionDeniedException;
+import org.exist.xquery.BasicFunction;
+import org.exist.xquery.Cardinality;
+import org.exist.xquery.FunctionSignature;
+import org.exist.xquery.XPathException;
+import org.exist.xquery.XQueryContext;
+import org.exist.xquery.value.FunctionParameterSequenceType;
+import org.exist.xquery.value.Sequence;
+import org.exist.xquery.value.SequenceType;
+import org.exist.xquery.value.Type;
+import org.exist.security.SecurityManager;
+import org.exist.security.Subject;
+
+/**
+ *
+ * @author aretter
+ */
+public class DeleteGroupFunction extends BasicFunction {
+
+ public DeleteGroupFunction(XQueryContext context, FunctionSignature signature) {
+ super(context, signature);
+ }
+
+ public final static FunctionSignature signatures[] = {
+ new FunctionSignature(
+ new QName("delete-group", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX),
+ "Deletes an existing group identified by $group-id. Any resources owned by the group will be moved to the 'guest' group.",
+ new SequenceType[]{
+ new FunctionParameterSequenceType("group-id", Type.STRING, Cardinality.EXACTLY_ONE, "The group-id to delete")
+ },
+ new SequenceType(Type.ITEM, Cardinality.EMPTY)
+ ),
+
+ new FunctionSignature(
+ new QName("delete-group", SecurityManagerModule.NAMESPACE_URI, SecurityManagerModule.PREFIX),
+ "Deletes an existing group identified by $group-id, any resources owned by the group will be moved to the group indicated by $successor-group-id.",
+ new SequenceType[]{
+ new FunctionParameterSequenceType("group-id", Type.STRING, Cardinality.EXACTLY_ONE, "The group-id to delete"),
+ new FunctionParameterSequenceType("successor-group-id", Type.STRING, Cardinality.EXACTLY_ONE, "The group-id that should take over ownership of any resources")
+ },
+ new SequenceType(Type.ITEM, Cardinality.EMPTY)
+ )
+ };
+
+
+ @Override
+ public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
+
+ SecurityManager sm = context.getBroker().getBrokerPool().getSecurityManager();
+ Subject currentSubject = context.getBroker().getSubject();
+
+ try {
+ final Group group = sm.getGroup(currentSubject, args[0].itemAt(0).getStringValue());
+ if(group.isManager(currentSubject)) {
+ throw new PermissionDeniedException("Only a group manager may delete a group");
+ }
+
+ final Group successorGroup;
+ if(getArgumentCount() == 2) {
+ final String successorGroupName = args[1].itemAt(0).getStringValue();
+ if(!currentSubject.hasGroup(successorGroupName)) {
+ throw new PermissionDeniedException("You must be a member of the group for which permissions should be inherited by");
+ }
+ successorGroup = sm.getGroup(currentSubject, successorGroupName);
+
+ } else {
+ successorGroup = sm.getGroup(currentSubject, "guest");
+ }
+
+ //TODO how to handle user which are members of this group
+ //also how to reassign resources that are allocated to this group to another group
+
+ try {
+ sm.deleteGroup(currentSubject, group.getName());
+ } catch(EXistException ee) {
+ throw new XPathException(ee.getMessage(), ee);
+ }
+
+ return Sequence.EMPTY_SEQUENCE;
+ } catch(PermissionDeniedException pde) {
+ throw new XPathException(pde.getMessage(), pde);
+ }
+ }
+
+}
Modified: trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java 2011-03-29 19:47:07 UTC (rev 14057)
+++ trunk/eXist/src/org/exist/xquery/functions/securitymanager/SecurityManagerModule.java 2011-03-29 21:42:27 UTC (rev 14058)
@@ -46,7 +46,9 @@
new FunctionDef(FindUserFunction.signatures[0], FindUserFunction.class),
new FunctionDef(FindUserFunction.signatures[1], FindUserFunction.class),
new FunctionDef(GetAccountMetadataFunction.signatures[0], GetAccountMetadataFunction.class),
- new FunctionDef(GetAccountMetadataFunction.signatures[1], GetAccountMetadataFunction.class)
+ new FunctionDef(GetAccountMetadataFunction.signatures[1], GetAccountMetadataFunction.class),
+ new FunctionDef(DeleteGroupFunction.signatures[0], DeleteGroupFunction.class),
+ new FunctionDef(DeleteGroupFunction.signatures[1], DeleteGroupFunction.class),
};
public SecurityManagerModule(Map<String, List<? extends Object>> parameters) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 19:47:13
|
Revision: 14057
http://exist.svn.sourceforge.net/exist/?rev=14057&view=rev
Author: deliriumsky
Date: 2011-03-29 19:47:07 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Futher controller priviledge escalation, we need to discuss inverting the security user to group relationship, as the current model fails security ideals by merging what should be a seperation of concerns i.e. users and group membership
Modified Paths:
--------------
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java
trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java 2011-03-29 19:34:23 UTC (rev 14056)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBAddUserToGroup.java 2011-03-29 19:47:07 UTC (rev 14057)
@@ -104,6 +104,7 @@
* this is a security issue as if you are not that user
* you have to escalate to DBA - must redesign
* Consider Unix /etc/groups design!
+ * See XMLDBCreateGroup and XMLDRemoveUserFromGroup
*/
Subject currentSubject = context.getBroker().getSubject();
try {
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java 2011-03-29 19:34:23 UTC (rev 14056)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBCreateGroup.java 2011-03-29 19:47:07 UTC (rev 14057)
@@ -131,7 +131,7 @@
//START TEMP - we also need to make every manager a member of the group otherwise
//they do not show up as group memebers automatically - this is a design problem because group
//membership is managed on the user and not the group, this needs to be fixed!
- //see XMLDBAddUserToGroup also
+ //see XMLDBAddUserToGroup and XMLDBRemoveUserFromGroup also
Subject currentSubject = context.getBroker().getSubject();
try {
//escalate
Modified: trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java
===================================================================
--- trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java 2011-03-29 19:34:23 UTC (rev 14056)
+++ trunk/eXist/src/org/exist/xquery/functions/xmldb/XMLDBRemoveUserFromGroup.java 2011-03-29 19:47:07 UTC (rev 14057)
@@ -27,6 +27,7 @@
import org.exist.security.Account;
import org.exist.security.PermissionDeniedException;
import org.exist.security.SecurityManager;
+import org.exist.security.Subject;
import org.exist.xquery.BasicFunction;
import org.exist.xquery.Cardinality;
import org.exist.xquery.FunctionSignature;
@@ -91,8 +92,25 @@
Account account = sm.getAccount(null, userName);
account.remGroup(groupName);
- sm.updateAccount(null, account);
+ //TEMP - ESCALATE TO DBA :-(
+ //START TEMP - Whilst we can remove the group from the user
+ //we cannot update the user because we do not have sufficient permissions
+ //in the real world we should not be able to do either. The modelling of group
+ //membership as a concern of user data is wrong! Should follow Unix approach.
+ //see XMLDBAddUserToGroup also
+ Subject currentSubject = context.getBroker().getSubject();
+ try {
+ //escalate
+ context.getBroker().setSubject(sm.getSystemSubject());
+
+ //perform action
+ sm.updateAccount(null, account);
+ } finally {
+ context.getBroker().setSubject(currentSubject);
+ }
+ //END TEMP
+
return BooleanValue.TRUE;
} catch(PermissionDeniedException pde) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 19:34:29
|
Revision: 14056
http://exist.svn.sourceforge.net/exist/?rev=14056&view=rev
Author: deliriumsky
Date: 2011-03-29 19:34:23 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[bugfix] Collections did not show if you were not logged in
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql 2011-03-29 18:24:41 UTC (rev 14055)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql 2011-03-29 19:34:23 UTC (rev 14056)
@@ -100,9 +100,12 @@
$can-write := security:can-write-collection($user, $root-collection-path),
(: home collection :)
- $home-collection-path := security:get-home-collection-uri($user),
- $has-home-children := not(empty(xmldb:get-child-collections($home-collection-path))),
- $home-json := col:create-tree-node("Home", $home-collection-path, true(), "../skin/ltFld.user.gif" , "Home Folder", true(), "userHomeSubCollection", $has-home-children, ()),
+ $home-json :=
+ if(security:home-collection-exists($user))then
+ let $home-collection-path := security:get-home-collection-uri($user),
+ $has-home-children := not(empty(xmldb:get-child-collections($home-collection-path))) return
+ col:create-tree-node("Home", $home-collection-path, true(), "../skin/ltFld.user.gif" , "Home Folder", true(), "userHomeSubCollection", $has-home-children, ())
+ else(),
(: group collection :)
$has-group-children := not(empty(sharing:get-users-groups(security:get-user-credential-from-session()[1]))),
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Pierrick B. <pie...@fr...> - 2011-03-29 18:56:22
|
Hi, Le 29/03/2011 17:12, zw...@us... a écrit : > Revision: 14050 > http://exist.svn.sourceforge.net/exist/?rev=14050&view=rev > Author: zwobit > Date: 2011-03-29 15:12:33 +0000 (Tue, 29 Mar 2011) > > Log Message: > ----------- > [betterFORM extension] added initial betterFORM extension for exist 1.4 : > - added XRX-Sample to setup.xqm > - modified start.config for extension libraries > - added and enabled extension in build.properties > - added extension to build-impl.xml > - added extension to extensions-directory > > Modified Paths: This one broke the build... see http://serengeti.friprogramvarusyndikatet.se:8111/viewLog.html?buildId=5421&tab=buildChangesDiv&buildTypeId=bt9 Cheers, p.b. |
|
From: <del...@us...> - 2011-03-29 18:24:47
|
Revision: 14055
http://exist.svn.sourceforge.net/exist/?rev=14055&view=rev
Author: deliriumsky
Date: 2011-03-29 18:24:41 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Fixed tree refreshes and reloading. Also now it only reloads the data for the affected node - nice!
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
Modified: trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 18:22:44 UTC (rev 14054)
+++ trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 18:24:41 UTC (rev 14055)
@@ -155,8 +155,12 @@
return false;
});
$('#collection-reload').click(function () {
- $("#collection-tree-tree").dynatree("reload");
- return false;
+ //reload the entire tree
+ var tree = $("#collection-tree-tree").dynatree("getTree");
+ if(tree) {
+ tree.reload();
+ }
+ return false;
});
}
@@ -265,11 +269,39 @@
var collection = getCurrentCollection();
var params = { action: 'create-collection', name: name, collection: collection };
$.get("operations.xql", params, function (data) {
- $("#collection-tree-tree").dynatree("reload");
+
+ //reload the tree node
+ refreshCurrentTreeNode();
+
+ //close the dialog
dialog.dialog("close");
});
}
+//refreshes the tree node
+function refreshTreeNode(node) {
+ if(node) {
+ node.reloadChildren(function(node, isOk){
+ //alert("reloaded node" + node);
+ });
+ }
+}
+
+//refreshes the currently selected tree node
+function refreshCurrentTreeNode() {
+ var node = $("#collection-tree-tree").dynatree("getActiveNode");
+ refreshTreeNode(node);
+}
+
+//refreshes the parent of the currently selected tree node
+function refreshParentTreeNode() {
+ //reload the parent tree node
+ $("#collection-tree-tree").dynatree("getActiveNode").visitParents(function(parentNode){
+ refreshTreeNode(parentNode);
+ return false;
+ });
+}
+
/*
Called when the user clicks on the "rename" button in the rename collection dialog.
*/
@@ -278,7 +310,11 @@
var collection = getCurrentCollection();
var params = { action: 'rename-collection', name: name, collection: collection };
$.get("operations.xql", params, function (data) {
- $("#collection-tree-tree").dynatree("reload");
+
+ //reload the parent tree node
+ refreshParentTreeNode();
+
+ //close the dialog
dialog.dialog("close");
});
}
@@ -291,7 +327,11 @@
var collection = getCurrentCollection();
var params = { action: 'move-collection', path: path, collection: collection };
$.get("operations.xql", params, function (data) {
- $("#collection-tree-tree").dynatree("reload");
+
+ //reload the parent tree node
+ refreshParentTreeNode();
+
+ //close the dialog
dialog.dialog("close");
});
}
@@ -303,7 +343,11 @@
var collection = getCurrentCollection();
var params = { action: 'remove-collection', collection: collection };
$.get("operations.xql", params, function (data) {
- $("#collection-tree-tree").dynatree("reload");
+
+ //reload the parent tree node
+ refreshParentTreeNode();
+
+ //close the dialog
dialog.dialog("close");
});
}
@@ -338,7 +382,10 @@
var params = { "action":"update-collection-sharing", "collection":collection, "sharingCollectionWith":sharingCollectionWith, "groupList": groupList, "groupMember": groupMember, "groupSharingPermissions": groupSharingPermissions, "otherSharingPermissions": otherSharingPermissions };
$.post("operations.xql", params, function (data) {
- $("#collection-tree-tree").dynatree("reload");
+ //reload the tree node
+ refreshCurrentTreeNode();
+
+ //close the dialog
dialog.dialog("close");
});
}
@@ -668,4 +715,4 @@
//update the members etc
updateSharingGroupMembers($('#group-list').val());
-}
\ No newline at end of file
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 18:22:50
|
Revision: 14054
http://exist.svn.sourceforge.net/exist/?rev=14054&view=rev
Author: deliriumsky
Date: 2011-03-29 18:22:44 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Fixed another regression whereby the op:rename-collection feature had been removed
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql 2011-03-29 17:45:49 UTC (rev 14053)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/operations.xql 2011-03-29 18:22:44 UTC (rev 14054)
@@ -41,6 +41,11 @@
<status id="moved" from="{$parent}">{$path}</status>
};
+declare function op:rename-collection($path as xs:string, $name as xs:string) as element(status) {
+ let $null := xmldb:rename($path, $name) return
+ <status id="renamed" from="{$path}">{$name}</status>
+};
+
declare function op:remove-collection($collection as xs:string) as element(status) {
let $null := xmldb:remove($collection) return
<status id="removed">{$collection}</status>
@@ -259,6 +264,8 @@
op:create-collection($collection, request:get-parameter("name",()))
else if($action eq "move-collection")then
op:move-collection($collection, request:get-parameter("path",()))
+ else if($action eq "rename-collection")then
+ op:rename-collection($collection, request:get-parameter("name",()))
else if($action eq "remove-collection")then
op:remove-collection($collection)
else if($action eq "update-collection-sharing")then
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 17:45:56
|
Revision: 14053
http://exist.svn.sourceforge.net/exist/?rev=14053&view=rev
Author: deliriumsky
Date: 2011-03-29 17:45:49 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Switched over to lazy initialising the Tree and changed to using the new JSON Serializer
1) Cleaner and easier to understand code in collections.xql
2) Tree should scale better
3) Prerequisite to resolving tree reload/refresh issues
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql
trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql 2011-03-29 17:17:42 UTC (rev 14052)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/collections.xql 2011-03-29 17:45:49 UTC (rev 14053)
@@ -2,164 +2,263 @@
import module namespace config="http://exist-db.org/mods/config" at "../config.xqm";
import module namespace json="http://www.json.org";
+import module namespace request = "http://exist-db.org/xquery/request";
import module namespace security="http://exist-db.org/mods/security" at "security.xqm";
import module namespace session = "http://exist-db.org/xquery/session";
import module namespace sharing="http://exist-db.org/mods/sharing" at "sharing.xqm";
import module namespace util="http://exist-db.org/xquery/util";
import module namespace xmldb = "http://exist-db.org/xquery/xmldb";
-declare namespace group = "http://exist-db.org/mods/sharing/group";
+declare namespace exist = "http://exist.sourceforge.net/NS/exist";
+declare namespace group = "http://commons/sharing/group";
+declare namespace col = "http://library/search/collections";
+declare option exist:serialize "method=json media-type=text/javascript";
+
(:~
-: Generates an XML collection navigation representation for the biblio app
-: and then renders it as JSON
+: Generates tree nodes for navigation of collections in
+: the library search app. Uses the JSON serializer to get JSON output.
:
-: Includes virtual users homes and shared collections via groups
+: Also generates a virtual collection root called 'Groups', this starts
+: as /db/commons/groups and then any sub-collection under here
+: is actually a link back to the shared collection (i.e. a collection in a users home folder)
+: Group collection paths look like /db/commons/group/{uuid}/{collection-name}
+: The {uuid} refers to an entry stored in /db/commons/group
+: The {collection-name} is the real name of the collection from the original users folder
:
-: @author Adam Retter <ad...@ex...>
+: The JSON output generated is suitable for use with dynatree
+:
+: @author Adam Retter <ad...@ex...>
:)
+
(:~
-: Gets a collection and its descendants from the database
+: Outputs details about a collection as a tree-node
+:
+: @param title
+: Title of the tree node
+: @param collection-path
+: Collection path that backs the tree node
+: @param is-folder
+: Is this tree node a folder?
+: @param $icon-path
+: Optional path to a custom icon
+: @param $tooltip
+: Optional tooltip
+: @param writeable
+: Is this tree node writeable - i.e. can folders/resources be added to it
+: @param additional-classes
+: Optional additional CSS classes to apply
+: @param has-lazy-children
+: Are there children for this node which can be lazily fetched?
+: @param explicit-children
+: Any children that should be explicity displayed, ignored if has-lazy-children is true()
+:
:)
-declare function local:db-collection-children($collection-path as xs:string) as element(children)* {
- for $child in xmldb:get-child-collections($collection-path)
- let $sub-collection-path := fn:concat($collection-path, "/", $child) return
- let $children := local:collections($sub-collection-path) return
- if($children)then(
- <children>{$children}</children>
- )else()
+declare function col:create-tree-node($title as xs:string, $collection-path as xs:string, $is-folder as xs:boolean, $icon-path as xs:string?, $tooltip as xs:string?, $writeable as xs:boolean, $additonal-classes as xs:string*, $has-lazy-children as xs:boolean, $explicit-children as element(node)*) as element(node) {
+ <node>
+ <title>{$title}</title>
+ <key>{$collection-path}</key>
+ <isFolder>{$is-folder}</isFolder>
+ <writeable>{$writeable}</writeable>
+ <addClass>{
+ fn:string-join(
+ (if($writeable) then 'writable' else 'readable', $additonal-classes),
+ ' '
+ )
+ }</addClass>
+ {
+ if($icon-path)then
+ <icon>{$icon-path}</icon>
+ else(),
+ if($tooltip)then
+ <tooltip>{$tooltip}</tooltip>
+ else()
+ }
+ <isLazy>{$has-lazy-children}</isLazy>
+ {
+ if(not($has-lazy-children) and not(empty($explicit-children)))then
+ for $explicit-child in $explicit-children return
+ <children>{$explicit-child/child::node()}</children>
+ else()
+ }
+ </node>
};
(:~
-: Gets all the child collections for the groups accesible to a user
+: Gets the root collection and any special collections directly under root
+:
+: @param root-collection-path
+: Path to the root collection in the database
:)
-declare function local:group-children($collection-path as xs:string) as element(children)* {
- let $user-groups := sharing:get-users-groups(security:get-user-credential-from-session()[1]) return
- for $group at $i in $user-groups return
- <children>{local:tree-node(fn:concat($config:groups-collection, "/", $group/@id), false(), $group/group:name, (), (), util:function(xs:QName("local:group-collection-children"), 1))/*}</children>
+declare function col:get-root-collection($root-collection-path as xs:string) as element(node) {
+
+ let $user := security:get-user-credential-from-session()[1] return
+
+ if(security:can-read-collection($user, $root-collection-path)) then
+ let $children := xmldb:get-child-collections($root-collection-path),
+ $can-write := security:can-write-collection($user, $root-collection-path),
+
+ (: home collection :)
+ $home-collection-path := security:get-home-collection-uri($user),
+ $has-home-children := not(empty(xmldb:get-child-collections($home-collection-path))),
+ $home-json := col:create-tree-node("Home", $home-collection-path, true(), "../skin/ltFld.user.gif" , "Home Folder", true(), "userHomeSubCollection", $has-home-children, ()),
+
+ (: group collection :)
+ $has-group-children := not(empty(sharing:get-users-groups(security:get-user-credential-from-session()[1]))),
+ $group-json := col:create-tree-node("Groups", $config:groups-collection, true(), "../skin/ltFld.groups.gif", "Groups", false(), (), $has-group-children, ())
+
+ return
+
+ (: root collection, containing home and group collection as children :)
+ col:create-tree-node(fn:replace($root-collection-path, ".*/", ""), $root-collection-path, true(), (), (), $can-write, (), false(), ($home-json, $group-json))
+ else()
};
(:~
-: Finds all of the collections inside a users home folder which match the group
+: Gets lazy child collections
:
+: @param collection-path
+: The parent collection path
:)
-declare function local:user-collection-for-group($group-id as xs:string, $user-collection-path as xs:string) as node()*
-{
- let $system-group := sharing:get-group($group-id)/group:system/group:group return
- for $user-sub-collection in xmldb:get-child-collections($user-collection-path)
- let $user-sub-collection-path := fn:concat($user-collection-path, "/", $user-sub-collection) return
- (
- if(security:get-group($user-sub-collection-path) eq $system-group)then(
- local:tree-node($user-sub-collection-path, sharing:group-writeable($user-sub-collection-path, $group-id), (), (), (), ())
- )else(),
- local:user-collection-for-group($group-id, $user-sub-collection-path)
- )
+declare function col:get-child-collections($collection-path as xs:string) as element(json:value){
+
+ let $user := security:get-user-credential-from-session()[1] return
+ if(security:can-read-collection($user, $collection-path)) then
+
+ (:get children :)
+ let $children := xmldb:get-child-collections($collection-path) return
+
+ <json:value>
+ {
+ for $child in $children
+ let $child-collection-path := fn:concat($collection-path, "/", $child) return
+
+ (: output the child :)
+ col:get-collection($child-collection-path)
+ }
+ </json:value>
+ else()
};
(:~
-: Generates the collections for a group in the navigation tree
+: Gets a collection
:
-: $group-collection-path The virtual collection path of the group e.g. /db/mods/groups/1234-1234-1234-1234
+: @param collection-path
+: The path of the collection to retrieve
:)
-declare function local:group-collection-children($group-collection-path as xs:string)
-{
- let $group-id := fn:replace($group-collection-path, ".*/", "") return
- for $user-collection in xmldb:get-child-collections($config:users-collection)
- let $user-collection-path := fn:concat($config:users-collection, "/", $user-collection) return
- for $node in local:user-collection-for-group($group-id, $user-collection-path) return
- <children>{$node/*}</children>
+declare function col:get-collection($collection-path as xs:string) as element(json:value) {
+
+ let $user := security:get-user-credential-from-session()[1] return
+
+ (: perform some checks on a child:)
+ if(security:can-read-collection($user, $collection-path))then
+ let $name := fn:replace($collection-path, ".*/", ""),
+ $can-write := security:can-write-collection($user, $collection-path),
+ $has-children := not(empty(xmldb:get-child-collections($collection-path))),
+ $shared-with-group-id := sharing:get-group-id($collection-path),
+ $tooltip :=
+ if($shared-with-group-id)then
+ fn:concat("Shared With: ", sharing:get-group($shared-with-group-id)/group:name/text())
+ else()
+ return
+ (: output the collection :)
+ <json:value>
+ {
+ col:create-tree-node($name, $collection-path, true(), (), $tooltip, $can-write, (), $has-children, ())/child::node()
+ }
+ </json:value>
+ else()
};
(:~
-: Generates a node for the navigation tree
+: Gets the virtual "Groups" root, i.e. returns all groups that are accessible to a user
:)
-declare function local:tree-node($collection-path as xs:string, $can-write as xs:boolean, $title as xs:string?, $icon-path as xs:string?, $additional-classes as xs:string*, $children-function) as element(node)
-{
- let $is-user-home-subcollection := fn:starts-with($collection-path, fn:concat(security:get-home-collection-uri(security:get-user-credential-from-session()[1]), '/')) return
-
- <node>
- <title>{if($title)then($title)else(fn:replace($collection-path, '.*/',''))}</title>
- <isFolder json:literal="true">true</isFolder>
- <key>{$collection-path}</key>
- <writeable json:literal="true">{$can-write}</writeable>
- <addClass>
+declare function col:get-groups-virtual-root() as element(json:value) {
+
+ let $groups := sharing:get-users-groups(security:get-user-credential-from-session()[1]) return
+ <json:value>
{
- fn:concat(
- if($can-write) then 'writable' else 'readable',
- ' ',
- fn:string-join(
- for $additional-class in $additional-classes return
- $additional-class,
- ' '
- ),
- if($is-user-home-subcollection)then 'userHomeSubCollection' else ''
- )
+ for $group in $groups return
+ <json:value>
+ {
+ col:create-tree-node($group/group:name, fn:concat($config:groups-collection, "/", $group/@id), true(), (), (), false(), (), true(), ())/child::node()
+ }
+ </json:value>
}
- </addClass>
- {
- if($icon-path)then
- (
- <icon>{$icon-path}</icon>
- )else(),
-
- if($is-user-home-subcollection)then
- (
- let $group-id := sharing:get-group-id($collection-path) return
- if($group-id)then
- (
- <tooltip>Shared With: {sharing:get-group($group-id)/group:name/text()}</tooltip>
- )else()
- )else(),
-
-
- if(not(empty($children-function)))then
- (
- util:call($children-function, $collection-path)
- )else()
- }
- </node>
+ </json:value>
};
(:~
-: Gets the collections for the navigation
+: Generates the collections for a group in the navigation tree
+:
+: $group-collection-path The virtual collection path of the group e.g. /db/mods/groups/{uuid}
:)
-declare function local:collections($root as xs:string) {
+declare function col:get-group-virtual-child-collections($collection-path as xs:string) as element(json:value) {
- if(xmldb:collection-available($root))then
- (
- let $user := security:get-user-credential-from-session()[1],
- $children := xmldb:get-child-collections($root),
- $can-write := security:can-write-collection($user, $root) return
+ (: extract the group id from the virtual collection path :)
+ let $group-id := fn:replace($collection-path, ".*/", "") return
- if(security:can-read-collection($user, $root)) then
-
- (: is this the users collection? :)
- if($root eq $config:users-collection) then
- (
- (: users collection is treated specially :)
- if($children = $user)then
- (
- (: found a mods home collection for the currently logged in user :)
- let $home-collection-uri := security:get-home-collection-uri($user) return
- local:tree-node($home-collection-uri, $can-write, "Home", "../skin/ltFld.user.gif", (), util:function(xs:QName("local:db-collection-children"), 1))/*
- )else()
- )
- (: groups collection is treated specially, i.e. skipped :)
- else if($root eq $config:groups-collection)then
- (
- if($user ne "guest")then(
- local:tree-node($config:groups-collection, false(), "Groups", "../skin/ltFld.groups.gif", (), util:function(xs:QName("local:group-children"), 1))/*
- )else()
- )
- else
- ( (: normal collection:)
- local:tree-node($root, $can-write, (), (), (), util:function(xs:QName("local:db-collection-children"), 1))/*
- )
- else()
- )else()
+ <json:value>{
+ (: iterate through every users collection :)
+ for $user-collection in xmldb:get-child-collections($config:users-collection)
+ let $user-collection-path := fn:concat($config:users-collection, "/", $user-collection),
+ $child-nodes := col:resolve-real-users-collection-for-group($group-id, $user-collection-path) return
+ for $node in $child-nodes return
+ element json:value {
+
+ (: TODO - we need this at the moment because if there is only one output node then the json output gets broken :)
+ if(count($child-nodes) eq 1)then
+ attribute json:array { "true" }
+ else(),
+
+ $node/child::node()
+ }
+ }</json:value>
};
-(: get the collection navigation and convert to json :)
-let $xml := <json>{local:collections($config:mods-root)}</json> return
- json:xml-to-json($xml)
\ No newline at end of file
+(:~
+: Resolves a real collection from a users home folder for a group
+:
+: @param group-id
+: The id of the group to retrieve the collection for
+:
+: @param user-collection-path
+: The path of the users home folder to scan for collections that belong to the group-id
+:)
+declare function col:resolve-real-users-collection-for-group($group-id as xs:string, $user-collection-path as xs:string) as node()*
+{
+ let $user := security:get-user-credential-from-session()[1],
+ $system-group := sharing:get-group($group-id)/group:system/group:group return
+ for $user-sub-collection in xmldb:get-child-collections($user-collection-path)
+ let $user-sub-collection-path := fn:concat($user-collection-path, "/", $user-sub-collection) return
+ (
+ if(security:get-group($user-sub-collection-path) eq $system-group)then(
+ col:get-collection($user-sub-collection-path)
+ )else(),
+ col:resolve-real-users-collection-for-group($group-id, $user-sub-collection-path)
+ )
+};
+
+
+(:~
+: Request routing
+:
+: If the http querystring parameter key exists then we retrieve tree nodes based on this
+: key which is basically a real or virtual (for groups) collection path.
+: If there is no key we deliver the tree root
+:)
+if(request:get-parameter("key",()))then
+ let $collection-path := request:get-parameter("key",()) return
+ if($collection-path eq $config:groups-collection) then
+ (: start of groups collection - the groups collection is virtual and so receives special treatment :)
+ col:get-groups-virtual-root()
+ else if(fn:starts-with($collection-path, $config:groups-collection)) then
+ (: children of virtual group collection :)
+ col:get-group-virtual-child-collections($collection-path)
+ else
+ (: just a child collection :)
+ col:get-child-collections($collection-path)
+else
+ (: no key, so its the root that we want :)
+ col:get-root-collection($config:mods-root)
\ No newline at end of file
Modified: trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 17:17:42 UTC (rev 14052)
+++ trunk/eXist/webapp/repo/packages/library/mods/resources/js/query.js 2011-03-29 17:45:49 UTC (rev 14053)
@@ -104,7 +104,10 @@
dynaTree.dynatree({
fx: { height: "toggle", duration: 200 },
persist: true,
- initAjax: {url: "collections.xql" },
+ initAjax: {
+ url: "collections.xql"
+ },
+ autoFocus: false,
onActivate: function (dtnode) {
var title = dtnode.data.title;
var key = dtnode.data.key;
@@ -117,6 +120,15 @@
}
updateSharingOtherCheckboxes();*/
},
+ onLazyRead: function(node){
+ node.appendAjax({
+ url: "collections.xql",
+ data: {
+ key: node.data.key
+ }
+ });
+ },
+
onPostInit: function () {
// when tree is reloaded, reactivate the current node to trigger an onActivate event
this.reactivate();
@@ -656,4 +668,4 @@
//update the members etc
updateSharingGroupMembers($('#group-list').val());
-}
+}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <jo...@us...> - 2011-03-29 17:17:48
|
Revision: 14052
http://exist.svn.sourceforge.net/exist/?rev=14052&view=rev
Author: joewiz
Date: 2011-03-29 17:17:42 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[ignore] conf.xml contained an extraneous hanging close comment (-->), highlighted by oXygen as violating conf.xsd
Modified Paths:
--------------
trunk/eXist/conf.xml.tmpl
Modified: trunk/eXist/conf.xml.tmpl
===================================================================
--- trunk/eXist/conf.xml.tmpl 2011-03-29 15:18:43 UTC (rev 14051)
+++ trunk/eXist/conf.xml.tmpl 2011-03-29 17:17:42 UTC (rev 14052)
@@ -864,7 +864,7 @@
<module class="org.exist.xquery.modules.xmlcalabash.XMLCalabashModule"
uri="http://xmlcalabash.com" />
- -->
+
</builtin-modules>
</xquery>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <zw...@us...> - 2011-03-29 15:18:51
|
Revision: 14051
http://exist.svn.sourceforge.net/exist/?rev=14051&view=rev
Author: zwobit
Date: 2011-03-29 15:18:43 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[betterFORM extension] modified extension to use single-jar-mode and enabled it per default :
- build-impl.xml : renamed uninstall to clean
- start.config : changed libraries-path for extension
- setup.xqm : enabled XRX example
- extensions/betterform: cleanup, changes to build-file etc. Removed "exploded" betterform
Modified Paths:
--------------
trunk/eXist/build/scripts/build-impl.xml
trunk/eXist/extensions/betterform/build.xml
trunk/eXist/extensions/betterform/src/main/etc/MergeWebXML.xsl
trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-config.xml
trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-version.info
trunk/eXist/extensions/betterform/src/main/webapp/xquery/xferror.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/about.html
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/app-info.xml
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/data/controller.xml
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-item.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-project.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-worker.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/index.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/InlineRoundBordersAlert.css
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/timetracker.css
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/views/list-items-html.xql
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/views/list-items.html
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/views/list-items.xql
trunk/eXist/extensions/build.properties
trunk/eXist/src/org/exist/start/start.config
trunk/eXist/webapp/admin/setup.xqm
Added Paths:
-----------
trunk/eXist/extensions/betterform/src/main/lib/betterform.jar
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/images/error.png
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/images/hint.png
trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/images/ok.png
Removed Paths:
-------------
trunk/eXist/extensions/betterform/src/main/lib/betterform-3.1.0.jar
trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/web.xml
trunk/eXist/extensions/betterform/src/main/webapp/forms/
trunk/eXist/extensions/betterform/src/main/webapp/resources/
Property Changed:
----------------
trunk/eXist/extensions/betterform/
Modified: trunk/eXist/build/scripts/build-impl.xml
===================================================================
--- trunk/eXist/build/scripts/build-impl.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/build/scripts/build-impl.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -615,7 +615,7 @@
<ant antfile="build.xml" dir="extensions/security/activedirectory" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/svn" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/netedit" target="clean" inheritall="false"/>
- <ant antfile="build.xml" dir="extensions/betterform" target="uninstall" inheritall="false"/>
+ <ant antfile="build.xml" dir="extensions/betterform" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/webdav" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/contentextraction" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="webapp/repo" target="clean" inheritall="false"/>
Property changes on: trunk/eXist/extensions/betterform
___________________________________________________________________
Deleted: svn:ignore
- uninstall
Modified: trunk/eXist/extensions/betterform/build.xml
===================================================================
--- trunk/eXist/extensions/betterform/build.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/build.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,17 +1,13 @@
<!--
- ~ Copyright (c) 2010. betterForm Project - http://www.betterform.de
+ ~ Copyright (c) 2011. betterForm Project - http://www.betterform.de
~ Licensed under the terms of BSD License
+ ~ Author betterFORM team ( info AT betterform.de )
-->
<project name="betterFORM extension for eXist" default="install" basedir=".">
-
- <property name="pass" value="betterform"/>
<property name="exist.rootdir" value="${basedir}/../.."/>
<property name="exist.web.xml" value="${exist.rootdir}/webapp/WEB-INF/web.xml"/>
- <property name="bf.shortname" value="betterform"/>
- <!--todo:move property to build.properties.xml-->
- <property name="bf.version" value="3.1.0"/>
<property file="../local.build.properties"/>
<property file="../build.properties"/>
@@ -19,23 +15,33 @@
<istrue value="${include.feature.betterform}"/>
</condition>
- <condition property="betterform.installed">
- <available file="${exist.rootdir}/webapp/betterform"/>
- </condition>
+ <condition property="betterform.installed">
+ <available file="${exist.rootdir}/webapp/betterform"/>
+ </condition>
<property name="betterform.home" value="${exist.rootdir}/extensions/betterform"/>
<property name="betterform.etc" value="${betterform.home}/src/main/etc"/>
<property name="betterform.xrx" value="${betterform.home}/src/main/xrx"/>
+ <property name="betterform.lib" value="${betterform.home}/src/main/lib"/>
<property name="betterform.webapp" value="${betterform.home}/src/main/webapp"/>
- <!--todo:move property to build.properties.xml-->
- <property name="bf.release.name" value="betterform-3.1.0"/>
+ <macrodef name="xslt-saxon">
+ <attribute name="in"/>
+ <attribute name="out"/>
+ <attribute name="style"/>
+ <sequential>
+ <echo level="info">XSLT Generating @{out}</echo>
+ <java classname="net.sf.saxon.Transform"
+ classpath="${exist.rootdir}/lib/endorsed/saxonhe-9.2.1.5.jar"
+ logError="true"
+ output="@{out}"
+ fork="true">
+ <arg value="@{in}"/>
+ <arg value="@{style}"/>
+ </java>
+ </sequential>
+ </macrodef>
-
- <path id="generator.libs" description="classpath for using Saxon XSLT">
- <pathelement location="${exist.rootdir}/lib/endorsed/saxonhe-9.2.1.5.jar"/>
- </path>
-
<path id="classpath.exist">
<fileset dir="${exist.rootdir}/lib/core">
<include name="*.jar"/>
@@ -44,78 +50,74 @@
<pathelement path="${exist.rootdir}/exist-optional.jar"/>
</path>
- <target name="install" description="install betterFORM into an existing eXist XML Db installation" if="include.feature.betterform.config" unless="betterform.installed">
- <echo message="************************************************************************************"/>
- <echo message="add betterFORM config parameters to eXist to ${exist.web.xml}"/>
- <echo message="************************************************************************************"/>
+ <target name="install" description="install betterFORM into an existing eXist XML DB installation"
+ if="include.feature.betterform.config" unless="betterform.installed">
+ <echo>
+ Add betterFORM config parameters to eXist to ${exist.web.xml}
+ </echo>
<antcall target="patchWebXml"/>
- <echo message="************************************************************************************"/>
- <echo message="deploy betterFORM resources to eXist webapp (${exist.web.xml}/webapp)"/>
- <echo message="************************************************************************************"/>
+ <echo>
+ Deploy betterFORM resources to eXist webapp (${exist.web.xml}/webapp)
+ </echo>
- <antcall target="deployBetterFORMResources"/>
+ <antcall target="deployBFResources"/>
</target>
- <target name="uninstall" xmlns:xmldb="http://exist-db.org/ant" description="uninstall betterFORM" if="include.feature.betterform.config">
- <delete file="${exist.web.xml}" failonerror="false"/>
- <delete dir="${exist.rootdir}/webapp/betterform" />
+ <target name="clean" xmlns:xmldb="http://exist-db.org/ant" description="uninstall betterFORM"
+ if="include.feature.betterform.config">
+ <echo>
+ Uninstalling betterFORM.
+ </echo>
- <!-- TODO: remove when cocoon is removed -->
- <!-- eXist 1.5.0 -->
- <move file="${basedir}/uninstall/ehcache-1.1.jar" tofile="${exist.rootdir}/extensions/cocoon/lib/ehcache-1.1.jar" failonerror="false"/>
- <!-- eXist 1.4 -->
- <!-- <move file="${basedir}/uninstall/ehcache-1.1.jar" tofile="${exist.rootdir}/lib/cocoon/ehcache-1.1.jar" failonerror="false"/> -->
+ <delete dir="${exist.rootdir}/webapp/betterform"/>
<!--delete files from WEB-INF-->
- <delete file="${exist.rootdir}/webapp/WEB-INF/betterform-config.xml" failonerror="false"/>
- <delete file="${exist.rootdir}/webapp/WEB-INF/dwr.xml" failonerror="false"/>
- <delete file="${exist.rootdir}/webapp/WEB-INF/dwr20.dtd" failonerror="false"/>
- <delete file="${exist.rootdir}/webapp/WEB-INF/web.xml.original" failonerror="false"/>
+ <delete file="${exist.rootdir}/webapp/WEB-INF/betterform-config.xml" />
+ <delete file="${exist.rootdir}/webapp/WEB-INF/dwr.xml" />
+ <delete file="${exist.rootdir}/webapp/WEB-INF/dwr20.dtd" />
- <!--delete sample file-->
- <!-- <delete file="${exist.rootdir}/webapp/xquery/xfGuess.xql" failonerror="false"/> -->
+ <delete dir="${exist.rootdir}/webapp/WEB-INF/lib"/>
<!-- restore web.xml -->
- <copy tofile="${exist.rootdir}/webapp/WEB-INF/web.xml" file="${basedir}/uninstall/web.xml"/>
+ <move file="${betterform.home}/uninstall/web.xml" tofile="${exist.rootdir}/webapp/WEB-INF/web.xml" overwrite="true" failonerror="false"/>
+ <delete dir="${betterform.home}/uninstall" includeemptydirs="true"/>
</target>
<target name="patchWebXml">
- <mkdir dir="${basedir}/uninstall"/>
-
- <xslt in="${exist.web.xml}" out="${exist.web.xml}.bf" force="true"
- style="${betterform.etc}/MergeWebXML.xsl">
- <classpath refid="generator.libs"/>
- <factory name="net.sf.saxon.TransformerFactoryImpl"/>
- <param name="webxml.path" expression="${exist.web.xml}"/>
- </xslt>
- <move file="${exist.web.xml}" tofile="${basedir}/uninstall/web.xml"/>
+ <mkdir dir="${betterform.home}/uninstall"/>
+ <property name="javax.xml.transform.TransformerFactory" value="net.sf.saxon.TransformerFactoryImpl"/>
+ <xslt-saxon in="${exist.web.xml}" style="${betterform.etc}/MergeWebXML.xsl" out="${exist.web.xml}.bf"/>
+ <move file="${exist.web.xml}" tofile="${betterform.home}/uninstall/web.xml" failonerror="true"/>
<move file="${exist.web.xml}.bf" tofile="${exist.web.xml}"/>
</target>
- <target name="deployBetterFORMResources" >
- <copy todir="${exist.rootdir}/webapp/betterform/forms">
- <fileset dir="${betterform.webapp}/forms" excludes="**/.svn **/.svn/**"/>
+ <target name="deployBFResources">
+ <echo>
+ Creating uninstall folder.
+ </echo>
+
+ <mkdir dir="${betterform.home}/uninstall"/>
+
+ <echo>
+ Copying libraries so start.config finds them
+ </echo>
+ <mkdir dir="${exist.rootdir}/webapp/WEB-INF/lib"/>
+ <copy todir="${exist.rootdir}/webapp/WEB-INF/lib" overwrite="true">
+ <fileset dir="${betterform.lib}"/>
</copy>
- <copy todir="${exist.rootdir}/webapp/betterform/resources">
- <fileset dir="${betterform.webapp}/resources" excludes="**/.svn **/.svn/**"/>
- </copy>
+ <echo>
+ Copying betterFORM configuration files to WEB-INF dir.
+ </echo>
<copy file="${betterform.webapp}/WEB-INF/betterform-config.xml" todir="${exist.rootdir}/webapp/WEB-INF"/>
<copy file="${betterform.webapp}/WEB-INF/dwr.xml" todir="${exist.rootdir}/webapp/WEB-INF"/>
<copy file="${betterform.webapp}/WEB-INF/dwr20.dtd" todir="${exist.rootdir}/webapp/WEB-INF"/>
- <!--<copy file="${basedir}/sample/xfGuess.xql" tofile="${exist.rootdir}/webapp/xquery/xfGuess.xql" />-->
-
- <mkdir dir="${basedir}/uninstall"/>
-
- <!-- TODO: remove when cocoon is removed -->
- <!-- eXist 1.5.0 -->
- <move file="${exist.rootdir}/extensions/cocoon/lib/ehcache-1.1.jar" tofile="${basedir}/uninstall/ehcache-1.1.jar" failonerror="false"/>
- <!-- eXist 1.4 -->
- <!-- <move file="${exist.rootdir}/lib/cocoon/ehcache-1.1.jar" tofile="${basedir}/uninstall/ehcache-1.1.jar" /> -->
-
+ <echo>
+ Copying betterFORM error page to webapp.
+ </echo>
<copy todir="${exist.rootdir}/webapp/betterform/xquery">
<fileset file="${betterform.webapp}/xquery/xferror.xql"/>
</copy>
Modified: trunk/eXist/extensions/betterform/src/main/etc/MergeWebXML.xsl
===================================================================
--- trunk/eXist/extensions/betterform/src/main/etc/MergeWebXML.xsl 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/etc/MergeWebXML.xsl 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,124 +1,147 @@
-<xsl:stylesheet version="2.0"
- xmlns:webxml="http://java.sun.com/xml/ns/j2ee"
- xmlns="http://java.sun.com/xml/ns/j2ee"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
- exclude-result-prefixes="webxml">
- <xsl:output method="xml" indent="yes" />
-
- <!-- author: Joern Turner / Lars Windauer
- TODO: check if eXist web.xml is already patched -->
-
- <xsl:param name="webxml.path" select="''"/>
-
- <xsl:template match="/">
- <xsl:choose>
- <xsl:when test="exists(/webxml:web-app/webxml:context-param/webxml:param-name[.='betterform.configfile'])">
- <xsl:message terminate="yes">betterFORM is already installed. Please run 'ant uninstall' before installing it again</xsl:message>
- </xsl:when>
- <xsl:otherwise>
- <xsl:result-document href="{$webxml.path}.original" encoding="UTF-8"><xsl:copy-of select="."/></xsl:result-document>
- <xsl:copy>
- <xsl:apply-templates/>
- </xsl:copy>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:template>
-
-
- <xsl:template match="/webxml:web-app/webxml:display-name">
- <xsl:copy-of select="."/>
- <xsl:text>
- </xsl:text>
- <context-param>
- <param-name>betterform.configfile</param-name>
- <param-value>WEB-INF/betterform-config.xml</param-value>
- </context-param>
- </xsl:template>
-
-
-
- <xsl:template match="/webxml:web-app/webxml:filter[last()]">
- <xsl:comment>XForms Filter</xsl:comment>
- <xsl:text>
- </xsl:text>
- <filter>
- <filter-name>XFormsFilter</filter-name>
- <filter-class>de.betterform.agent.web.filter.XFormsFilter</filter-class>
- <init-param>
- <param-name>useragent</param-name>
- <param-value>dojo</param-value>
- </init-param>
- </filter>
- <xsl:text>
- </xsl:text>
- <xsl:copy-of select="."/>
- </xsl:template>
-
- <xsl:template match="/webxml:web-app/webxml:servlet[last()]">
- <xsl:copy-of select="."/>
- <xsl:text>
-</xsl:text>
- <xsl:comment>betterFORM servlets</xsl:comment>
- <xsl:text>
- </xsl:text>
-
- <servlet>
- <servlet-name>Flux</servlet-name>
- <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>true</param-value>
- </init-param>
- </servlet>
-
- <servlet>
- <servlet-name>XFormsPostServlet</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.XFormsPostServlet</servlet-class>
- </servlet>
- </xsl:template>
-
- <xsl:template match="/webxml:web-app/webxml:filter-mapping[webxml:filter-name/text()='XQueryURLRewrite']">
- <xsl:text>
-</xsl:text>
- <filter-mapping>
- <filter-name>XFormsFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <filter-mapping>
- <filter-name>XFormsFilter</filter-name>
- <servlet-name>XFormsPostServlet</servlet-name>
- </filter-mapping>
- <xsl:text>
- </xsl:text>
- <xsl:copy-of select="."/>
- <xsl:text>
- </xsl:text><xsl:comment>betterFORM Flux Servlet Mapping</xsl:comment>
- <xsl:text>
- </xsl:text>
-
- <servlet-mapping>
- <servlet-name>Flux</servlet-name>
- <url-pattern>/Flux/*</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>XFormsPostServlet</servlet-name>
- <url-pattern>/XFormsPost</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>XQueryServlet</servlet-name>
- <url-pattern>*.xql</url-pattern>
- </servlet-mapping>
- </xsl:template>
-
-
- <xsl:template match="node()|@*">
- <xsl:copy>
- <xsl:apply-templates select="node()|@*"/>
- </xsl:copy>
- </xsl:template>
-
-
-</xsl:stylesheet>
+<xsl:stylesheet version="2.0"
+xmlns:webxml="http://java.sun.com/xml/ns/j2ee"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+exclude-result-prefixes="webxml">
+ <xsl:output method="xml" indent="yes" />
+ <xsl:param name="webxml.path" select="''" />
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="exists(/webxml:web-app/webxml:context-param/webxml:param-name[.='betterform.configfile'])">
+
+ <xsl:message terminate="yes">betterFORM is already
+ installed. Please run 'ant uninstall' before installing it
+ again</xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:result-document href="{$webxml.path}.original"
+ encoding="UTF-8">
+ <xsl:copy-of select="." />
+ </xsl:result-document>
+ <xsl:copy>
+ <xsl:apply-templates />
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:display-name">
+ <xsl:copy-of select="." />
+ <xsl:text>
+
+</xsl:text>
+ <context-param>
+ <param-name>betterform.configfile</param-name>
+ <param-value>WEB-INF/betterform-config.xml</param-value>
+ </context-param>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:filter[last()]">
+ <xsl:comment>XForms Filter</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <filter>
+ <filter-name>XFormsFilter</filter-name>
+ <filter-class>
+ de.betterform.agent.web.filter.XFormsFilter</filter-class>
+ <init-param>
+ <param-name>useragent</param-name>
+ <param-value>dojo</param-value>
+ </init-param>
+ </filter>
+ <xsl:text>
+
+</xsl:text>
+ <xsl:copy-of select="." />
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:servlet[last()]">
+ <xsl:copy-of select="." />
+ <xsl:text></xsl:text>
+ <xsl:comment>betterFORM servlets</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <servlet>
+ <servlet-name>Flux</servlet-name>
+ <servlet-class>
+ org.directwebremoting.servlet.DwrServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.XFormsPostServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>FormsServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.FormsServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>inspector</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.XFormsInspectorServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ResourceServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.resources.ResourceServlet</servlet-class>
+ </servlet>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:filter-mapping[webxml:filter-name/text()='XQueryURLRewrite']">
+
+ <xsl:text></xsl:text>
+
+
+ <filter-mapping>
+ <filter-name>XFormsFilter</filter-name>
+ <url-pattern>/rest/db/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>XFormsFilter</filter-name>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ </filter-mapping>
+ <xsl:text>
+
+</xsl:text>
+ <xsl:copy-of select="." />
+ <xsl:text>
+
+</xsl:text>
+ <xsl:comment>betterFORM Flux Servlet Mapping</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <servlet-mapping>
+ <servlet-name>Flux</servlet-name>
+ <url-pattern>/Flux/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ <url-pattern>/XFormsPost</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>XQueryServlet</servlet-name>
+ <url-pattern>*.xql</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>FormsServlet</servlet-name>
+ <url-pattern>/forms/formslist</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>inspector</servlet-name>
+ <url-pattern>/inspector/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ResourceServlet</servlet-name>
+ <url-pattern>/bfResources/*</url-pattern>
+ </servlet-mapping>
+ </xsl:template>
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*" />
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
Deleted: trunk/eXist/extensions/betterform/src/main/lib/betterform-3.1.0.jar
===================================================================
(Binary files differ)
Added: trunk/eXist/extensions/betterform/src/main/lib/betterform.jar
===================================================================
(Binary files differ)
Property changes on: trunk/eXist/extensions/betterform/src/main/lib/betterform.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-config.xml
===================================================================
--- trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-config.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-config.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -5,10 +5,9 @@
<properties>
<property name="xforms.schema" value="XFormsDatatypes11.xsd"
description="XForms Schema holding Simple Type Declarations"/>
-
+
<property name="initLogging" value="false" description="'true' if logging should be initialized by betterform, false otherwise"/>
-
<property name="log4j.file" value="WEB-INF/log4j.xml"
description="the location of the log4j configuration file relative to context"/>
@@ -17,21 +16,9 @@
<property name="uploadDir" value="upload" description="the name of the upload directory relative to context"/>
- <property name="resources.dir.name" description="name of the resources directory - the root of all betterForm resources files like JS, CSS, XSLT..."
- value="betterform/resources/"/>
- <!-- DEPRECATED -->
-<!--
- <property name="xslt.path" value="resources/xslt"
- description="directory location for XSLT files relative to context"/>
- <property name="scriptPath" value="/resources/scripts/"
- description="directory for script files relative to context"/>
- <property name="CSSPath" value="/resources/styles/"
- description="directory for betterForm CSS files relative to context"/>
--->
-
<property name="xslt.cache.enabled" value="true" description="flag for XSLT caching"/>
- <property name="error.page" value="betterform/xquery/xferror.xql"
+ <property name="error.page" value="betterfrom/xquery/xferror.xql"
description="location of error-page relative to context"/>
<!-- DEPRECATED -->
@@ -111,9 +98,41 @@
<property name="betterform.ui.defaultAlertText" value="The specified value is invalid"/>
<property name="betterform.debug-allowed" value="true" description="if debug may be switched by Url param 'debug'"/>
+ <!-- WARNING: not ready for production use -->
+ <property name="betterform.event-optimization-enabled" value="true" description="TBD: if event optimization is enabled, only events present within the current form will be processed"/>
<property name="webprocessor.doIncludes" value="true" description="if true the incoming XForms will be scanned for bf:include tags and transformed accordingly"/>
<property name="admin.mail" value="fo...@ba..." description="a mail address to report problems and errors with forms"/>
+
+ <!--
+ Full classpath of SSLProtocolSocketFactory which should be used by httpclient.
+ For now there is only one implementing Class in betterFORM, which allows verification of a server cert (KeyStoreSSLProtocolSocketFactory).
+ SSLProtocolSocketFactory-Handling will be activated if the property is specified.
+ -->
+<!--
+ <property name="httpclient.ssl.factory" value="de.betterform.connector.http.ssl.KeyStoreSSLProtocolSocketFactory" description="Full classpath of SSLProtocolSocketFactory which should be used by httpclient."/>
+-->
+ <!--
+ Specify defaultPort for SSLProtocolSocketFactory for httpclient.
+ If not specified 443 will be used.
+ See: http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/protocol/Protocol.html
+ -->
+ <property name="httpclient.ssl.factory.defaultPort" value="DEFAULT-SSL-PORT" description="Specify defaultPort for SSLProtocolSocketFactory for httpclient. 443 if not specified."/>
+
+ <!--
+ Location of JAVA keystore used by httpclient to verify trusted ssl-certs.
+ If / is omitted in the value "user.home" will be used a relative path.
+ Otherwise an absolute path is expected.
+ Used by: KeyStoreSSLProtocolSocketFactory
+ -->
+ <property name="httpclient.ssl.keystore.path" value="PATH-TO-KEYSTORE" description="Location of the keystore to be used by httpclient."/>
+
+ <!--
+ Password to unlock JAVA keystore.
+ Used by: KeyStoreSSLProtocolSocketFactory
+ -->
+ <property name="httpclient.ssl.keystore.passwd" value="KEYSTORE-PASSWD" description="Password to unlock keystore."/>
+
</properties>
<error-messages>
@@ -131,13 +150,27 @@
The internal name is used by the framework to identify
entities and resolve these to the associated filenames.
-->
- <!-- Standard stylesheet used for simple HTML 3.2 compatible Browsers without Javascript support -->
<useragents>
- <useragent name="html" value="html4.xsl"/>
- <useragent name="dojo" value="dojo.xsl"/>
- <useragent name="dojodev" value="dojo-dev.xsl"/>
+ <useragent name="html"
+ processor="de.betterform.agent.web.servlet.PlainHtmlProcessor"
+ description="request/response-oriented XForms processor without any JavaScript">
+ </useragent>
+ <useragent name="dojo"
+ processor="de.betterform.agent.web.flux.FluxProcessor"
+ description="AJAX-enabled useragent with packed resources for production environments">
+ </useragent>
+ <useragent name="dojodev"
+ processor="de.betterform.agent.web.flux.FluxProcessor"
+ description="AJAX-enabled useragent with development resources and debug support">
+ </useragent>
</useragents>
+ <ui-generators>
+ <ui-generator useragent="dojo" stylesheet="dojo.xsl"/>
+ <ui-generator useragent="dojodev" stylesheet="dojo-dev.xsl"/>
+ <ui-generator useragent="html" stylesheet="html4.xsl"/>
+ </ui-generators>
+
<connectors>
<!--
For each of the connector types you can specifiy one connector to handle one URI scheme.
@@ -146,6 +179,7 @@
<uri-resolver scheme="http" class="de.betterform.connector.http.HTTPURIResolver"/>
<uri-resolver scheme="https" class="de.betterform.connector.http.HTTPURIResolver"/>
<uri-resolver scheme="xmlrpc" class="de.betterform.connector.xmlrpc.XMLRPCURIResolver"/>
+ <uri-resolver scheme="context" class="de.betterform.connector.context.ContextMapResolver"/>
<!--
<uri-resolver scheme="context" class="de.betterform.connector.context.ContextResolver"/>
<uri-resolver scheme="contextobject" class="de.betterform.connector.context.ContextObjectResolver"/>
@@ -168,6 +202,7 @@
<submission-handler scheme="exec" class="de.betterform.connector.exec.ExecSubmissionHandler"/>
<submission-handler scheme="xslt" class="de.betterform.connector.xslt.XSLTSubmissionHandler"/>
<submission-handler scheme="model" class="de.betterform.connector.ModelSubmissionHandler"/>
+ <submission-handler scheme="context" class="de.betterform.connector.context.ContextMapSubmissionHandler"/>
<!-- <submission-handler scheme="jms" class="de.betterform.connector.jms.JMSSubmissionHandler"/>-->
<!--
These connector types are deprecated. Their usage is strongly discouraged,
@@ -185,6 +220,11 @@
public YourClass(Element, Model);
-->
<!--element namespace="http://yourdomain.com/path" name="yourcontrol" class="com.yourdomain.yourpackage.YourClass"/-->
+
+ <element namespace="http://betterform.sourceforge.net/xforms/controls" name="dialog" class="de.betterform.xml.xforms.ui.extensions.Dialog"/>
+ <element namespace="http://betterform.sourceforge.net/xforms/controls" name="show" class="de.betterform.xml.xforms.action.extensions.ShowAction"/>
+ <element namespace="http://betterform.sourceforge.net/xforms/controls" name="hide" class="de.betterform.xml.xforms.action.extensions.HideAction"/>
+
</custom-elements>
Modified: trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-version.info
===================================================================
--- trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-version.info 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/betterform-version.info 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1 +1 @@
-@web.app.name@ @web.app.version@ [build @web.app.build@]
\ No newline at end of file
+betterFORM limeGreen PreRelease
\ No newline at end of file
Deleted: trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/web.xml
===================================================================
--- trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/web.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/webapp/WEB-INF/web.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
- <display-name>betterForm</display-name>
- <context-param>
- <param-name>betterform.configfile</param-name>
- <param-value>WEB-INF/betterform-config.xml</param-value>
- </context-param>
-
-<!--
- This is an example mapping for XFormsServlet that can be used in applications that like to
- use a Servlet to process XForms. This was the standard approach up to version 2.1 which introduced
- the XFormsFilter.
- <servlet>
- <servlet-name>XFormsServlet</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.XFormsServlet</servlet-class>
-
- <load-on-startup>1</load-on-startup>
- </servlet>
--->
-
- <!-- XForms Filter -->
- <filter>
- <filter-name>XFormsFilter</filter-name>
- <filter-class>de.betterform.agent.web.filter.XFormsFilter</filter-class>
- <init-param>
- <param-name>useragent</param-name>
- <param-value>dojo</param-value>
- </init-param>
- </filter>
-
- <!-- XForms filter mapping
- maps the XFormsFilter to a specified Servlet or url-pattern. This example uses a
- url-pattern that matches all document under the forms directory. Other examples would be:
- - <url-pattern>*.xhtml</url-pattern> to match all xhtml files
- - <servlet-name>XFormsRequest</servlet-name> to match all requests to Servlet XFormsRequest
- -->
- <filter-mapping>
- <filter-name>XFormsFilter</filter-name>
- <url-pattern>*.xhtml</url-pattern>
- </filter-mapping>
-
- <error-page>
- <exception-type>javax.servlet.ServletException</exception-type>
- <location>/jsp/error.jsp</location>
- </error-page>
-
- <error-page>
- <error-code>500</error-code>
- <location>/jsp/error.jsp</location>
- </error-page>
-
-<!--
- alternative mapping if binding the Filter to a servlet.
- <filter-mapping>
- <filter-name>XFormsFilter</filter-name>
- <servlet-name>XFormsRequest</servlet-name>
- </filter-mapping>
--->
- <servlet>
- <servlet-name>Flux</servlet-name>
- <servlet-class>org.directwebremoting.servlet.DwrServlet</servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>true</param-value>
- </init-param>
-
- <!-- DEPRECATED -->
-<!--
- This entry may be uncommented to use relative paths in the served html-forms. Remember change the
- betterform.forms.uri.relative parameter of XFormsServlet as well.
- <init-param>
- <param-name>activeReverseAjaxEnabled</param-name>
- <param-value>true</param-value>
- </init-param>
--->
- </servlet>
-
-<!--
- <servlet>
- <servlet-name>foo</servlet-name>
- <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
- <init-param>
- <param-name>debug</param-name>
- <param-value>0</param-value>
- </init-param>
- <init-param>
- <param-name>listings</param-name>
- <param-value>false</param-value>
- </init-param>
- <init-param>
- <param-name>readonly</param-name>
- <param-value>false</param-value>
- </init-param>
- <load-on-startup>1</load-on-startup>
- </servlet>
--->
-
-
-<!--
- <servlet-mapping>
- <servlet-name>foo</servlet-name>
- <url-pattern>/</url-pattern>
- </servlet-mapping>
--->
-
-
-<!--
- This is an example servlet that can be used in conjunction with XFormsFilter by
- attaching the filter to this Servlet. This only parses the requested form document
- and passes the DOM along as a request attribute that will be picked up by the XFormsFilter.
- <servlet>
- <servlet-name>XFormsRequest</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.XFormsRequestServlet</servlet-class>
- </servlet>
--->
-
- <servlet>
- <servlet-name>PlainHtml</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.PlainHtmlServlet</servlet-class>
- </servlet>
- <servlet>
- <servlet-name>ViewServlet</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.ViewServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>XFormsServlet</servlet-name>
- <servlet-class>de.betterform.agent.web.servlet.XFormsRepeater</servlet-class>
- <init-param>
- <param-name>useragent</param-name>
- <param-value>dojo</param-value>
- </init-param>
- </servlet>
- <servlet-mapping>
- <servlet-name>Flux</servlet-name>
- <url-pattern>/Flux/*</url-pattern>
- </servlet-mapping>
-
-
-<!--
- Umcomment the respective entries when using XFormsServlet or XFormsRequestServlet.
-
- <servlet-mapping>
- <servlet-name>XFormsServlet</servlet-name>
- <url-pattern>/XFormsServlet</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>XFormsServlet</servlet-name>
- <url-pattern>/XFormsServlet</url-pattern>
- </servlet-mapping>
--->
-
-<!--
- <servlet-mapping>
- <servlet-name>XFormsRequest</servlet-name>
- <url-pattern>/xfrequest</url-pattern>
- </servlet-mapping>
--->
- <servlet-mapping>
- <servlet-name>PlainHtml</servlet-name>
- <url-pattern>/PlainHtml/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ViewServlet</servlet-name>
- <url-pattern>/view</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>XFormsServlet</servlet-name>
- <url-pattern>/repeater/*</url-pattern>
- </servlet-mapping>
- <welcome-file-list>
- <welcome-file>index.html</welcome-file>
- </welcome-file-list>
-
-
-<!--
- <security-constraint>
- <web-resource-collection>
- <web-resource-name>betterForm Member Area</web-resource-name>
- <url-pattern>/jsp/*</url-pattern>
- <http-method>DELETE</http-method>
- <http-method>GET</http-method>
- <http-method>POST</http-method>
- <http-method>PUT</http-method>
- </web-resource-collection>
- <auth-constraint>
- <role-name>tomcat</role-name>
- <role-name>role1</role-name>
- </auth-constraint>
- </security-constraint>
- <login-config>
- <auth-method>FORM</auth-method>
- <realm-name>Example Form-Based Authentication Area</realm-name>
- <form-login-config>
- <form-login-page>/login.jsp</form-login-page>
- <form-error-page>/login_error.jsp</form-error-page>
- </form-login-config>
- </login-config>
--->
-
-</web-app>
Modified: trunk/eXist/extensions/betterform/src/main/webapp/xquery/xferror.xql
===================================================================
--- trunk/eXist/extensions/betterform/src/main/webapp/xquery/xferror.xql 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/webapp/xquery/xferror.xql 2011-03-29 15:18:43 UTC (rev 14051)
@@ -20,7 +20,7 @@
body{
font-family:Tahoma;
font-size:14pt;
- background:url('/exist/betterform/resources/images/bgOne.gif') repeat-x scroll;
+ background:url('resources/images/bgOne.gif') repeat-x scroll;
}
pre { font-size:8pt; }
.errorContent{
@@ -71,7 +71,4 @@
</form>
</div>
</body>
-</html>
-
-
-
+</html>
\ No newline at end of file
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/about.html
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/about.html 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/about.html 2011-03-29 15:18:43 UTC (rev 14051)
@@ -55,10 +55,10 @@
</ul>
<p>
Timetracker was developed by the betterFORM team on top of <a href="http://exist.sourceforge.net" target="_blank">eXist 1.4</a>
- and <a href="http://www.betterform.de" target="_blank">betterFORM lightSteelblue (3.1) XRX edition</a>.
+ and <a href="http://www.betterform.de" target="_blank">betterFORM limegreen XRX edition</a>.
</p>
- <p>Copyright 2010 betterFORM project</p>
+ <p>Copyright 2011 betterFORM project</p>
<div style="text-align:center;">
<div dojotype="dijit.form.Button" showlabel="true">
<span>Close</span>
@@ -66,4 +66,4 @@
</div>
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/app-info.xml
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/app-info.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/app-info.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,7 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<app name="xfTimeTracker" rootCollection="">
+ <organisation></organisation>
<description>XRX Timetracker Sample</description>
<version>0.2</version>
+ <release-date></release-date>
<authors>
<author>Joern Turner</author>
<author>Fabian Otto</author>
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/data/controller.xml
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/data/controller.xml 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/data/controller.xml 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,6 +1,6 @@
<data>
<next-id>3</next-id>
<error hasError="false"><![CDATA[]]></error>
- <dbPath>/exist/rest/db/betterform/apps/timetracker</dbPath>
+ <dbPath>/betterform/rest/db/betterform/apps/timetracker</dbPath>
<timestamp/>
</data>
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-item.xql
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-item.xql 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-item.xql 2011-03-29 15:18:43 UTC (rev 14051)
@@ -8,7 +8,8 @@
declare function local:timestamp() as xs:string{
let $timestamp := request:get-parameter("timestamp", "")
- let $path2resource := concat("/exist/rest/db/betterform/apps/timetracker/data/task?_query=/*/task",encode-for-uri('['), "created='" ,$timestamp,"'",encode-for-uri(']'))
+ let $contextPath := request:get-context-path()
+ let $path2resource := concat($contextPath,"/rest/db/betterform/apps/timetracker/data/task?_query=/*/task",encode-for-uri('['), "created='" ,$timestamp,"'",encode-for-uri(']'))
return $path2resource
};
@@ -23,25 +24,22 @@
};
-
+let $contextPath := request:get-context-path()
+return
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:exist="http://exist.sourceforge.net/NS/exist"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>Edit Task</title>
- <link rel="stylesheet" type="text/css" href="/exist/resources/styles/bf.css"/>
- <link rel="stylesheet" type="text/css" href="/exist/resources/styles/demo.css"/>
- <link rel="stylesheet" type="text/css"
- href="/exist/rest/db/betterform/apps/timetracker/resources/timetracker.css"/>
- <link rel="stylesheet" type="text/css"
- href="/exist/rest/db/betterform/apps/timetracker/resources/InlineRoundBordersAlert.css"/>
+ <link rel="stylesheet" type="text/css" href="./resources/timetracker.css"/>
+ <link rel="stylesheet" type="text/css" href="./resources/InlineRoundBordersAlert.css"/>
</head>
<body class="tundra InlineRoundBordersAlert">
<div id="xforms">
<div style="display:none">
<xf:model>
- <xf:instance id="i-task" src="/exist/rest/db/betterform/apps/timetracker/data/task.xml"/>
+ <xf:instance id="i-task" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/task.xml"/>
<xf:bind nodeset="task">
<xf:bind nodeset="date" type="xf:date" required="true()" />
@@ -61,15 +59,15 @@
replace="instance"
serialization="none">
<!--
- <xf:resource value="concat('/exist/rest/db/betterform/apps/timetracker/data/task?_query=/data/task', encode-for-uri('['),'created=', '{local:timestamp()}',encode-for-uri(']') )"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/data/task?_query=/data/task', encode-for-uri('['),'created=', '{local:timestamp()}',encode-for-uri(']') )"/>
-->
</xf:submission>
- <xf:instance id="i-project" src="/exist/rest/db/betterform/apps/timetracker/data/project.xml"/>
- <xf:instance id="i-worker" src="/exist/rest/db/betterform/apps/timetracker/data/worker.xml"/>
- <xf:instance id="i-tasktype" src="/exist/rest/db/betterform/apps/timetracker/data/tasktype.xml"/>
- <xf:instance id="i-controller" src="/exist/rest/db/betterform/apps/timetracker/data/controller.xml"/>
+ <xf:instance id="i-project" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/project.xml"/>
+ <xf:instance id="i-worker" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/worker.xml"/>
+ <xf:instance id="i-tasktype" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/tasktype.xml"/>
+ <xf:instance id="i-controller" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/controller.xml"/>
<xf:instance id="tmp">
<data xmlns="">
@@ -81,7 +79,7 @@
method="put"
replace="none"
ref="instance()">
- <xf:resource value="concat('/exist/rest/db/betterform/apps/timetracker/data/task/', instance('i-task')/task/created, '.xml')"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/data/task/', instance('i-task')/task/created, '.xml')"/>
<xf:header>
<xf:name>username</xf:name>
@@ -132,7 +130,7 @@
<xf:submission id="s-clean"
ref="instance('i-task')"
- resource="/exist/rest/db/betterform/apps/timetracker/data/task.xml"
+ resource="{$contextPath}/rest/db/betterform/apps/timetracker/data/task.xml"
method="get"
replace="instance"
instance="i-task">
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-project.xql
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-project.xql 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-project.xql 2011-03-29 15:18:43 UTC (rev 14051)
@@ -8,7 +8,8 @@
declare function local:getProject() as xs:string{
let $id := request:get-parameter("id", "")
- let $path2resource := concat("/exist/rest/db/betterform/apps/timetracker/data?_query=/*/project",encode-for-uri('['), "@id='" ,$id,"'",encode-for-uri(']'))
+ let $contextPath := request:get-context-path()
+ let $path2resource := concat("{$contextPath}/rest/db/betterform/apps/timetracker/data?_query=/*/project",encode-for-uri('['), "@id='" ,$id,"'",encode-for-uri(']'))
return $path2resource
};
@@ -18,7 +19,8 @@
};
-
+let $contextPath := request:get-context-path()
+return
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:exist="http://exist.sourceforge.net/NS/exist"
@@ -30,15 +32,15 @@
<div id="xforms" style="height:360px;">
<div style="display:none">
<xf:model>
- <xf:instance id="i-project" src="/exist/rest/db/betterform/apps/timetracker/data/project.xml"/>
+ <xf:instance id="i-project" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/project.xml"/>
- <xf:instance id="i-controller" src="/exist/rest/db/betterform/apps/timetracker/data/controller.xml"/>
+ <xf:instance id="i-controller" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/controller.xml"/>
<xf:submission id="s-add"
method="put"
replace="none">
- <xf:resource value="concat('/exist/rest/db/betterform/apps/timetracker/data/project.xml')"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/data/project.xml')"/>
<xf:header>
<xf:name>username</xf:name>
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-worker.xql
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-worker.xql 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/edit/edit-worker.xql 2011-03-29 15:18:43 UTC (rev 14051)
@@ -8,7 +8,8 @@
declare function local:getWorker() as xs:string{
let $id := request:get-parameter("id", "")
- let $path2resource := concat("/exist/rest/db/betterform/apps/timetracker/data?_query=/*/worker",encode-for-uri('['), "@id='" ,$id,"'",encode-for-uri(']'))
+ let $contextPath := request:get-context-path()
+ let $path2resource := concat("{$contextPath}/rest/db/betterform/apps/timetracker/data?_query=/*/worker",encode-for-uri('['), "@id='" ,$id,"'",encode-for-uri(']'))
return $path2resource
};
@@ -18,7 +19,8 @@
};
-
+let $contextPath := request:get-context-path()
+return
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:exist="http://exist.sourceforge.net/NS/exist"
@@ -30,15 +32,15 @@
<div id="xforms" style="height:360px;">
<div style="display:none">
<xf:model>
- <xf:instance id="i-worker" src="/exist/rest/db/betterform/apps/timetracker/data/worker.xml"/>
+ <xf:instance id="i-worker" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/worker.xml"/>
- <xf:instance id="i-controller" src="/exist/rest/db/betterform/apps/timetracker/data/controller.xml"/>
+ <xf:instance id="i-controller" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/controller.xml"/>
<xf:submission id="s-add"
method="put"
replace="none">
- <xf:resource value="concat('/exist/rest/db/betterform/apps/timetracker/data/worker.xml')"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/data/worker.xml')"/>
<xf:header>
<xf:name>username</xf:name>
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/index.xql
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/index.xql 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/index.xql 2011-03-29 15:18:43 UTC (rev 14051)
@@ -1,35 +1,21 @@
xquery version "1.0";
declare option exist:serialize "method=xhtml media-type=application/xhtml+html";
+let $contextPath := request:get-context-path()
+return
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:xf="http://www.w3.org/2002/xforms"
xmlns:ev="http://www.w3.org/2001/xml-events"
xml:lang="en">
<head>
<title>betterFORM Demo XForms: Address, Registration, FeatureExplorer</title>
+ <link rel="stylesheet" type="text/css" href="./resources/InlineRoundBordersAlert.css"/>
+ <link rel="stylesheet" type="text/css" href="./resources/timetracker.css"/>
- <link rel="stylesheet" type="text/css" href="/exist/resources/styles/bf.css"/>
- <link rel="stylesheet" type="text/css" href="/exist/resources/styles/demo.css"/>
- <link rel="stylesheet" type="text/css"
- href="/exist/rest/db/betterform/apps/timetracker/resources/InlineRoundBordersAlert.css"/>
- <link rel="stylesheet" type="text/css"
- href="/exist/rest/db/betterform/apps/timetracker/resources/timetracker.css"/>
+ <script type="text/javascript" src="{$contextPath}/bfResources/scripts/betterform/betterform-TimeTracker.js"> </script>
<script type="text/javascript">
<!--
- dojo.require("dojo.parser");
- dojo.require("dijit.dijit");
- dojo.require("dijit.Declaration");
- dojo.require("dijit.Toolbar");
- dojo.require("dijit.ToolbarSeparator");
- dojo.require("dijit.Dialog");
- dojo.require("dijit.TitlePane");
- dojo.require("betterform.ui.container.Group");
- dojo.require('dijit.layout.ContentPane');
- dojo.require("dijit.form.Button");
- dojo.require("dijit.form.CheckBox");
-
-
var xfReadySubscribers;
function embed(targetTrigger,targetMount){
@@ -133,7 +119,7 @@
<xf:bind nodeset="to" type="xf:date" />
<xf:submission id="s-query-tasks"
- resource="/exist/rest/db/betterform/apps/timetracker/views/list-items.xql"
+ resource="{$contextPath}/rest/db/betterform/apps/timetracker/views/list-items.xql"
method="get"
replace="embedHTML"
targetid="embedInline"
@@ -148,7 +134,7 @@
method="delete"
replace="none"
validate="false">
- <xf:resource value="concat('/exist/rest/db/betterform/apps/timetracker/data/task/',instance('i-vars')/currentTask,'.xml')"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/data/task/',instance('i-vars')/currentTask,'.xml')"/>
<xf:header>
<xf:name>username</xf:name>
<xf:value>admin</xf:value>
@@ -170,7 +156,7 @@
</xf:action>
</xf:submission>
- <xf:instance id="i-project" src="/exist/rest/db/betterform/apps/timetracker/data/project.xml" />
+ <xf:instance id="i-project" src="{$contextPath}/rest/db/betterform/apps/timetracker/data/project.xml" />
<xf:instance id="i-vars">
<data xmlns="">
@@ -185,7 +171,7 @@
ref="instance('i-vars')/selectedTasks"
method="post"
replace="new"
- resource="/exist/rest/db/betterform/apps/timetracker/reports/timeAndEffort.xql">
+ resource="{$contextPath}/rest/db/betterform/apps/timetracker/reports/timeAndEffort.xql">
<xf:message ev:event="xforms-submit">here it comes...</xf:message>
</xf:submission>
@@ -209,7 +195,7 @@
</xf:instance>
<xf:submission id="s-query-tasks-rest"
- resource="/exist/rest/db/betterform/apps/timetracker/data/task"
+ resource="{$contextPath}/rest/db/betterform/apps/timetracker/data/task"
method="get"
replace="embedHTML"
targetid="embedInline"
@@ -232,7 +218,7 @@
<xf:action>
<xf:load show="embed" targetid="embedDialog">
<xf:resource
- value="'/exist/rest/db/betterform/apps/timetracker/edit/edit-item.xql#xforms'"/>
+ value="'{$contextPath}/rest/db/betterform/apps/timetracker/edit/edit-item.xql#xforms'"/>
</xf:load>
</xf:action>
</xf:trigger>
@@ -241,8 +227,7 @@
<xf:label>new</xf:label>
<xf:action>
<xf:load show="embed" targetid="embedDialog">
- <xf:resource
- value="concat('/exist/rest/db/betterform/apps/timetracker/edit/edit-item.xql#xforms?timestamp=',instance('i-vars')/currentTask)"/>
+ <xf:resource value="concat('{$contextPath}/rest/db/betterform/apps/timetracker/edit/edit-item.xql#xforms?timestamp=',instance('i-vars')/currentTask)"/>
</xf:load>
</xf:action>
</xf:trigger>
@@ -270,7 +255,7 @@
<!-- ######################### Content here ################################## -->
<div id="content">
<div id="header">
- <a href="http://www.betterform.de"><img src="/exist/rest/db/betterform/apps/timetracker/resources/images/bf_logo_201x81.png" alt="betterFORM"/></a>
+ <a href="http://www.betterform.de"><img src="{$contextPath}/rest/db/betterform/apps/timetracker/resources/images/bf_logo_201x81.png" alt="betterFORM"/></a>
<div id="appName">Timetracker</div>
</div>
<div id="toolbar" dojoType="dijit.Toolbar">
@@ -368,7 +353,7 @@
</div>
</div>
- <img id="shadowTop" src="/exist/rest/db/betterform/apps/timetracker/resources/images/shad_top.jpg" alt=""/>
+ <img id="shadowTop" src="{$contextPath}/rest/db/betterform/apps/timetracker/resources/images/shad_top.jpg" alt=""/>
<div id="fromTo">
<xf:output value="concat(from,' - ',to)" id="durationLabel">
Modified: trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/InlineRoundBordersAlert.css
===================================================================
--- trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/InlineRoundBordersAlert.css 2011-03-29 15:12:33 UTC (rev 14050)
+++ trunk/eXist/extensions/betterform/src/main/xrx/timetracker/resources/InlineRoundBordersAlert.css 2011-03-29 15:18:43 UTC (rev 14051)
@@ -51,14 +51,14 @@
}
-.InlineRoundBordersAlert .caVerticalTableLabel,
+.InlineRoundBordersAlert .bfVerticalTableLabel,
.InlineRoundBordersAlert .caLabelColumn {
padding-right: 5px;
width: 23%;
text-align:right;
}
-.InlineRoundBordersAlert .caVerticalTableValue {
+.InlineRoundBordersAlert .bfVerticalTableValue {
width: 24%;
height:29px;
padding-bottom:5px;
@@ -92,7 +92,7 @@
font-size: 9pt;
font-family: sans-serif;
width:95%;
- padding: 7px 0px 3px 20px;
+ padding: 6px 0px 3px 25px;
...
[truncated message content] |
|
From: <zw...@us...> - 2011-03-29 15:12:43
|
Revision: 14050
http://exist.svn.sourceforge.net/exist/?rev=14050&view=rev
Author: zwobit
Date: 2011-03-29 15:12:33 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[betterFORM extension] added initial betterFORM extension for exist 1.4 :
- added XRX-Sample to setup.xqm
- modified start.config for extension libraries
- added and enabled extension in build.properties
- added extension to build-impl.xml
- added extension to extensions-directory
Modified Paths:
--------------
stable/eXist-1.4.x/build/scripts/build-impl.xml
stable/eXist-1.4.x/extensions/build.properties
stable/eXist-1.4.x/src/org/exist/start/start.config
stable/eXist-1.4.x/webapp/admin/setup.xqm
Added Paths:
-----------
stable/eXist-1.4.x/extensions/betterform/
stable/eXist-1.4.x/extensions/betterform/build.xml
stable/eXist-1.4.x/extensions/betterform/src/
stable/eXist-1.4.x/extensions/betterform/src/main/
stable/eXist-1.4.x/extensions/betterform/src/main/etc/
stable/eXist-1.4.x/extensions/betterform/src/main/etc/MergeWebXML.xsl
stable/eXist-1.4.x/extensions/betterform/src/main/lib/
stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterFORM-LICENSE.txt
stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterform.jar
stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-2.4.jar
stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-LICENSE.txt
stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-2.0.5.jar
stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-LICENSE.txt
stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-1.6.2.jar
stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-LICENSE.txt
stable/eXist-1.4.x/extensions/betterform/src/main/lib/saxon-9.2.1.5-LICENSE.txt
stable/eXist-1.4.x/extensions/betterform/src/main/lib/saxon-9.2.1.5.jar
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/WEB-INF/
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/WEB-INF/betterform-config.xml
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/WEB-INF/betterform-version.info
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/WEB-INF/dwr.xml
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/WEB-INF/dwr20.dtd
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/xquery/
stable/eXist-1.4.x/extensions/betterform/src/main/webapp/xquery/xferror.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/about.html
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/app-info.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/controller.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/project.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100317-135612.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100317-141642.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101218.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101302.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101336.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101414.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101457.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101547.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101624.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101708.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101747.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101830.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-101857.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-102011.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-102143.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-102237.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-102318.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-102410.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-112803.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-113514.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-114044.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-114213.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-114248.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-114329.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-120344.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-120609.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-120709.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-120849.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-121226.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-121348.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-121625.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task/20100601-121735.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/task.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/tasktype.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/data/worker.xml
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/edit/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/edit/edit-item.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/edit/edit-project.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/edit/edit-worker.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/index.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/lucene/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/lucene/collection.xconf
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/reports/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/reports/timeAndEffort.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/InlineRoundBordersAlert.css
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/bf_logo_201x81.png
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/error.png
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/hint.png
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/ok.png
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/search.gif
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/shad_top.jpg
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/images/tabClose.gif
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/resources/timetracker.css
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/billableForProject.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/reindex.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/search-form.html
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/search-orig.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/search/search.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/update/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/update/update-billed.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/flattenAttributes.xsl
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/list-items-html.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/list-items-json.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/list-items.html
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/list-items.xql
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/list-items.xsl
stable/eXist-1.4.x/extensions/betterform/src/main/xrx/timetracker/views/timetracker.xsl
Modified: stable/eXist-1.4.x/build/scripts/build-impl.xml
===================================================================
--- stable/eXist-1.4.x/build/scripts/build-impl.xml 2011-03-29 14:51:10 UTC (rev 14049)
+++ stable/eXist-1.4.x/build/scripts/build-impl.xml 2011-03-29 15:12:33 UTC (rev 14050)
@@ -381,8 +381,7 @@
<!-- ================================================================== -->
<!-- Build all -->
<!-- ================================================================== -->
- <target name="all"
- depends="jar,wrapper,extension-modules,extension-indexes,extension-expath,extension-versioning,extension-xqdoc,extension-fluent,extension-xprocxq,extension-debuggee,extension-webdav,test-compile"
+ <target name="all" depends="jar,wrapper,extension-betterform, extension-modules,extension-indexes,extension-expath,extension-versioning,extension-xqdoc,extension-fluent,extension-xprocxq,extension-debuggee,extension-webdav,test-compile"
description="Build all">
<antcall target="sign"/>
</target>
@@ -510,6 +509,7 @@
<ant antfile="xprocxq.xml" dir="extensions" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/debuggee" target="clean" inheritall="false"/>
<ant antfile="build.xml" dir="extensions/webdav" target="clean" inheritall="false"/>
+ <ant antfile="build.xml" dir="extensions/betterform" target="clean" inheritall="false"/>
<antcall target="extensions-xslt"/>
</target>
@@ -554,6 +554,10 @@
<ant antfile="build.xml" dir="tools/wrapper" inheritall="false"/>
</target>
+ <target name="extension-betterform" depends="jar">
+ <ant antfile="build.xml" dir="extensions/betterform" inheritall="false"/>
+ </target>
+
<target name="extension-modules" depends="jar">
<ant antfile="build.xml" dir="extensions/modules" inheritall="false"/>
</target>
Added: stable/eXist-1.4.x/extensions/betterform/build.xml
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/build.xml (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/build.xml 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,140 @@
+<!--
+ ~ Copyright (c) 2011. betterForm Project - http://www.betterform.de
+ ~ Licensed under the terms of BSD License
+ ~ Author betterFORM team ( info AT betterform.de )
+ -->
+
+<project name="betterFORM extension for eXist" default="install" basedir=".">
+ <property name="exist.rootdir" value="${basedir}/../.."/>
+ <property name="exist.web.xml" value="${exist.rootdir}/webapp/WEB-INF/web.xml"/>
+
+ <property file="../local.build.properties"/>
+ <property file="../build.properties"/>
+
+ <condition property="include.feature.betterform.config">
+ <istrue value="${include.feature.betterform}"/>
+ </condition>
+
+ <condition property="betterform.installed">
+ <available file="${exist.rootdir}/webapp/betterform"/>
+ </condition>
+
+ <property name="betterform.home" value="${exist.rootdir}/extensions/betterform"/>
+ <property name="betterform.etc" value="${betterform.home}/src/main/etc"/>
+ <property name="betterform.xrx" value="${betterform.home}/src/main/xrx"/>
+ <property name="betterform.lib" value="${betterform.home}/src/main/lib"/>
+ <property name="betterform.webapp" value="${betterform.home}/src/main/webapp"/>
+
+ <!--todo:move property to build.properties.xml-->
+ <property name="bf.release.name" value="betterform-3.2.0"/>
+
+
+ <macrodef name="xslt-saxon">
+ <attribute name="in"/>
+ <attribute name="out"/>
+ <attribute name="style"/>
+ <sequential>
+ <echo level="info">XSLT Generating @{out}</echo>
+ <java classname="net.sf.saxon.Transform"
+ classpath="${betterform.home}/src/main/lib/saxon-9.2.1.5.jar"
+ logError="true"
+ output="@{out}"
+ fork="true">
+ <arg value="@{in}"/>
+ <arg value="@{style}"/>
+ </java>
+ </sequential>
+ </macrodef>
+
+ <path id="classpath.exist">
+ <fileset dir="${exist.rootdir}/lib/core">
+ <include name="*.jar"/>
+ </fileset>
+ <pathelement path="${exist.rootdir}/exist.jar"/>
+ <pathelement path="${exist.rootdir}/exist-optional.jar"/>
+ </path>
+
+ <target name="install" description="install betterFORM into an existing eXist XML DB installation"
+ if="include.feature.betterform.config" unless="betterform.installed">
+ <echo>
+ Add betterFORM config parameters to eXist to ${exist.web.xml}
+ </echo>
+
+ <antcall target="patchWebXml"/>
+
+ <echo>
+ Deploy betterFORM resources to eXist webapp (${exist.web.xml}/webapp)
+ </echo>
+
+ <antcall target="deployBFResources"/>
+ </target>
+
+ <target name="clean" xmlns:xmldb="http://exist-db.org/ant" description="uninstall betterFORM"
+ if="include.feature.betterform.config">
+ <echo>
+ Uninstalling betterFORM.
+ </echo>
+
+
+ <delete dir="${exist.rootdir}/webapp/betterform"/>
+
+ <move file="${betterform.home}/uninstall/ehcache-1.1.jar" tofile="${exist.rootdir}/lib/cocoon/ehcache-1.1.jar"
+ failonerror="false"/>
+ <move file="${betterform.home}/uninstall/commons-lang-2.0-20041007T2305.jar"
+ tofile="${exist.rootdir}/lib/cocoon/commons-lang-2.0-20041007T2305.jar" failonerror="false"/>
+
+ <!--delete files from WEB-INF-->
+ <delete file="${exist.rootdir}/webapp/WEB-INF/betterform-config.xml" />
+ <delete file="${exist.rootdir}/webapp/WEB-INF/dwr.xml" />
+ <delete file="${exist.rootdir}/webapp/WEB-INF/dwr20.dtd" />
+
+ <delete dir="${exist.rootdir}/webapp/WEB-INF/lib"/>
+
+ <!-- restore web.xml -->
+ <move file="${betterform.home}/uninstall/web.xml" tofile="${exist.rootdir}/webapp/WEB-INF/web.xml" overwrite="true" failonerror="false"/>
+ <delete dir="${betterform.home}/uninstall" includeemptydirs="true"/>
+ </target>
+
+ <target name="patchWebXml">
+ <mkdir dir="${betterform.home}/uninstall"/>
+ <property name="javax.xml.transform.TransformerFactory" value="net.sf.saxon.TransformerFactoryImpl"/>
+ <xslt-saxon in="${exist.web.xml}" style="${betterform.etc}/MergeWebXML.xsl" out="${exist.web.xml}.bf"/>
+ <move file="${exist.web.xml}" tofile="${betterform.home}/uninstall/web.xml" failonerror="true"/>
+ <move file="${exist.web.xml}.bf" tofile="${exist.web.xml}"/>
+ </target>
+
+ <target name="deployBFResources">
+ <echo>
+ Creating uninstall folder.
+ </echo>
+
+ <mkdir dir="${betterform.home}/uninstall"/>
+ <move file="${exist.rootdir}/lib/cocoon/ehcache-1.1.jar" tofile="${betterform.home}/uninstall/ehcache-1.1.jar"
+ failonerror="true"/>
+ <move file="${exist.rootdir}/lib/cocoon/commons-lang-2.0-20041007T2305.jar"
+ tofile="${betterform.home}/uninstall/commons-lang-2.0-20041007T2305.jar" failonerror="true"/>
+
+ <echo>
+ Copying libraries so start.config finds them
+ </echo>
+ <mkdir dir="${exist.rootdir}/webapp/WEB-INF/lib"/>
+ <copy todir="${exist.rootdir}/webapp/WEB-INF/lib" overwrite="true">
+ <fileset dir="${betterform.lib}"/>
+ </copy>
+
+ <echo>
+ Copying betterFORM configuration files to WEB-INF dir.
+ </echo>
+ <copy file="${betterform.webapp}/WEB-INF/betterform-config.xml" todir="${exist.rootdir}/webapp/WEB-INF"/>
+ <copy file="${betterform.webapp}/WEB-INF/dwr.xml" todir="${exist.rootdir}/webapp/WEB-INF"/>
+ <copy file="${betterform.webapp}/WEB-INF/dwr20.dtd" todir="${exist.rootdir}/webapp/WEB-INF"/>
+
+ <echo>
+ Copying betterFORM error page to webapp.
+ </echo>
+ <copy todir="${exist.rootdir}/webapp/betterform/xquery">
+ <fileset file="${betterform.webapp}/xquery/xferror.xql"/>
+ </copy>
+ </target>
+
+</project>
Added: stable/eXist-1.4.x/extensions/betterform/src/main/etc/MergeWebXML.xsl
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/src/main/etc/MergeWebXML.xsl (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/src/main/etc/MergeWebXML.xsl 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,147 @@
+<xsl:stylesheet version="2.0"
+xmlns:webxml="http://java.sun.com/xml/ns/j2ee"
+xmlns="http://java.sun.com/xml/ns/j2ee"
+xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+exclude-result-prefixes="webxml">
+ <xsl:output method="xml" indent="yes" />
+ <xsl:param name="webxml.path" select="''" />
+ <xsl:template match="/">
+ <xsl:choose>
+ <xsl:when test="exists(/webxml:web-app/webxml:context-param/webxml:param-name[.='betterform.configfile'])">
+
+ <xsl:message terminate="yes">betterFORM is already
+ installed. Please run 'ant uninstall' before installing it
+ again</xsl:message>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:result-document href="{$webxml.path}.original"
+ encoding="UTF-8">
+ <xsl:copy-of select="." />
+ </xsl:result-document>
+ <xsl:copy>
+ <xsl:apply-templates />
+ </xsl:copy>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:display-name">
+ <xsl:copy-of select="." />
+ <xsl:text>
+
+</xsl:text>
+ <context-param>
+ <param-name>betterform.configfile</param-name>
+ <param-value>WEB-INF/betterform-config.xml</param-value>
+ </context-param>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:filter[last()]">
+ <xsl:comment>XForms Filter</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <filter>
+ <filter-name>XFormsFilter</filter-name>
+ <filter-class>
+ de.betterform.agent.web.filter.XFormsFilter</filter-class>
+ <init-param>
+ <param-name>useragent</param-name>
+ <param-value>dojo</param-value>
+ </init-param>
+ </filter>
+ <xsl:text>
+
+</xsl:text>
+ <xsl:copy-of select="." />
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:servlet[last()]">
+ <xsl:copy-of select="." />
+ <xsl:text></xsl:text>
+ <xsl:comment>betterFORM servlets</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <servlet>
+ <servlet-name>Flux</servlet-name>
+ <servlet-class>
+ org.directwebremoting.servlet.DwrServlet</servlet-class>
+ <init-param>
+ <param-name>debug</param-name>
+ <param-value>true</param-value>
+ </init-param>
+ </servlet>
+ <servlet>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.XFormsPostServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>FormsServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.FormsServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>inspector</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.servlet.XFormsInspectorServlet</servlet-class>
+ </servlet>
+ <servlet>
+ <servlet-name>ResourceServlet</servlet-name>
+ <servlet-class>
+ de.betterform.agent.web.resources.ResourceServlet</servlet-class>
+ </servlet>
+ </xsl:template>
+ <xsl:template match="/webxml:web-app/webxml:filter-mapping[webxml:filter-name/text()='XQueryURLRewrite']">
+
+ <xsl:text></xsl:text>
+
+
+ <filter-mapping>
+ <filter-name>XFormsFilter</filter-name>
+ <url-pattern>/rest/db/*</url-pattern>
+ </filter-mapping>
+ <filter-mapping>
+ <filter-name>XFormsFilter</filter-name>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ </filter-mapping>
+ <xsl:text>
+
+</xsl:text>
+ <xsl:copy-of select="." />
+ <xsl:text>
+
+</xsl:text>
+ <xsl:comment>betterFORM Flux Servlet Mapping</xsl:comment>
+ <xsl:text>
+
+</xsl:text>
+ <servlet-mapping>
+ <servlet-name>Flux</servlet-name>
+ <url-pattern>/Flux/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>XFormsPostServlet</servlet-name>
+ <url-pattern>/XFormsPost</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>XQueryServlet</servlet-name>
+ <url-pattern>*.xql</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>FormsServlet</servlet-name>
+ <url-pattern>/forms/formslist</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>inspector</servlet-name>
+ <url-pattern>/inspector/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>ResourceServlet</servlet-name>
+ <url-pattern>/bfResources/*</url-pattern>
+ </servlet-mapping>
+ </xsl:template>
+ <xsl:template match="node()|@*">
+ <xsl:copy>
+ <xsl:apply-templates select="node()|@*" />
+ </xsl:copy>
+ </xsl:template>
+</xsl:stylesheet>
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterFORM-LICENSE.txt
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterFORM-LICENSE.txt (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterFORM-LICENSE.txt 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,26 @@
+The BSD License
+-------------------------------------
+Copyright (c) 2010, betterForm Project (http://www.betterform.de)
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+Redistributions of source code must retain the above copyright notice, this list
+of conditions and the following disclaimer.
+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. Neither the name of the betterForm Project
+nor the names of its contributors may be used to endorse or promote products derived
+from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+EXPRESS 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 COPYRIGHT HOLDER OR 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.
+
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterform.jar
===================================================================
(Binary files differ)
Property changes on: stable/eXist-1.4.x/extensions/betterform/src/main/lib/betterform.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-2.4.jar
===================================================================
(Binary files differ)
Property changes on: stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-2.4.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-LICENSE.txt
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-LICENSE.txt (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/src/main/lib/commons-lang-LICENSE.txt 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-2.0.5.jar
===================================================================
(Binary files differ)
Property changes on: stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-2.0.5.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-LICENSE.txt
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-LICENSE.txt (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/src/main/lib/dwr-LICENSE.txt 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-1.6.2.jar
===================================================================
(Binary files differ)
Property changes on: stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-1.6.2.jar
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-LICENSE.txt
===================================================================
--- stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-LICENSE.txt (rev 0)
+++ stable/eXist-1.4.x/extensions/betterform/src/main/lib/ehcache-LICENSE.txt 2011-03-29 15:12:33 UTC (rev 14050)
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the...
[truncated message content] |
|
From: <ro...@us...> - 2011-03-29 14:51:19
|
Revision: 14049
http://exist.svn.sourceforge.net/exist/?rev=14049&view=rev
Author: ronvdb
Date: 2011-03-29 14:51:10 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[testsuite] added tests for following bugs (failing ones are flagged with @ignore='yes'):
-startOffset.xml: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3182464&group_id=17691
-locationStepVariables: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3192401&group_id=17691
-matchHighlighting.xml: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3204156&group_id=17691
-parenthesizedContext.xml, parenthesizedLocationStep.xml: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3156182&group_id=17691
-persistent_in-memory.xml: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3160839&group_id=17691
-selfAxis.xml: https://sourceforge.net/tracker/?func=detail&atid=117691&aid=3154156&group_id=17691
Added Paths:
-----------
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/startOffset.xml
trunk/eXist/test/src/xquery/locationStepVariables.xml
trunk/eXist/test/src/xquery/matchHighlighting.xml
trunk/eXist/test/src/xquery/parenthesizedContext.xml
trunk/eXist/test/src/xquery/parenthesizedLocationStep.xml
trunk/eXist/test/src/xquery/persistent_in-memory.xml
trunk/eXist/test/src/xquery/selfAxis.xml
Added: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/startOffset.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/startOffset.xml (rev 0)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/startOffset.xml 2011-03-29 14:51:10 UTC (rev 14049)
@@ -0,0 +1,163 @@
+<TestSet xmlns:exist="http://exist.sourceforge.net/NS/exist">
+ <testName>tests for correct offset calculation of util:expand()</testName>
+ <description>
+ <p>These tests whether util:expand() calculates correct start offsets. Since there seems to be a
+ problem with first matching strings of certain nodes, tests come in pairs: one matching the first word,
+ the other matching the second word of a node.</p>
+ <author>Ron Van den Branden</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="coll"/>
+ <store collection="/db/system/config/db/coll" name="collection.xconf">
+ <collection xmlns="http://exist-db.org/collection-config/1.0">
+ <index>
+ <fulltext default="none" attributes="no" alphanum="true">
+ </fulltext>
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/>
+ <text qname="el"/>
+ </lucene>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="coll"/>
+ <store collection="/db/coll" name="test1.xml">
+ <test>
+ <a><b>word</b></a><el>strong string</el>
+ </test>
+ </store>
+ <store collection="/db/coll" name="test2.xml">
+ <el>
+ <a><b>word</b></a><c>strong string</c>
+ </el>
+ </store>
+ <store collection="/db/coll" name="test3.xml">
+ <el>
+ <a>word</a><c>strong string</c>
+ </el>
+ </store>
+ <store collection="/db/coll" name="test4.xml">
+ <el>
+ <a><b/></a><c>strong string</c>
+ </el>
+ </store>
+ <store collection="/db/coll" name="test5.xml">
+ <el>
+ <a><b/><c>strong string</c></a>
+ </el>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/coll"/>
+ <remove-collection collection="/db/system/config/db/coll"/>
+ </tearDown>
+ <test output="xml">
+ <task>atomic match preceded by complex element, first word</task>
+ <code><![CDATA[
+ doc('/db/coll/test1.xml')//el[ft:query(., 'strong')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el><exist:match>strong</exist:match> string</el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>atomic match preceded by complex element, second word</task>
+ <code><![CDATA[
+ doc('/db/coll/test1.xml')//el[ft:query(., 'string')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>strong <exist:match>string</exist:match></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>nested match preceded by simple element, first word</task>
+ <code><![CDATA[
+ doc('/db/coll/test3.xml')//el[ft:query(., 'strong')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a>word</a><c><exist:match>strong</exist:match> string</c>
+ </el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>nested match preceded by simple element, second word</task>
+ <code><![CDATA[
+ doc('/db/coll/test3.xml')//el[ft:query(., 'string')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a>word</a><c>strong <exist:match>string</exist:match></c>
+ </el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>nested match preceded by empty element, first word</task>
+ <code><![CDATA[
+ doc('/db/coll/test5.xml')//el[ft:query(., 'strong')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b/><c><exist:match>strong</exist:match> string</c></a>
+ </el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>nested match preceded by empty element, second word</task>
+ <code><![CDATA[
+ doc('/db/coll/test5.xml')//el[ft:query(., 'string')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b/><c>strong <exist:match>string</exist:match></c></a>
+ </el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>nested match preceded by complex element, first word</task>
+ <code><![CDATA[
+ doc('/db/coll/test2.xml')//el[ft:query(., 'strong')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b>word</b></a><c><exist:match>strong</exist:match> string</c>
+ </el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>nested match preceded by complex element, second word</task>
+ <code><![CDATA[
+ doc('/db/coll/test2.xml')//el[ft:query(., 'string')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b>word</b></a><c>strong <exist:match>string</exist:match></c>
+ </el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>nested match preceded by complex element (with empty child), first word</task>
+ <code><![CDATA[
+ doc('/db/coll/test4.xml')//el[ft:query(., 'strong')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b/></a><c><exist:match>strong</exist:match> string</c>
+ </el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>nested match preceded by complex element (with empty child), second word</task>
+ <code><![CDATA[
+ doc('/db/coll/test4.xml')//el[ft:query(., 'string')]/util:expand(.)
+ ]]></code>
+ <expected>
+ <el>
+ <a><b/></a><c>strong <exist:match>string</exist:match></c>
+ </el>
+ </expected>
+ </test>
+</TestSet>
\ No newline at end of file
Added: trunk/eXist/test/src/xquery/locationStepVariables.xml
===================================================================
--- trunk/eXist/test/src/xquery/locationStepVariables.xml (rev 0)
+++ trunk/eXist/test/src/xquery/locationStepVariables.xml 2011-03-29 14:51:10 UTC (rev 14049)
@@ -0,0 +1,89 @@
+<TestSet xmlns:exist="http://exist.sourceforge.net/NS/exist">
+ <testName>tests for behaviour of eXist w.r.t. variable references in location step</testName>
+ <description>
+ <p>These tests check eXist's behaviour when variable references are used in a location step, both on persistend nodes and in-memory nodes. Two test contexts are repeated:
+ <ul>
+ <li>the use of a variable reference in a location step</li>
+ <li>the use of a variable reference inside a predicate</li>
+ </ul>
+ </p>
+ <author>Ron Van den Branden</author>
+ </description>
+ <setup>
+ <create-collection parent="/db" name="coll"/>
+ <store collection="/db/coll" name="test.xml">
+ <test>
+ <a><el n="1">match1</el></a>
+ <a><el n="2">match2</el></a>
+ <b><el n="3">match2</el></b>
+ </test>
+ </store>
+ </setup>
+ <functions><![CDATA[
+ declare variable $in-memory :=
+ <test>
+ <a><el n="1">match1</el></a>
+ <a><el n="2">match2</el></a>
+ <b><el n="3">match2</el></b>
+ </test>;
+ ]]></functions>
+ <tearDown>
+ <remove-collection collection="/db/coll"/>
+ </tearDown>
+ <test output="xml" ignore="yes">
+ <task>[persistent] variable in location step</task>
+ <code><![CDATA[
+ let $test := collection('/db/coll')/test
+ let $match2 := $test//el[matches(., 'match2')]
+ return $test/a/$match2
+ ]]></code>
+ <expected>
+ <el n="2">match2</el>
+ <el n="3">match2</el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[persistent] variable in location step + predicate</task>
+ <code><![CDATA[
+ let $test := collection('/db/coll')/test
+ let $match2 := $test//el[matches(., 'match2')]
+ return $test/a[./$match2]
+ ]]></code>
+ <expected>
+ <a>
+ <el n="1">match1</el>
+ </a>
+ <a>
+ <el n="2">match2</el>
+ </a>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[in-memory] variable in location step</task>
+ <code><![CDATA[
+ let $test := $in-memory
+ let $match2 := $test//el[matches(., 'match2')]
+ return $test/a/$match2
+ ]]></code>
+ <expected>
+ <el n="2">match2</el>
+ <el n="3">match2</el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[in-memory] variable in location step + predicate</task>
+ <code><![CDATA[
+ let $test := $in-memory
+ let $match2 := $test//el[matches(., 'match2')]
+ return $test/a[./$match2]
+ ]]></code>
+ <expected>
+ <a>
+ <el n="1">match1</el>
+ </a>
+ <a>
+ <el n="2">match2</el>
+ </a>
+ </expected>
+ </test>
+</TestSet>
Added: trunk/eXist/test/src/xquery/matchHighlighting.xml
===================================================================
--- trunk/eXist/test/src/xquery/matchHighlighting.xml (rev 0)
+++ trunk/eXist/test/src/xquery/matchHighlighting.xml 2011-03-29 14:51:10 UTC (rev 14049)
@@ -0,0 +1,265 @@
+<TestSet xmlns:exist="http://exist.sourceforge.net/NS/exist">
+ <testName>tests for match highlighting behaviour on different index types</testName>
+ <description>
+ <p>These tests test whether matches are highlighted correctly. Tests are grouped
+ per index type supporting match highlighting (old FT, lucene FT, ngram), and
+ repeated
+ <ul>
+ <li>for matches in both elements and attributes</li>
+ <li>for each setting of highlight-matches: none, attributes, elements, both</li>
+ </ul>
+ Note: the kind of index definition (qname / path) doesn't seem to effect this
+ behaviour, so for clarity's sake, only qname-based indexes are included in these tests.
+ </p>
+ <author>Ron Van den Branden</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="coll"/>
+ <store collection="/db/system/config/db/coll" name="collection.xconf">
+ <collection xmlns="http://exist-db.org/collection-config/1.0">
+ <index>
+ <fulltext default="none" attributes="no" alphanum="true">
+ <create qname="el"/>
+ <create qname="@att"/>
+ </fulltext>
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/>
+ <text qname="el"/>
+ <text qname="@att"/>
+ </lucene>
+ <ngram qname="el"/>
+ <ngram qname="@att"/>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="coll"/>
+ <store collection="/db/coll" name="test.xml">
+ <test>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </test>
+ </store>
+ </setup>
+ <tearDown>
+ <remove-collection collection="/db/coll"/>
+ <remove-collection collection="/db/system/config/db/coll"/>
+ </tearDown>
+ <test output="xml">
+ <task>[old FT] element match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(., 'tree')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[old FT] element match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(., 'tree')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[old FT] element match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(., 'tree')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[old FT] element match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(., 'tree')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[old FT] attribute match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(@att, 'val')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[old FT] attribute match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(@att, 'val')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[old FT] attribute match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(@att, 'val')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[old FT] attribute match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[match-any(@att, 'val')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[lucene FT] element match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(., 'tree')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[lucene FT] element match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(., 'tree')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[lucene FT] element match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(., 'tree')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[lucene FT] element match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(., 'tree')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[lucene FT] attribute match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(@att, 'val')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[lucene FT] attribute match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(@att, 'val')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[lucene FT] attribute match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(@att, 'val')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[lucene FT] attribute match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ft:query(@att, 'val')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[ngram] element match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(., 'tree')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[ngram] element match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(., 'tree')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[ngram] element match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(., 'tree')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[ngram] element match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(., 'tree')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two <exist:match>tree</exist:match></c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[ngram] attribute match, match-highlighting=none</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(@att, 'val')]/util:expand(., 'highlight-matches=none')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[ngram] attribute match, match-highlighting=attributes</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(@att, 'val')]/util:expand(., 'highlight-matches=attributes')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[ngram] attribute match, match-highlighting=elements</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(@att, 'val')]/util:expand(., 'highlight-matches=elements')
+ ]]></code>
+ <expected>
+ <el att="val"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[ngram] attribute match, match-highlighting=both</task>
+ <code><![CDATA[
+ doc('/db/coll/test.xml')//el[ngram:contains(@att, 'val')]/util:expand(., 'highlight-matches=both')
+ ]]></code>
+ <expected>
+ <el att="|||val|||"><a><b>one</b></a><c>two tree</c></el>
+ </expected>
+ </test>
+</TestSet>
\ No newline at end of file
Added: trunk/eXist/test/src/xquery/parenthesizedContext.xml
===================================================================
--- trunk/eXist/test/src/xquery/parenthesizedContext.xml (rev 0)
+++ trunk/eXist/test/src/xquery/parenthesizedContext.xml 2011-03-29 14:51:10 UTC (rev 14049)
@@ -0,0 +1,784 @@
+<TestSet>
+ <testName>tests for queries on entirely parenthesized contexts</testName>
+ <description>
+ <p>Tests for behaviour of retrieval, query and index functions on different index types, on entirely parenthesised contexts.
+ Three major sections:
+ <ul>
+ <li>[retrieval]: bare retrieval of parenthesized nodes (tests #1-#6)</li>
+ <li>[query]: queries on different index types (tests #7-#54)</li>
+ <li>[index]: lookup of index terms on different index types (tests #55-#78)</li>
+ </ul></p>
+ <p>The degree of the problems depends on the type of index and search context. Influencing factors are:
+ <ul>
+ <li>index definition: qname / path-based</li>
+ <li>type of query: expressed directly (XPath expression) / indirectly (FLWR expression)</li>
+ <li>context node: parenthesized context node / parenthesized location step + self axis location step</li>
+ <li>type of node: element / attribute</li>
+ <li>location step: parenthesized attribute node in child step / parenthesized attribute node in descendant step (attributes only)</li>
+ </ul>
+ </p>
+ <author>Ron Van den Branden</author>
+ </description>
+ <setup>
+ <create-collection parent="/db/system" name="config"/>
+ <create-collection parent="/db/system/config" name="db"/>
+ <create-collection parent="/db/system/config/db" name="coll"/>
+ <store collection="/db/system/config/db/coll" name="collection.xconf">
+ <collection xmlns="http://exist-db.org/collection-config/1.0">
+ <index>
+ <fulltext default="none" attributes="no" alphanum="true">
+ <create qname="qname"/>
+ <create qname="@att.qname"/>
+ <include path="//path"/>
+ <include path="//@att.path"/>
+ </fulltext>
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
+ <analyzer id="ws" class="org.apache.lucene.analysis.WhitespaceAnalyzer"/>
+ <text qname="qname"/>
+ <text qname="@att.qname"/>
+ <text match="//path"/>
+ <text match="//@att.path"/>
+ </lucene>
+ <create qname="qname" type="xs:string"/>
+ <create qname="@att.qname" type="xs:string"/>
+ <create path="//path" type="xs:string"/>
+ <create path="//@att.path" type="xs:string"/>
+ </index>
+ </collection>
+ </store>
+ <create-collection parent="/db" name="coll"/>
+ <store collection="/db/coll" name="test.xml">
+ <test>
+ <qname att.qname="test">this is a test document</qname>
+ <path att.path="test">this is a test document</path>
+ </test>
+ </store>
+ </setup>
+ <functions><![CDATA[
+ declare function local:term-callback($term as xs:string, $data as xs:int+) as element() {
+ <term freq="{$data[1]}" docs="{$data[2]}" n="{$data[3]}">{$term}</term>
+ };
+ ]]></functions>
+ <tearDown>
+ <remove-collection collection="/db/coll"/>
+ <remove-collection collection="/db/system/config/db/coll"/>
+ </tearDown>
+ <test output="xml">
+ <task>[retrieval, qname] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname)
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[retrieval, path] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path)
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="text">
+ <task>[retrieval, qname] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/@att.qname)/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[retrieval, qname] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname//@att.qname)/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[retrieval, path] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[retrieval, path] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path//@att.path)/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, qname, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname)[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, qname, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return $a[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, old FT index, path, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path)[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, old FT index, path, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return $a[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, qname, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/self::*)[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, qname, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return $a[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, path, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/self::*)[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, old FT index, path, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return $a[match-any(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, old FT index, qname, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/@att.qname)[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, old FT index, qname, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return $a[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, old FT index, qname, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname//@att.qname)[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, old FT index, qname, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return $a[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, old FT index, path, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, old FT index, path, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, old FT index, path, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, old FT index, path, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[match-any(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, qname, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname)[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, Lucene FT index, qname, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return $a[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, path, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path)[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, Lucene FT index, path, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return $a[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, qname, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/self::*)[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, qname, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return $a[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, path, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/self::*)[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, Lucene FT index, path, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return $a[ft:query(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, Lucene FT index, qname, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/@att.qname)[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, Lucene FT index, qname, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return $a[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, Lucene FT index, qname, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname//@att.qname)[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, Lucene FT index, qname, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return $a[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, Lucene FT index, path, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, Lucene FT index, path, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text" ignore="yes">
+ <task>[query, Lucene FT index, path, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, Lucene FT index, path, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[ft:query(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+
+ <test output="xml">
+ <task>[query, range index, qname, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname)[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, range index, qname, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return $a[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, range index, path, direct] fully parenthesized element node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path)[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[query, range index, path, indirect] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return $a[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, range index, qname, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/self::*)[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, range index, qname, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return $a[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <qname att.qname="test">this is a test document</qname>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, range index, path, direct] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/self::*)[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[query, range index, path, indirect] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return $a[matches(., 'test')]
+ ]]></code>
+ <expected>
+ <path att.path="test">this is a test document</path>
+ </expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, qname, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname/@att.qname)[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, qname, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return $a[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, qname, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/qname//@att.qname)[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, qname, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return $a[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, path, direct] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, path, indirect] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, path, direct] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ (collection('/db/coll')//test/path/@att.path)[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <test output="text">
+ <task>[query, range index, path, indirect] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return $a[matches(., 'test')]/string()
+ ]]></code>
+ <expected>test</expected>
+ </test>
+ <!-- index retrieval tests -->
+ <test output="xml" ignore="yes">
+ <task>[index, old FT index, qname] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">a</term>
+ <term freq="1" docs="1" n="2">document</term>
+ <term freq="1" docs="1" n="3">is</term>
+ <term freq="1" docs="1" n="4">test</term>
+ <term freq="1" docs="1" n="5">this</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, old FT index, path] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">a</term>
+ <term freq="1" docs="1" n="2">document</term>
+ <term freq="1" docs="1" n="3">is</term>
+ <term freq="1" docs="1" n="4">test</term>
+ <term freq="1" docs="1" n="5">this</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, old FT index, qname] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">a</term>
+ <term freq="1" docs="1" n="2">document</term>
+ <term freq="1" docs="1" n="3">is</term>
+ <term freq="1" docs="1" n="4">test</term>
+ <term freq="1" docs="1" n="5">this</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, old FT index, path] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">a</term>
+ <term freq="1" docs="1" n="2">document</term>
+ <term freq="1" docs="1" n="3">is</term>
+ <term freq="1" docs="1" n="4">test</term>
+ <term freq="1" docs="1" n="5">this</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, old FT index, qname] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, old FT index, qname] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, old FT index, path] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, old FT index, path] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path//@att.path)
+ return text:index-terms($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, qname] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">document</term>
+ <term freq="1" docs="1" n="2">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, path] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">document</term>
+ <term freq="1" docs="1" n="2">test</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, Lucene FT index, qname] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">document</term>
+ <term freq="1" docs="1" n="2">test</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, Lucene FT index, path] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">document</term>
+ <term freq="1" docs="1" n="2">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, qname] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, qname] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, path] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, Lucene FT index, path] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path//@att.path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100, 'lucene-index')
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, qname] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">this is a test document</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, path] fully parenthesized element node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">this is a test document</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, range index, qname] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/self::*)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">this is a test document</term>
+ </expected>
+ </test>
+ <test output="xml" ignore="yes">
+ <task>[index, range index, path] fully parenthesized element node + self axis</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/self::*)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">this is a test document</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, qname] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname/@att.qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, qname] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/qname//@att.qname)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, path] child step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path/@att.path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+ <test output="xml">
+ <task>[index, range index, path] descendant step with fully parenthesized attribute node</task>
+ <code><![CDATA[
+ let $a := (collection('/db/coll')//test/path//@att.path)
+ return util:index-keys($a,'', util:function(xs:QName('local:term-callback'), 2), 100)
+ ]]></code>
+ <expected>
+ <term freq="1" docs="1" n="1">test</term>
+ </expected>
+ </test>
+</TestSet>
\ No newline at end of file
Added: trunk/eXist/test/src/xquery/parenthesizedLocationStep.xml
===================================================================
--- trunk/eXist/test/src/xquery/parenthesizedLocationStep.xml (rev 0)
+++ trunk/eXist/test/src/xquery/parenthesizedLocationStep.xml 2011-03-29 14:51:10 UTC (rev 14049)
@@ -0,0 +1,784 @@
+<TestSet>
+ <testName>tests for queries on context nodes in a parenthesized location step</testName>
+ <description>
+ <p>Tests for behaviour of retrieval, query and index functions on different index types, on context nodes in a parenthesized location step.
+ Three major sections:
+ <ul>
+ <li>[retrieval]: bare retrieval of parenthesized nodes (tests #1-#6)</li>
+ <li>[query]: queries on different index types (tests #7-#54)</li>
+ <li>[index]: lookup of index terms on different index typ...
[truncated message content] |
|
From: <ro...@us...> - 2011-03-29 12:41:03
|
Revision: 14048
http://exist.svn.sourceforge.net/exist/?rev=14048&view=rev
Author: ronvdb
Date: 2011-03-29 12:40:57 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[testsuite]: uncommented failing tests, replaced with @ignore='yes'
(which serves as a test for my first commit as well...)
Modified Paths:
--------------
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/FT_AttTest_complex.xml
trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/indirectQueriesTest.xml
Modified: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/FT_AttTest_complex.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/FT_AttTest_complex.xml 2011-03-29 12:09:56 UTC (rev 14047)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/FT_AttTest_complex.xml 2011-03-29 12:40:57 UTC (rev 14048)
@@ -57,13 +57,13 @@
]]></code>
<expected>val2</expected>
</test>
- <!--test output="text">
+ <test output="text" ignore="yes">
<task>[query] old FT index (qname), attribute context (attribute::)</task>
<code><![CDATA[
collection('/db/coll')//p/attribute::att1[match-any(., 'val1')]/string()
]]></code>
<expected>val1</expected>
- </test-->
+ </test>
<test output="text">
<task>[query] old FT index (path), attribute context, path (attribute::)</task>
<code><![CDATA[
Modified: trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/indirectQueriesTest.xml
===================================================================
--- trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/indirectQueriesTest.xml 2011-03-29 12:09:56 UTC (rev 14047)
+++ trunk/eXist/extensions/indexes/lucene/test/src/xquery/lucene/indirectQueriesTest.xml 2011-03-29 12:40:57 UTC (rev 14048)
@@ -51,8 +51,7 @@
<remove-collection collection="/db/coll"/>
<remove-collection collection="/db/system/config/db/coll"/>
</tearDown>
- <!-- Failing test commented out for now.
- <test output="xml">
+ <test output="xml" ignore="yes">
<task>[old FT index, qname] in/direct hits on element nodes</task>
<code><![CDATA[
let $query := 'qname'
@@ -76,7 +75,6 @@
</results>
</expected>
</test>
- -->
<test output="xml">
<task>[old FT index, qname] in/direct hits on element nodes, false match condition on value of nested attribute</task>
<code><![CDATA[
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 12:10:03
|
Revision: 14047
http://exist.svn.sourceforge.net/exist/?rev=14047&view=rev
Author: deliriumsky
Date: 2011-03-29 12:09:56 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
[bugfix] Corrected the mapping of old style events to new style events, but well ideally this code looks like it should be rewritten
Modified Paths:
--------------
trunk/eXist/src/org/exist/collections/triggers/TriggerEvents.java
Modified: trunk/eXist/src/org/exist/collections/triggers/TriggerEvents.java
===================================================================
--- trunk/eXist/src/org/exist/collections/triggers/TriggerEvents.java 2011-03-29 11:43:15 UTC (rev 14046)
+++ trunk/eXist/src/org/exist/collections/triggers/TriggerEvents.java 2011-03-29 12:09:56 UTC (rev 14047)
@@ -173,7 +173,7 @@
break;
case 2:
- result.add(EVENTS.MOVE_DOCUMENT);
+ result.add(EVENTS.DELETE_DOCUMENT);
break;
default:
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <xr...@us...> - 2011-03-29 11:43:22
|
Revision: 14046
http://exist.svn.sourceforge.net/exist/?rev=14046&view=rev
Author: xristy
Date: 2011-03-29 11:43:15 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
word smithing and adding some detail to the documentation
Modified Paths:
--------------
trunk/eXist/webapp/triggers.xml
Modified: trunk/eXist/webapp/triggers.xml
===================================================================
--- trunk/eXist/webapp/triggers.xml 2011-03-29 11:13:45 UTC (rev 14045)
+++ trunk/eXist/webapp/triggers.xml 2011-03-29 11:43:15 UTC (rev 14046)
@@ -18,7 +18,7 @@
as how Triggers are created and configured. It assumes readers have a basic
understanding of XML, Java and XQuery.</para>
<para>Triggers may be configured by the User to respond to document and/or collection events.
- From 1.5 version of eXist defines five events, all of which are applicable to the collection configured with the Trigger:</para>
+ From version 1.5, eXist defines five events, all of which are applicable to the collection configured with the Trigger:</para>
<itemizedlist>
<listitem>
<para>
@@ -30,7 +30,7 @@
</listitem>
<listitem>
<para>
- <emphasis>copy</emphasis>: Fired when a collection or document is coped</para>
+ <emphasis>copy</emphasis>: Fired when a collection or document is copied</para>
</listitem>
<listitem>
<para>
@@ -49,7 +49,7 @@
and after events.</para>
<section>
<title>XQuery Triggers</title>
- <para>Triggers written in XQuery may be configuring by using the org.exist.collections.triggers.XQueryTrigger to fire the XQuery.
+ <para>Triggers written in XQuery may be configured by using the org.exist.collections.triggers. XQueryTrigger to fire the XQuery.
The XQuery to be executed when the trigger is fired may either be placed in the collection.xconf itself or indicated by a URL.</para>
<para>The XQuery functions mapped to trigger event:</para>
<itemizedlist>
@@ -120,14 +120,14 @@
<title>Java Triggers</title>
<para>Triggers written in Java must implement the org.exist.collections.triggers.CollectionTrigger or
org.exist.collections.triggers.DocumentTrigger interface. The Java class for your trigger must be
- available on the class path, lib/user is a good place copy your custom trigger to.</para>
+ available on the class path, lib/user is a good place to copy your custom trigger to.</para>
<para>The DocumentTrigger interface provides a convenient starting place and provides the methods.</para>
</section>
</section>
<section id="trigger-config">
<title>Configuring Triggers</title>
- <para>Users configure Triggers using collection-specific configuration files. These files are stored
+ <para>Triggers are configured using collection-specific configuration files. These files are stored
as standard XML documents in the system collection:
<filename>/db/system/config</filename>, which can be accessed using the Admin
interface or Java Client. In addition to defining settings for Triggers
@@ -142,9 +142,9 @@
own <emphasis>trigger creation policy</emphasis> defined by a configuration file.</para>
<para>To configure triggers for a given collection - for example:
- <filename>/db/foo</filename> - you must create a new <filename>.xconf</filename>
+ <filename>/db/foo</filename> - create a new <filename>.xconf</filename>
configuration file and store it in the system collection (e.g.
- <filename>/db/system/config/db/foo</filename>). You can choose any name for this
+ <filename>/db/system/config/db/foo/collection.xconf</filename>). You may choose any name for this
document so long as it has the <filename>.xconf</filename> extension, although
<filename>collection.xconf</filename> is recommended. Note that
since subcollections will inherit the configuration policy of their parent
@@ -173,12 +173,20 @@
<para>In the <sgmltag>triggers</sgmltag> element are elements that define each trigger
and the event(s) that it is fired for.</para>
- <para>Each <sgmltag>trigger</sgmltag> element has two attributes, <emphasis>event</emphasis> which is a comma
- seperated list of events to fire for and <emphasis>class</emphasis> which is the name of the Java Class to fire on the event.
- It may also contain several <sgmltag>parameter</sgmltag> elements defining any parameters to send to the trigger.</para>
+ <para>Each <sgmltag>trigger</sgmltag> element has two attributes, <emphasis>event</emphasis> and <emphasis>class</emphasis>.</para>
+ <para>The <emphasis>event</emphasis> attribute is a comma
+ separated list of events (<option>create</option>, <option>update</option>, <option>copy</option>, <option>move</option>, <option>delete</option>)
+ to fire on.
+ If the <emphasis>event</emphasis> attribute is not present for an Xquery trigger then the Xquery will never be invoked.
+ For other (Java) triggers the <emphasis>event</emphasis> attribute may or may not have any effect depending on the
+ implementation of the <methodname>configure()</methodname> method and so on.
+ </para>
+ <para>The <emphasis>class</emphasis> is the name of the Java Class to fire when an event occurs.
+ XQuery triggers are handled by a built-in Java trigger: <classname>org.exist.collections.triggers.XQueryTrigger</classname>.</para>
+ <para>The trigger definition may also contain zero or more <sgmltag>parameter</sgmltag> elements defining any parameters to send to the trigger.</para>
<section>
<title>Configuring an XQuery Trigger</title>
- <para>When configuring an XQuery trigger there are a few parameters that may need to be set -</para>
+ <para>When configuring an XQuery trigger there are a few parameters that may need to be set:</para>
<itemizedlist>
<listitem>
<para><emphasis>url</emphasis>: The URL to the XQuery that the XQuery Trigger should execute</para>
@@ -193,6 +201,11 @@
<para>Any other parameters will be passed to the XQuery as external variables of type xs:string</para>
</listitem>
</itemizedlist>
+ <para>The <emphasis>event</emphasis> attribute must be present and list each of the event types that the XQuery trigger should
+ process. If the attribute is not present or it is an empty list, then the XQuery will never be invoked.
+ Note also that the <emphasis>event</emphasis> names from prior eXist versions may also be used
+ (<option>store</option>, <option>update</option>, <option>remove</option>).
+ </para>
<para>The following example shows two XQuery Triggers configured, the first executes an XQuery stored in the database
whereas the second executes XQuery placed inline in the collection.xconf:</para>
<example>
@@ -203,7 +216,7 @@
<parameter name="url" value="xmldb:exist://localhost/db/myTrigger.xql"/>
</trigger>
- <trigger class="org.exist.collections.triggers.XQueryTrigger">
+ <trigger event="create" class="org.exist.collections.triggers.XQueryTrigger">
<parameter name="query" value="
module namespace trigger='http://exist-db.org/xquery/trigger';
@@ -212,16 +225,6 @@
};"
/>
</trigger>
-
- <trigger class="org.exist.collections.triggers.XQueryTrigger">
- <parameter name="query">
- module namespace trigger='http://exist-db.org/xquery/trigger';
-
- declare function trigger:before-create-document($uri as xs:anyURI) {
- util:log('debug', concat('Trigger fired at ', current-dateTime()))
- };
- </parameter>
- </trigger>
</triggers>
</collection>]]></markup></programlisting>
</example>
@@ -534,11 +537,12 @@
<para>This collection trigger will save all old versions of documents before they are overwritten or removed. The old versions are kept in the
'history root' which is by default <code>/db/history</code>, but can be changed with the parameter <code>root</code>.
You need to configure this trigger for every collection whose history you want to preserve.</para>
+ <para>The <emphasis>event</emphasis> attribute is ignored by <classname>HistoryTrigger</classname></para>
<example>
<title>History Trigger collection.xconf</title>
<programlisting><markup><![CDATA[<collection xmlns='http://exist-db.org/collection-config/1.0'>
<triggers>
- <trigger event="update,remove" class="org.exist.collections.triggers.HistoryTrigger"/>
+ <trigger class="org.exist.collections.triggers.HistoryTrigger"/>
</triggers>
</collection>]]>
</markup></programlisting>
@@ -549,6 +553,7 @@
<para>STXTransformerTrigger applies an STX stylesheet to the input SAX stream, using <a href="http://joost.sourceforge.net">Joost</a>.
The stylesheet location is identified by parameter "src". If the src parameter is just a path, the stylesheet will be loaded from the database,
otherwise, it is interpreted as an URI.</para>
+ <para>The <emphasis>event</emphasis> attribute is ignored by <classname>STXTransformerTrigger</classname></para>
</section>
</section>
</chapter>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <del...@us...> - 2011-03-29 11:13:51
|
Revision: 14045
http://exist.svn.sourceforge.net/exist/?rev=14045&view=rev
Author: deliriumsky
Date: 2011-03-29 11:13:45 +0000 (Tue, 29 Mar 2011)
Log Message:
-----------
Minor correction from last commit
Modified Paths:
--------------
trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm
Modified: trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm
===================================================================
--- trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 11:01:13 UTC (rev 14044)
+++ trunk/eXist/webapp/repo/packages/library/mods/apps/mods/search/sharing.xqm 2011-03-29 11:13:45 UTC (rev 14045)
@@ -147,10 +147,9 @@
else()
};
-declare function sharing:update-group($group-name as xs:string, $group-members as xs:string+) as xs:string
+declare function sharing:update-group($group-id as xs:string, $group-members as xs:string+) as xs:string
{
- let $group := fn:collection($config:groups-collection)/group:group[group:name eq $group-name],
- $group-id := $group/@id,
+ let $group := fn:collection($config:groups-collection)/group:group[@id eq $group-id],
$system-group := $group/group:system/group:group,
$existing-group-members := security:get-group-members($system-group),
$group-modifications := (
@@ -165,7 +164,7 @@
security:remove-user-from-group($existing-group-member, $system-group),
if($config:send-notification-emails)then
(
- sharing:send-group-removal-mail($group-name, $existing-group-member)
+ sharing:send-group-removal-mail($group/group:name, $existing-group-member)
)else()
)
,
@@ -180,11 +179,11 @@
security:add-user-to-group($group-member, $system-group),
if($config:send-notification-emails)then
(
- sharing:send-group-invitation-mail($group-name, $group-member)
+ sharing:send-group-invitation-mail($group/group:name, $group-member)
)else()
)
) return
- $group-id
+ $group/@id
};
declare function sharing:send-group-invitation-mail($group-name as xs:string, $username as xs:string) as empty()
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|