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
(7) |
2
|
|
3
(6) |
4
(2) |
5
(5) |
6
(7) |
7
(1) |
8
(1) |
9
|
|
10
(14) |
11
(6) |
12
(16) |
13
|
14
(5) |
15
(7) |
16
(2) |
|
17
(5) |
18
(8) |
19
(9) |
20
(18) |
21
(8) |
22
(10) |
23
(1) |
|
24
(2) |
25
(2) |
26
(5) |
27
(5) |
28
(1) |
29
(7) |
30
(42) |
|
31
(14) |
|
|
|
|
|
|
|
From: Adam R. <ad...@ex...> - 2011-07-31 14:17:28
|
I used to live there and it has a special place in my heart ;-) 2011/7/31 Jens Østergaard Petersen <oe...@gm...>: > Seems like a droll place! > > <http://www.british-towns.net/en/level_4_display.asp?GetL3=16692>. > > Jens > > On Jul 31, 2011, at 2:18 PM, Adam Retter wrote: > >> Whats the codename for this release? >> >> 1.4 was eindhoven right? If no one has claimed it yet, can I have 'Wiggaton'? >> >> On 31 July 2011 11:14, <di...@us...> wrote: >>> Revision: 15016 >>> http://exist.svn.sourceforge.net/exist/?rev=15016&view=rev >>> Author: dizzzz >>> Date: 2011-07-31 11:14:04 +0000 (Sun, 31 Jul 2011) >>> >>> Log Message: >>> ----------- >>> [ignore] preparing release 1.4.1 >>> >>> Modified Paths: >>> -------------- >>> stable/eXist-1.4.x/build.properties >>> >>> Modified: stable/eXist-1.4.x/build.properties >>> =================================================================== >>> --- stable/eXist-1.4.x/build.properties 2011-07-31 10:55:44 UTC (rev 15015) >>> +++ stable/eXist-1.4.x/build.properties 2011-07-31 11:14:04 UTC (rev 15016) >>> @@ -1,7 +1,7 @@ >>> # $Id$ >>> >>> project.name = eXist >>> -project.version = 1.4.1dev >>> +project.version = 1.4.1 >>> project.version.numeric = 1.4.1 >>> project.codename = eindhoven >>> >>> >>> >>> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >>> >>> ------------------------------------------------------------------------------ >>> Got Input? Slashdot Needs You. >>> Take our quick survey online. Come on, we don't ask for help often. >>> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >>> http://p.sf.net/sfu/slashdot-survey >>> _______________________________________________ >>> Exist-commits mailing list >>> Exi...@li... >>> https://lists.sourceforge.net/lists/listinfo/exist-commits >>> >> >> >> >> -- >> Adam Retter >> >> eXist Developer >> { United Kingdom } >> ad...@ex... >> irc://irc.freenode.net/existdb >> >> ------------------------------------------------------------------------------ >> Got Input? Slashdot Needs You. >> Take our quick survey online. Come on, we don't ask for help often. >> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >> http://p.sf.net/sfu/slashdot-survey >> _______________________________________________ >> Exist-commits mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-commits > > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Exist-commits mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-commits > > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
|
From: <el...@us...> - 2011-07-31 14:02:18
|
Revision: 15018
http://exist.svn.sourceforge.net/exist/?rev=15018&view=rev
Author: ellefj
Date: 2011-07-31 14:02:11 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[ignore] acknowledge review changes before 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/acknowledge.xml
Added Paths:
-----------
stable/eXist-1.4.x/webapp/resources/sb_logo.png
Modified: stable/eXist-1.4.x/webapp/acknowledge.xml
===================================================================
--- stable/eXist-1.4.x/webapp/acknowledge.xml 2011-07-31 11:29:13 UTC (rev 15017)
+++ stable/eXist-1.4.x/webapp/acknowledge.xml 2011-07-31 14:02:11 UTC (rev 15018)
@@ -3,7 +3,7 @@
<bookinfo>
<graphic fileref="logo.jpg"/>
<title>Open Source Native XML Database</title>
- <date>September 2009</date>
+ <date>July 2011</date>
<author>
<firstname>Wolfgang M.</firstname>
<surname>Meier</surname>
@@ -11,6 +11,13 @@
<address format="linespecific"><email>wolfgang at exist-db.org</email></address>
</affiliation>
</author>
+ <author>
+ <firstname>Leif-Jöran</firstname>
+ <surname>Olsson</surname>
+ <affiliation>
+ <address format="linespecific"><email>ljo at exist-db.org</email></address>
+ </affiliation>
+ </author>
<style> table { margin-left: 15px; margin-right: 15px; } td { margin-bottom: 2em;
border-bottom: 1px dotted #C0C0C0; } td.description { padding-right: 3em; } p.ack {
margin-top: 1em; } </style>
@@ -24,11 +31,11 @@
<title>Supporters</title>
<para>We would like to thank the following organizations and corporations for supporting
- and sponsoring the development of eXist:</para>
+ and sponsoring the development of eXist-db:</para>
<table cellspacing="0" cellpadding="15">
<tr>
- <td class="description"> The new indexing engine featured in eXist, since version
+ <td class="description"> The new indexing engine featured in eXist-db, since version
1.1, was made possible through the agency of the
<a href="http://tapor.uvic.ca/home.php">University of Victoria</a> node
of the Canadian TAPoR consortium, who have made it available for general
@@ -41,7 +48,7 @@
<td class="description"><a href="http://www.trapezenetworks.com">Trapeze
Networks</a>, headquartered in Pleasanton, Calif., has continuously
sponsored improvements and new features since 2004 and helped to advance
- development by testing and deploying eXist in a production environment.</td>
+ development by testing and deploying eXist-db in a production environment.</td>
<td align="center">
<a href="http://www.trapezenetworks.com">
<img border="0" src="resources/trapeze.gif"/>
@@ -63,7 +70,7 @@
</td>
</tr>
<tr>
- <td class="description">The eXist Wiki, the demo server and other vital parts of
+ <td class="description">The eXist-db Wiki, the demo server and other vital parts of
our project infrastructure are kindly hosted by <a
href="http://www.friprogramvarusyndikatet.se/">Fri
programvaru-syndikatet / exist-db.se</a> in Sweden.</td>
@@ -86,7 +93,7 @@
</tr>
<tr>
<td class="description"> The versioning extensions, released with
- eXist 1.4, were kindly sponsored by the <a href="http://www.telota.de/"
+ eXist-db 1.4, were kindly sponsored by the <a href="http://www.telota.de/"
>Telota Initiative</a> of the <a href="http://www.bbaw.de"
>Berlin-Brandenburg Academy of Sciences and Humanities</a>. </td>
<td align="center">
@@ -95,6 +102,16 @@
</a>
</td>
</tr>
+ <tr>
+ <td class="description"> Travelling and development costs sponsored by <a href="http://spraakbanken.gu.se/"
+ >Språkbanken (The Swedish Language Bank)</a> of <a href="http://www.gu.se/"
+ >University of Gothenburg</a>. </td>
+ <td align="center">
+ <a href="http://spraakbanken.gu.se/">
+ <img border="0" src="resources/sb_logo.png"/>
+ </a>
+ </td>
+ </tr>
</table>
</section>
@@ -102,21 +119,10 @@
<title>Tools We Use in Development</title>
<table>
<tr>
- <td class="description">Viewtier's <a
- href="http://www.viewtier.com/products/parabuild/index.htm"
- >Parabuild</a> ensures that new changes do not break the eXist codebase
- by hosting Continuous Integration system for eXist.</td>
- <td align="center">
- <a href="http://www.viewtier.com/products/parabuild/">
- <img border="0" src="resources/parabuild.png"/>
- </a>
- </td>
- </tr>
- <tr>
- <td class="description">XML and non-XML resources of an eXist database can be
+ <td class="description">XML and non-XML resources of an eXist-db database can be
edited and processed with XSLT and XQuery seamlessly in <a
href="http://www.oxygenxml.com"><oXygen/> XML Editor/Author</a>
- both through an eXist connection and through WebDAV in an integrated
+ both through an eXist-db connection and through WebDAV in an integrated
environment.</td>
<td align="center">
<a href="http://www.oxygenxml.com">
@@ -127,7 +133,7 @@
<tr>
<td class="description">Jetbrains' <a
href="http://www.jetbrains.com/teamcity/"
- >Team City</a> is used to ensures that new changes do not break the eXist codebase and build nightly installer snapshots.</td>
+ >Team City</a> is used to ensures that new changes do not break the eXist-db codebase and build nightly installer snapshots.</td>
<td align="center">
<a href="http://www.jetbrains.com/teamcity/">
<img border="0" src="resources/teamcity_small.gif"/>
Added: stable/eXist-1.4.x/webapp/resources/sb_logo.png
===================================================================
(Binary files differ)
Property changes on: stable/eXist-1.4.x/webapp/resources/sb_logo.png
___________________________________________________________________
Added: svn:mime-type
+ image/png
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Jens Ø. P. <oe...@gm...> - 2011-07-31 13:34:22
|
Seems like a droll place! <http://www.british-towns.net/en/level_4_display.asp?GetL3=16692>. Jens On Jul 31, 2011, at 2:18 PM, Adam Retter wrote: > Whats the codename for this release? > > 1.4 was eindhoven right? If no one has claimed it yet, can I have 'Wiggaton'? > > On 31 July 2011 11:14, <di...@us...> wrote: >> Revision: 15016 >> http://exist.svn.sourceforge.net/exist/?rev=15016&view=rev >> Author: dizzzz >> Date: 2011-07-31 11:14:04 +0000 (Sun, 31 Jul 2011) >> >> Log Message: >> ----------- >> [ignore] preparing release 1.4.1 >> >> Modified Paths: >> -------------- >> stable/eXist-1.4.x/build.properties >> >> Modified: stable/eXist-1.4.x/build.properties >> =================================================================== >> --- stable/eXist-1.4.x/build.properties 2011-07-31 10:55:44 UTC (rev 15015) >> +++ stable/eXist-1.4.x/build.properties 2011-07-31 11:14:04 UTC (rev 15016) >> @@ -1,7 +1,7 @@ >> # $Id$ >> >> project.name = eXist >> -project.version = 1.4.1dev >> +project.version = 1.4.1 >> project.version.numeric = 1.4.1 >> project.codename = eindhoven >> >> >> >> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. >> >> ------------------------------------------------------------------------------ >> Got Input? Slashdot Needs You. >> Take our quick survey online. Come on, we don't ask for help often. >> Plus, you'll get a chance to win $100 to spend on ThinkGeek. >> http://p.sf.net/sfu/slashdot-survey >> _______________________________________________ >> Exist-commits mailing list >> Exi...@li... >> https://lists.sourceforge.net/lists/listinfo/exist-commits >> > > > > -- > Adam Retter > > eXist Developer > { United Kingdom } > ad...@ex... > irc://irc.freenode.net/existdb > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Exist-commits mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-commits |
|
From: Adam R. <ad...@ex...> - 2011-07-31 13:18:16
|
Whats the codename for this release? 1.4 was eindhoven right? If no one has claimed it yet, can I have 'Wiggaton'? On 31 July 2011 11:14, <di...@us...> wrote: > Revision: 15016 > http://exist.svn.sourceforge.net/exist/?rev=15016&view=rev > Author: dizzzz > Date: 2011-07-31 11:14:04 +0000 (Sun, 31 Jul 2011) > > Log Message: > ----------- > [ignore] preparing release 1.4.1 > > Modified Paths: > -------------- > stable/eXist-1.4.x/build.properties > > Modified: stable/eXist-1.4.x/build.properties > =================================================================== > --- stable/eXist-1.4.x/build.properties 2011-07-31 10:55:44 UTC (rev 15015) > +++ stable/eXist-1.4.x/build.properties 2011-07-31 11:14:04 UTC (rev 15016) > @@ -1,7 +1,7 @@ > # $Id$ > > project.name = eXist > -project.version = 1.4.1dev > +project.version = 1.4.1 > project.version.numeric = 1.4.1 > project.codename = eindhoven > > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Exist-commits mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-commits > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
|
From: Adam R. <ad...@ex...> - 2011-07-31 13:15:16
|
Okay cool, please do.
On 31 July 2011 10:37, Dannes Wessels <da...@ex...> wrote:
> Hi Adam,
> On 31 Jul 2011, at 12:08 , Adam Retter wrote:
>
> Dannes, could you re-add the GSoC pages, of course keep the links
> removed from the sidebar if you wish. But if we do GSoC again, its
> very valuable during the application process to show our past history
> with GSoC.
>
> Sure, we can do for trunk, but the pages were not maintained, not formatted
> etc ; quite ugly is was, that is why I removed it;
> but a revert/copy is easily done, one svn action right?
> cheers
> Dannes
>
--
Adam Retter
eXist Developer
{ United Kingdom }
ad...@ex...
irc://irc.freenode.net/existdb
|
|
From: <del...@us...> - 2011-07-31 11:29:20
|
Revision: 15017
http://exist.svn.sourceforge.net/exist/?rev=15017&view=rev
Author: deliriumsky
Date: 2011-07-31 11:29:13 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
Refactored the language and additional contextual links
Modified Paths:
--------------
trunk/eXist/webapp/download.xml
Modified: trunk/eXist/webapp/download.xml
===================================================================
--- trunk/eXist/webapp/download.xml 2011-07-31 11:14:04 UTC (rev 15016)
+++ trunk/eXist/webapp/download.xml 2011-07-31 11:29:13 UTC (rev 15017)
@@ -38,18 +38,10 @@
url="http://sourceforge.net/donate/index.php?group_id=17691">
<graphic fileref="resources/project-support.jpg"/>
</ulink></para>
- <para>eXist depends on the commitment of volunteers. Making a donation acknowledges
- their efforts and helps to finance the few things we need to keep the project at
- speed.</para>
- <para>Another way to support eXist is to <ulink url="acknowledge.xml">"sponsor"</ulink> features or solutions you may need
- for your own applications. Members of our development team are available for
- <emphasis>consulting</emphasis>, <emphasis>training</emphasis> or
- <emphasis>first-hand support</emphasis> on a flexible basis. If interested,
- please send an email to <ulink url="mailto:in...@ex..."
- >in...@ex...</ulink> and we will coordinate the requests.</para>
- <para>A commercial support plan is provided by <ulink url="http://www.existsolutions.com">eXist Solutions GmbH</ulink> since 2010.
- The company is backed by large parts of the active development team (in cooperation with
- all interested parties).</para>
+ <para>eXist as an Open Source community depends on the contributions of volunteers. Making a donation acknowledges their efforts, and helps to finance the few things that we need to keep the project running smoothly.</para>
+ <para>Another way to support eXist is to <ulink url="acknowledge.xml">sponsor</ulink> the addition of new features, that you may need for your own applications or from our own <ulink url="roadmap.xml">roadmap</ulink>.</para>
+ <para>Members of our development team and community have come together commercially under the umbrella of <ulink url="http://www.existsolutions.com">eXist Solutions</ulink>. They are available for <ulink url="http://www.existsolutions.com/consultancy.xml">Consultancy</ulink>, <ulink url="http://www.existsolutions.com/training.xml">Training</ulink> or <ulink url="http://www.existsolutions.com/consultancy.xml">Bespoke Development</ulink> on a flexible basis, as such if you need some extra support or development resource, please <ulink url="http://www.existsolutions.com/contact.xml">contact us</ulink> at <ulink url="mailto:in...@ex...">in...@ex...</ulink>.</para>
+ <para><ulink url="http://www.existsolutions.com">eXist Solutions</ulink> can also provide annual <ulink url="http://www.existsolutions.com/support.xml">Production and Development Support</ulink> plans. Should your organisation require contractual support, please see <ulink url="http://www.existsolutions.com/support.xml">this page</ulink>.</para>
</section>
<section id="download">
<title>Downloads</title>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-07-31 11:14:10
|
Revision: 15016
http://exist.svn.sourceforge.net/exist/?rev=15016&view=rev
Author: dizzzz
Date: 2011-07-31 11:14:04 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[ignore] preparing release 1.4.1
Modified Paths:
--------------
stable/eXist-1.4.x/build.properties
Modified: stable/eXist-1.4.x/build.properties
===================================================================
--- stable/eXist-1.4.x/build.properties 2011-07-31 10:55:44 UTC (rev 15015)
+++ stable/eXist-1.4.x/build.properties 2011-07-31 11:14:04 UTC (rev 15016)
@@ -1,7 +1,7 @@
# $Id$
project.name = eXist
-project.version = 1.4.1dev
+project.version = 1.4.1
project.version.numeric = 1.4.1
project.codename = eindhoven
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-07-31 10:55:51
|
Revision: 15015
http://exist.svn.sourceforge.net/exist/?rev=15015&view=rev
Author: wolfgang_m
Date: 2011-07-31 10:55:44 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[bugfix] Fixed file system backups. Some changes were not ported from trunk correctly.
Modified Paths:
--------------
stable/eXist-1.4.x/src/org/exist/backup/BackupDirectory.java
stable/eXist-1.4.x/src/org/exist/backup/FileSystemWriter.java
stable/eXist-1.4.x/src/org/exist/backup/xquery/ListBackups.java
Modified: stable/eXist-1.4.x/src/org/exist/backup/BackupDirectory.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/backup/BackupDirectory.java 2011-07-31 10:49:03 UTC (rev 15014)
+++ stable/eXist-1.4.x/src/org/exist/backup/BackupDirectory.java 2011-07-31 10:55:44 UTC (rev 15015)
@@ -1,6 +1,6 @@
/*
* eXist Open Source Native XML Database
- * Copyright (C) 2001-07 The eXist Project
+ * Copyright (C) 2001-2010 The eXist Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: BackupDirectory.java 14941 2011-07-22 11:48:12Z wolfgang_m $
*/
package org.exist.backup;
@@ -26,92 +26,111 @@
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
-import java.util.regex.Pattern;
-import java.util.regex.Matcher;
-import java.util.Date;
-import java.text.SimpleDateFormat;
+
import java.text.DateFormat;
import java.text.ParseException;
+import java.text.SimpleDateFormat;
-public class BackupDirectory {
+import java.util.Date;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
- public final static Logger LOG = Logger.getLogger(BackupDirectory.class);
-
- public final static String PREFIX_FULL_BACKUP_FILE = "full";
- public final static String PREFIX_INC_BACKUP_FILE = "inc";
-
- public final static String FILE_REGEX = "(" + PREFIX_FULL_BACKUP_FILE + "|" + PREFIX_INC_BACKUP_FILE + ")(\\d{8}-\\d{4}).*";
+public class BackupDirectory
+{
+ public final static Logger LOG = Logger.getLogger( BackupDirectory.class );
- public final static DateFormat DATE_FORMAT = new SimpleDateFormat("yyyyMMdd-HHmm");
-
+ public final static String PREFIX_FULL_BACKUP_FILE = "full";
+ public final static String PREFIX_INC_BACKUP_FILE = "inc";
- private File dir;
+ public final static String FILE_REGEX = "(" + PREFIX_FULL_BACKUP_FILE + "|" + PREFIX_INC_BACKUP_FILE + ")(\\d{8}-\\d{4}).*";
- private Matcher matcher;
+ public final static DateFormat DATE_FORMAT = new SimpleDateFormat( "yyyyMMdd-HHmm" );
- public BackupDirectory(String dirPath) {
- this(new File(dirPath));
+
+ private File dir;
+
+ private Matcher matcher;
+
+ public BackupDirectory( String dirPath )
+ {
+ this( new File( dirPath ) );
}
- public BackupDirectory(File directory) {
+
+ public BackupDirectory( File directory )
+ {
this.dir = directory;
- Pattern pattern = Pattern.compile(FILE_REGEX);
- matcher = pattern.matcher("");
+ Pattern pattern = Pattern.compile( FILE_REGEX );
+ matcher = pattern.matcher( "" );
}
- public File createBackup(boolean incremental, boolean zip) {
- int counter = 0;
+ public File createBackup( boolean incremental, boolean zip )
+ {
+ int counter = 0;
File file;
+
do {
StringBuilder buf = new StringBuilder();
- buf.append(incremental ? PREFIX_INC_BACKUP_FILE : PREFIX_FULL_BACKUP_FILE);
- buf.append(DATE_FORMAT.format(new Date()));
- if (counter++ > 0)
- buf.append('_').append(counter);
- if (zip)
- buf.append(".zip");
- file = new File(dir, buf.toString());
- } while (file.exists());
- return file;
- }
+ buf.append( incremental ? PREFIX_INC_BACKUP_FILE : PREFIX_FULL_BACKUP_FILE );
+ buf.append( DATE_FORMAT.format( new Date() ) );
- public BackupDescriptor lastBackupFile() {
- File[] files = dir.listFiles(new FileFilter() {
- public boolean accept(File path) {
- return path.isFile();
+ if( counter++ > 0 ) {
+ buf.append( '_' ).append( counter );
}
- });
- File newest = null;
- Date newestDate = null;
- for (int i = 0; i < files.length; i++) {
- matcher.reset(files[i].getName());
- if (matcher.matches()) {
- String dateTime = matcher.group(2);
+ if( zip ) {
+ buf.append( ".zip" );
+ }
+ file = new File( dir, buf.toString() );
+ } while( file.exists() );
+ return( file );
+ }
+
+
+ public BackupDescriptor lastBackupFile()
+ {
+ File[] files = dir.listFiles();
+
+ File newest = null;
+ Date newestDate = null;
+
+ for( int i = 0; i < files.length; i++ ) {
+ matcher.reset( files[i].getName() );
+
+ if( matcher.matches() ) {
+ String dateTime = matcher.group( 2 );
+
try {
- Date date = DATE_FORMAT.parse(dateTime);
- if (newestDate == null || date.after(newestDate)) {
+ Date date = DATE_FORMAT.parse( dateTime );
+
+ if( ( newestDate == null ) || date.after( newestDate ) ) {
newestDate = date;
- newest = files[i];
+ newest = files[i];
}
- } catch (ParseException e) {
}
+ catch( ParseException e ) {
+ }
}
}
BackupDescriptor descriptor = null;
- if (newest != null) {
+
+ if( newest != null ) {
+
try {
- if (newest.getName().endsWith(".zip") || newest.getName().endsWith(".ZIP"))
- descriptor = new ZipArchiveBackupDescriptor(newest);
- else
- descriptor = new FileSystemBackupDescriptor(new File(newest + "/db", BackupDescriptor.COLLECTION_DESCRIPTOR));
- } catch (IOException e) {
+
+ if( newest.getName().endsWith( ".zip" ) || newest.getName().endsWith( ".ZIP" ) ) {
+ descriptor = new ZipArchiveBackupDescriptor( newest );
+ } else {
+ descriptor = new FileSystemBackupDescriptor( new File( newest + "/db", BackupDescriptor.COLLECTION_DESCRIPTOR ) );
+ }
+ }
+ catch( IOException e ) {
e.printStackTrace();
}
}
- return descriptor;
+ return( descriptor );
}
}
Modified: stable/eXist-1.4.x/src/org/exist/backup/FileSystemWriter.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/backup/FileSystemWriter.java 2011-07-31 10:49:03 UTC (rev 15014)
+++ stable/eXist-1.4.x/src/org/exist/backup/FileSystemWriter.java 2011-07-31 10:55:44 UTC (rev 15015)
@@ -1,3 +1,24 @@
+/*
+ * eXist Open Source Native XML Database
+ * Copyright (C) 2006-2010 The eXist Project
+ * http://exist-db.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * $Id: FileSystemWriter.java 14940 2011-07-22 11:34:48Z wolfgang_m $
+ */
package org.exist.backup;
import java.io.BufferedWriter;
@@ -7,78 +28,106 @@
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
+
import java.util.Properties;
+
/**
* Implementation of BackupWriter that writes to the file system.
*/
-public class FileSystemWriter implements BackupWriter {
-
- private File currentDir;
- private File currentContents;
- private Writer currentContentsOut;
+public class FileSystemWriter implements BackupWriter
+{
+ private File rootDir;
+ private File currentDir;
+ private File currentContents;
+ private Writer currentContentsOut;
private OutputStream currentOut;
- private boolean dataWritten = false;
+ private boolean dataWritten = false;
- public FileSystemWriter(String path) {
- this(new File(path));
+ public FileSystemWriter( String path )
+ {
+ this( new File( path ) );
}
- public FileSystemWriter(File file) {
- if(file.exists()) {
- //removing "path"
- file.delete();
- }
- file.mkdirs();
+
+ public FileSystemWriter( File file )
+ {
+ if( file.exists() ) {
+
+ //removing "path"
+ file.delete();
+ }
+ file.mkdirs();
currentDir = file;
+ rootDir = file;
}
- public void newCollection(String name) {
- File file = new File(currentDir, name);
- if(file.exists()) {
- file.delete();
- }
- file.mkdirs();
+ public void newCollection( String name )
+ {
+ File file;
+ if (new File(name).isAbsolute()) {
+ file = new File( rootDir, name );
+ } else {
+ file = new File( currentDir, name );
+ }
+
+ if( file.exists() ) {
+ file.delete();
+ }
+ file.mkdirs();
dataWritten = true;
- currentDir = file;
+ currentDir = file;
}
- public void closeCollection() {
+
+ public void closeCollection()
+ {
currentDir = currentDir.getParentFile();
}
- public void close() throws IOException {
+
+ public void close() throws IOException
+ {
}
- public Writer newContents() throws IOException {
- currentContents = new File(currentDir, "__contents__.xml");
- currentContentsOut =
- new BufferedWriter(
- new OutputStreamWriter(new FileOutputStream(currentContents), "UTF-8"));
- dataWritten = true;
- return currentContentsOut;
+
+ public Writer newContents() throws IOException
+ {
+ currentContents = new File( currentDir, "__contents__.xml" );
+ currentContentsOut = new BufferedWriter( new OutputStreamWriter( new FileOutputStream( currentContents ), "UTF-8" ) );
+ dataWritten = true;
+ return( currentContentsOut );
}
- public void closeContents() throws IOException {
+
+ public void closeContents() throws IOException
+ {
currentContentsOut.close();
}
- public OutputStream newEntry(String name) throws IOException {
- currentOut = new FileOutputStream(new File(currentDir, name));
+
+ public OutputStream newEntry( String name ) throws IOException
+ {
+ currentOut = new FileOutputStream( new File( currentDir, name ) );
dataWritten = true;
- return currentOut;
+ return( currentOut );
}
- public void closeEntry() throws IOException {
+
+ public void closeEntry() throws IOException
+ {
currentOut.close();
}
- public void setProperties(Properties properties) throws IOException {
- if (dataWritten)
- throw new IOException("Backup properties need to be set before any backup data is written");
- File propFile = new File(currentDir, "backup.properties");
- OutputStream os = new FileOutputStream(propFile);
- properties.store(os, "Backup properties");
+
+ public void setProperties( Properties properties ) throws IOException
+ {
+ if( dataWritten ) {
+ throw( new IOException( "Backup properties need to be set before any backup data is written" ) );
+ }
+ File propFile = new File( rootDir, "backup.properties" );
+ OutputStream os = new FileOutputStream( propFile );
+ properties.store( os, "Backup properties" );
os.close();
}
}
Modified: stable/eXist-1.4.x/src/org/exist/backup/xquery/ListBackups.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/backup/xquery/ListBackups.java 2011-07-31 10:49:03 UTC (rev 15014)
+++ stable/eXist-1.4.x/src/org/exist/backup/xquery/ListBackups.java 2011-07-31 10:55:44 UTC (rev 15015)
@@ -21,11 +21,13 @@
*/
package org.exist.backup.xquery;
+import org.xml.sax.helpers.AttributesImpl;
+
import org.exist.Namespaces;
+import org.exist.backup.BackupDescriptor;
import org.exist.backup.BackupDirectory;
-import org.exist.backup.BackupDescriptor;
+import org.exist.backup.FileSystemBackupDescriptor;
import org.exist.backup.ZipArchiveBackupDescriptor;
-import org.exist.backup.FileSystemBackupDescriptor;
import org.exist.dom.QName;
import org.exist.memtree.MemTreeBuilder;
import org.exist.storage.BrokerPool;
@@ -39,92 +41,92 @@
import org.exist.xquery.value.Sequence;
import org.exist.xquery.value.SequenceType;
import org.exist.xquery.value.Type;
-import org.xml.sax.helpers.AttributesImpl;
import java.io.File;
import java.io.IOException;
+
import java.util.Iterator;
import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-public class ListBackups extends BasicFunction {
-
- private final static String returnText =
- "an XML fragment listing all eXist backups found in the specified backup directory: " +
- "<directory> " +
- "<backup file=\"filename\"> " +
- "<key>value</key>" +
- "<key>value</key>" +
- "</backup> " +
- "<backup file=\"filename\"> " +
- "<key>value</key>" +
- "<key>value</key>" +
- "</backup> " +
- "</directory> " +
- "Where key is a property name and value is a property value for the given .zip file.";
- public final static FunctionSignature signature =
- new FunctionSignature(
- new QName("list", BackupModule.NAMESPACE_URI, BackupModule.PREFIX),
- "Returns an XML fragment listing all eXist backups found in a specified backup directory.",
- new SequenceType[] { new FunctionParameterSequenceType("directory", Type.STRING, Cardinality.EXACTLY_ONE, "The path to the directory to show the list of backups on.") },
- new FunctionReturnSequenceType(Type.NODE, Cardinality.EXACTLY_ONE, returnText)
- );
+public class ListBackups extends BasicFunction
+{
+ private final static String returnText = "an XML fragment listing all eXist backups found in the specified backup directory: " + "<directory> " + "<backup file=\"filename\"> " + "<key>value</key>" + "<key>value</key>" + "</backup> " + "<backup file=\"filename\"> " + "<key>value</key>" + "<key>value</key>" + "</backup> " + "</directory> " + "Where key is a property name and value is a property value for the given .zip file.";
- public final static QName DIRECTORY_ELEMENT = new QName("directory", Namespaces.EXIST_NS, "");
- public final static QName BACKUP_ELEMENT = new QName("backup", Namespaces.EXIST_NS, "");
+ public final static FunctionSignature signature = new FunctionSignature( new QName( "list", BackupModule.NAMESPACE_URI, BackupModule.PREFIX ), "Returns an XML fragment listing all eXist backups found in a specified backup directory.", new SequenceType[] {
+ new FunctionParameterSequenceType( "directory", Type.STRING, Cardinality.EXACTLY_ONE, "The path to the directory to show the list of backups on." )
+ }, new FunctionReturnSequenceType( Type.NODE, Cardinality.EXACTLY_ONE, returnText ) );
- public ListBackups(XQueryContext context) {
- super(context, signature);
+ public final static QName DIRECTORY_ELEMENT = new QName( "directory", Namespaces.EXIST_NS, "" );
+ public final static QName BACKUP_ELEMENT = new QName( "backup", Namespaces.EXIST_NS, "" );
+
+ public ListBackups( XQueryContext context )
+ {
+ super( context, signature );
}
- public Sequence eval(Sequence[] args, Sequence contextSequence) throws XPathException {
+ public Sequence eval( Sequence[] args, Sequence contextSequence ) throws XPathException
+ {
String exportDir = args[0].getStringValue();
- File dir = new File(exportDir);
- if (!dir.isAbsolute())
- dir = new File((String)context.getBroker().getConfiguration()
- .getProperty(BrokerPool.PROPERTY_DATA_DIR), exportDir);
+ File dir = new File( exportDir );
+ if( !dir.isAbsolute() ) {
+ dir = new File( (String)context.getBroker().getConfiguration().getProperty( BrokerPool.PROPERTY_DATA_DIR ), exportDir );
+ }
+
context.pushDocumentContext();
+
try {
MemTreeBuilder builder = context.getDocumentBuilder();
- int nodeNr = builder.startElement(DIRECTORY_ELEMENT, null);
- if (dir.isDirectory() && dir.canRead()) {
- Pattern pattern = Pattern.compile(BackupDirectory.FILE_REGEX);
- Matcher matcher = pattern.matcher("");
- File[] files = dir.listFiles();
- for (int i = 0; i < files.length; i++) {
- matcher.reset(files[i].getName());
- if (matcher.matches()) {
+ int nodeNr = builder.startElement( DIRECTORY_ELEMENT, null );
+
+ if( dir.isDirectory() && dir.canRead() ) {
+ Pattern pattern = Pattern.compile( BackupDirectory.FILE_REGEX );
+ Matcher matcher = pattern.matcher( "" );
+ File[] files = dir.listFiles();
+
+ for( int i = 0; i < files.length; i++ ) {
+ matcher.reset( files[i].getName() );
+
+ if( matcher.matches() ) {
BackupDescriptor descriptor;
+
try {
- if (files[i].getName().endsWith(".zip"))
- descriptor = new ZipArchiveBackupDescriptor(files[i]);
- else
- descriptor = new FileSystemBackupDescriptor(files[i]);
+
+ if( files[i].getName().endsWith( ".zip" ) ) {
+ descriptor = new ZipArchiveBackupDescriptor( files[i] );
+ } else {
+ File descriptorFile = new File(new File(files[i], "db"), BackupDescriptor.COLLECTION_DESCRIPTOR);
+ descriptor = new FileSystemBackupDescriptor( descriptorFile );
+ }
Properties properties = descriptor.getProperties();
- if (properties != null) {
+
+ if( properties != null ) {
AttributesImpl attrs = new AttributesImpl();
- attrs.addAttribute("", "file", "file", "CDATA", files[i].getName());
- builder.startElement(BACKUP_ELEMENT, attrs);
- for (Iterator iter = properties.keySet().iterator(); iter.hasNext();) {
- String key = iter.next().toString();
- builder.startElement(new QName(key, Namespaces.EXIST_NS, ""), null);
- builder.characters((String) properties.get(key));
- builder.endElement();
- }
+ attrs.addAttribute( "", "file", "file", "CDATA", files[i].getName() );
+ builder.startElement( BACKUP_ELEMENT, attrs );
+
+ for( Iterator<Object> iter = properties.keySet().iterator(); iter.hasNext(); ) {
+ String key = iter.next().toString();
+ builder.startElement( new QName( key, Namespaces.EXIST_NS, "" ), null );
+ builder.characters( (String)properties.get( key ) );
+ builder.endElement();
+ }
builder.endElement();
}
- } catch (IOException e) {
}
+ catch( IOException e ) {
+ }
}
}
}
builder.endElement();
- return builder.getDocument().getNode(nodeNr);
- } finally {
+ return( builder.getDocument().getNode( nodeNr ) );
+ }
+ finally {
context.popDocumentContext();
}
}
-}
\ 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: <el...@us...> - 2011-07-31 10:49:10
|
Revision: 15014
http://exist.svn.sourceforge.net/exist/?rev=15014&view=rev
Author: ellefj
Date: 2011-07-31 10:49:03 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[ignore] javaclient review changes before 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/src/org/exist/client/ClientFrame.java
stable/eXist-1.4.x/src/org/exist/client/InteractiveClient.java
Modified: stable/eXist-1.4.x/src/org/exist/client/ClientFrame.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/client/ClientFrame.java 2011-07-31 09:48:06 UTC (rev 15013)
+++ stable/eXist-1.4.x/src/org/exist/client/ClientFrame.java 2011-07-31 10:49:03 UTC (rev 15014)
@@ -1,23 +1,23 @@
/*
* eXist Open Source Native XML Database
+ * Copyright (C) 2001-2011 The eXist Project
+ * http://exist-db.org
*
- * Copyright (C) 2001-06 Wolfgang M. Meier wol...@ex...
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by the
- * Free Software Foundation; either version 2 of the License, or (at your
- * option) any later version.
- *
- * This program is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
- * for more details.
- *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
* You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * $Id$
+ * along with this program; if not, write to the Free Software Foundation
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $Id$
*/
package org.exist.client;
@@ -1466,13 +1466,12 @@
Properties sysProperties = InteractiveClient.getSystemProperties();
- // Original text eXist version 1.0, Copyright (C) 2001-2006 Wolfgang Meier
JOptionPane.showMessageDialog(this,
sysProperties.getProperty("product-name") + " version "
+ sysProperties.getProperty("product-version")
+ " (revision " + sysProperties.getProperty("svn-revision") + ") \n\n"
- + "Copyright (C) 2001-2009 Wolfgang Meier\n\n"
- + "eXist comes with ABSOLUTELY NO WARRANTY.\n"
+ + "Copyright (C) 2001-2011 The eXist Project\n\n"
+ + "eXist-db comes with ABSOLUTELY NO WARRANTY.\n"
+ "This is free software, and you are welcome to\n"
+ "redistribute it under certain conditions;\n"
+ "for details read the license file." );
Modified: stable/eXist-1.4.x/src/org/exist/client/InteractiveClient.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/client/InteractiveClient.java 2011-07-31 09:48:06 UTC (rev 15013)
+++ stable/eXist-1.4.x/src/org/exist/client/InteractiveClient.java 2011-07-31 10:49:03 UTC (rev 15014)
@@ -1,23 +1,23 @@
/*
- * eXist Open Source Native XML Database
- * Copyright (C) 2001-07 The eXist Project
- * http://exist-db.org
+ * eXist Open Source Native XML Database
+ * Copyright (C) 2001-2011 The eXist Project
+ * http://exist-db.org
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- * $Id$
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $Id$
*/
package org.exist.client;
@@ -147,7 +147,7 @@
public static final String DRIVER="driver";
// values
- protected static String EDIT_CMD = "xemacs $file";
+ protected static String EDIT_CMD = "emacsclient -t $file";
protected static String ENCODING = "ISO-8859-1";
protected static String PASS = null;
protected static String URI_DEFAULT = "xmldb:exist://localhost:8080/exist/xmlrpc";
@@ -2612,8 +2612,8 @@
messageln(sysProperties.getProperty("product-name") + " version "
+ sysProperties.getProperty("product-version")
- +", Copyright (C) 2001-2009 Wolfgang Meier");
- messageln("eXist comes with ABSOLUTELY NO WARRANTY.");
+ +", Copyright (C) 2001-2011 The eXist Project");
+ messageln("eXist-db comes with ABSOLUTELY NO WARRANTY.");
messageln("This is free software, and you are welcome to "
+ "redistribute it\nunder certain conditions; "
+ "for details read the license file.\n");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: Dannes W. <da...@ex...> - 2011-07-31 10:37:19
|
Hi Adam, On 31 Jul 2011, at 12:08 , Adam Retter wrote: > Dannes, could you re-add the GSoC pages, of course keep the links > removed from the sidebar if you wish. But if we do GSoC again, its > very valuable during the application process to show our past history > with GSoC. Sure, we can do for trunk, but the pages were not maintained, not formatted etc ; quite ugly is was, that is why I removed it; but a revert/copy is easily done, one svn action right? cheers Dannes |
|
From: Adam R. <ad...@ex...> - 2011-07-31 10:08:57
|
Dannes, could you re-add the GSoC pages, of course keep the links removed from the sidebar if you wish. But if we do GSoC again, its very valuable during the application process to show our past history with GSoC. On 30 July 2011 19:32, <di...@us...> wrote: > Revision: 14994 > http://exist.svn.sourceforge.net/exist/?rev=14994&view=rev > Author: dizzzz > Date: 2011-07-30 19:32:43 +0000 (Sat, 30 Jul 2011) > > Log Message: > ----------- > [ignore] updates on sidebar, removed gsoc > > Modified Paths: > -------------- > stable/eXist-1.4.x/webapp/cocoon/sidebar.xml > stable/eXist-1.4.x/webapp/sidebar.xml > stable/eXist-1.4.x/webapp/testing/sidebar.xml > stable/eXist-1.4.x/webapp/xforms/sidebar.xml > stable/eXist-1.4.x/webapp/xforms/tasks/sidebar.xml > stable/eXist-1.4.x/webapp/xproc/sidebar.xml > stable/eXist-1.4.x/webapp/xquery/sidebar.xml > > Removed Paths: > ------------- > stable/eXist-1.4.x/webapp/gsoc/ > > Modified: stable/eXist-1.4.x/webapp/cocoon/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/cocoon/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/cocoon/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -78,10 +78,7 @@ > <link > href="http://sourceforge.net/tracker/?atid=317691&group_id=17691&func=browse" > >Submit Patches</link> > - </item> > - <item> > - <link href="gsoc/2008/summer.xml">Google Summer of Code</link> > - </item> > + </item> > </group> > <group name="Administration"> > <item> > @@ -93,15 +90,19 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > + > + <banner> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="resources/existsolutions.png"/></link> > + </banner> > + > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="resources/powered.gif"/></link> > + </banner> > + > </sidebar> > > Modified: stable/eXist-1.4.x/webapp/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -82,9 +82,6 @@ > <item> > <link href="http://sourceforge.net/tracker/?atid=317691&group_id=17691&func=browse">Submit Patches</link> > </item> > - <item> > - <link href="gsoc/2008/summer.xml">Google Summer of Code</link> > - </item> > </group> > <group name="Administration"> > <item> > > Modified: stable/eXist-1.4.x/webapp/testing/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/testing/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/testing/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -98,27 +98,18 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > > <banner> > - <link href="http://www.java.net"> > - <img src="resources/javanet_button_90.gif" border="0" alt="java.net Member Button"/> > - </link> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="../resources/existsolutions.png"/></link> > </banner> > > - <reference> > - <link href="http://www.izforge.com/izpack/"> > - <img src="resources/izpack-88x31.png" border="0" alt="IzPack Installer Generator"/> > - </link> > - </reference> > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="../resources/powered.gif"/></link> > + </banner> > </sidebar> > > Modified: stable/eXist-1.4.x/webapp/xforms/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/xforms/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/xforms/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -101,27 +101,18 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > > <banner> > - <link href="http://www.java.net"> > - <img src="resources/javanet_button_90.gif" border="0" alt="java.net Member Button"/> > - </link> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="resources/existsolutions.png"/></link> > </banner> > > - <reference> > - <link href="http://www.izforge.com/izpack/"> > - <img src="resources/izpack-88x31.png" border="0" alt="IzPack Installer Generator"/> > - </link> > - </reference> > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="resources/powered.gif"/></link> > + </banner> > </sidebar> > > Modified: stable/eXist-1.4.x/webapp/xforms/tasks/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/xforms/tasks/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/xforms/tasks/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -104,27 +104,18 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > > <banner> > - <link href="http://www.java.net"> > - <img src="resources/javanet_button_90.gif" border="0" alt="java.net Member Button"/> > - </link> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="resources/existsolutions.png"/></link> > </banner> > > - <reference> > - <link href="http://www.izforge.com/izpack/"> > - <img src="resources/izpack-88x31.png" border="0" alt="IzPack Installer Generator"/> > - </link> > - </reference> > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="resources/powered.gif"/></link> > + </banner> > </sidebar> > > Modified: stable/eXist-1.4.x/webapp/xproc/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/xproc/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/xproc/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -101,27 +101,18 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > > <banner> > - <link href="http://www.java.net"> > - <img src="resources/javanet_button_90.gif" border="0" alt="java.net Member Button"/> > - </link> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="../resources/existsolutions.png"/></link> > </banner> > > - <reference> > - <link href="http://www.izforge.com/izpack/"> > - <img src="resources/izpack-88x31.png" border="0" alt="IzPack Installer Generator"/> > - </link> > - </reference> > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="../resources/powered.gif"/></link> > + </banner> > </sidebar> > > Modified: stable/eXist-1.4.x/webapp/xquery/sidebar.xml > =================================================================== > --- stable/eXist-1.4.x/webapp/xquery/sidebar.xml 2011-07-30 19:15:05 UTC (rev 14993) > +++ stable/eXist-1.4.x/webapp/xquery/sidebar.xml 2011-07-30 19:32:43 UTC (rev 14994) > @@ -84,9 +84,7 @@ > href="http://sourceforge.net/tracker/?atid=317691&group_id=17691&func=browse" > >Submit Patches</link> > </item> > - <item> > - <link href="gsoc/2008/summer.xml">Google Summer of Code</link> > - </item> > + > > </group> > <group name="Administration"> > @@ -107,21 +105,19 @@ > </group> > > <banner> > - <link href="http://exist-db.org"> > - <img alt="powered by eXist" border="0" src="resources/powered.gif"/> > - </link> > + <script type="text/javascript" src="http://www.ohloh.net/p/252/widgets/project_thin_badge.js"></script> > </banner> > > - <banner name="" empty="true"> > - <link href="http://sourceforge.net/projects/exist"> > - <img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" > - height="37" border="0" alt="SourceForge Logo"/> > - </link> > + <banner name="" empty="true"> > + <link href="http://sourceforge.net/projects/exist"><img src="http://sourceforge.net/sflogo.php?group_id=17691&type=4" width="125" height="37" border="0" alt="SourceForge Logo"/></link> > </banner> > > <banner> > - <link href="http://www.java.net"> > - <img src="resources/javanet_button_90.gif" border="0" alt="java.net Member Button"/> > - </link> > + <link href="http://www.existsolutions.com"><img alt="eXist Solutions GmbH" border="0" src="../resources/existsolutions.png"/></link> > </banner> > + > + <banner> > + <link href="http://exist-db.org"><img alt="powered by eXist" border="0" src="../resources/powered.gif"/></link> > + </banner> > + > </sidebar> > > > This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. > > ------------------------------------------------------------------------------ > Got Input? Slashdot Needs You. > Take our quick survey online. Come on, we don't ask for help often. > Plus, you'll get a chance to win $100 to spend on ThinkGeek. > http://p.sf.net/sfu/slashdot-survey > _______________________________________________ > Exist-commits mailing list > Exi...@li... > https://lists.sourceforge.net/lists/listinfo/exist-commits > -- Adam Retter eXist Developer { United Kingdom } ad...@ex... irc://irc.freenode.net/existdb |
|
From: <wol...@us...> - 2011-07-31 09:48:12
|
Revision: 15013
http://exist.svn.sourceforge.net/exist/?rev=15013&view=rev
Author: wolfgang_m
Date: 2011-07-31 09:48:06 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[website] Fixed url rewriting example.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/urlrewrite/controller.xql
stable/eXist-1.4.x/webapp/urlrewrite/error-handler.xql
stable/eXist-1.4.x/webapp/urlrewrite/index.xml
stable/eXist-1.4.x/webapp/urlrewrite/login.xml
Removed Paths:
-------------
stable/eXist-1.4.x/webapp/urlrewrite/jquery.xml
stable/eXist-1.4.x/webapp/urlrewrite/style-jquery.xql
Modified: stable/eXist-1.4.x/webapp/urlrewrite/controller.xql
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/controller.xql 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/controller.xql 2011-07-31 09:48:06 UTC (rev 15013)
@@ -16,8 +16,10 @@
declare function local:set-credentials($user as xs:string, $password as xs:string?) as element()+ {
session:set-attribute("myapp.user", $user),
session:set-attribute("myapp.password", $password),
- <set-attribute name="xquery.user" value="{$user}"/>,
- <set-attribute name="xquery.password" value="{$password}"/>
+ <set-attribute xmlns="http://exist.sourceforge.net/NS/exist"
+ name="xquery.user" value="{$user}"/>,
+ <set-attribute xmlns="http://exist.sourceforge.net/NS/exist"
+ name="xquery.password" value="{$password}"/>
};
(:~
@@ -41,7 +43,10 @@
else if ($user) then
let $loggedIn := xdb:login("/db", $user, $password)
return
- local:set-credentials($user, $password)
+ if ($loggedIn) then
+ local:set-credentials($user, $password)
+ else
+ util:log("DEBUG", ("Could not log in ", $user, $password))
else if ($sessionCredentials) then
local:set-credentials($sessionCredentials[1], $sessionCredentials[2])
else
@@ -61,19 +66,6 @@
</view>
</dispatch>
-(:
- jQuery module demo: tags in the jquery namespace are expanded
- by style-jquery.xql
-:)
-else if ($exist:resource eq 'jquery.xml') then
- <dispatch xmlns="http://exist.sourceforge.net/NS/exist">
- {local:set-user()}
- <view>
- <forward url="style.xql"/>
- <forward url="style-jquery.xql"/>
- </view>
- </dispatch>
-
(:
Error handling: faulty.xql will trigger an XQuery error which
will be handled by error-handler.xql
@@ -96,7 +88,7 @@
else if ($exist:resource eq 'protected.xml') then
let $login := local:set-user()
return
- if ($login) then
+ if (exists($login)) then
<dispatch xmlns="http://exist.sourceforge.net/NS/exist">
{$login}
<view>
Modified: stable/eXist-1.4.x/webapp/urlrewrite/error-handler.xql
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/error-handler.xql 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/error-handler.xql 2011-07-31 09:48:06 UTC (rev 15013)
@@ -16,9 +16,10 @@
</style:page-head>
<div id="content2col">
<h2>An error has occurred</h2>
- {$input//div[@class = 'description']}
-
+ <div class="description">
+ {$input//div[@id = 'container']/h2/text()}
+ </div>
<p><a href="index.xml">Back</a> to the examples.</p>
</div>
</body>
- </html>
\ No newline at end of file
+ </html>
Modified: stable/eXist-1.4.x/webapp/urlrewrite/index.xml
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/index.xml 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/index.xml 2011-07-31 09:48:06 UTC (rev 15013)
@@ -16,9 +16,8 @@
<ul>
<li><a href="protected.xml">Access control</a>: use URL rewriting to control access to a resource from the controller.xql.</li>
- <li>Declarative jQuery: an XQuery module which parses an HTML template and generates jQuery/Javascript code. (trunk only)</li>
<li><a href="faulty.xql">Error handling</a>: redirect the user to a landing page if an XQuery error occurs.</li>
</ul>
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Deleted: stable/eXist-1.4.x/webapp/urlrewrite/jquery.xml
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/jquery.xml 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/jquery.xml 2011-07-31 09:48:06 UTC (rev 15013)
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<html xmlns:jquery="http://exist-db.org/xquery/jquery" xmlns:style="http://exist-db.org/xquery/style">
- <head>
- <title>eXist - jQuery/URL rewriting demo</title>
- <jquery:header base="../scripts/jquery" cssbase="../scripts/jquery/css"/>
- <style:default-styles/>
- <style type="text/css">
- label { width: 120px; float: left; }
- .source { margin-top: 1.5em; padding-top: 1em; border-top: 1px solid #CCC; }
- .programlisting { font-size: 13px; }
- </style>
- <script type="text/javascript">
- function dialogAction(node) { node.dialog("close"); alert("OK clicked!"); }
- function accordionCallback(node) { alert("Opening panel..."); }
- </script>
- </head>
- <body>
- <style:page-head base="..">
- <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="../sidebar.xml"/>
- </style:page-head>
- <div id="content2col">
- <p>This document is a complex demonstration of how to expand a set of known, namespaced tags in an HTML file
- by passing the source through an <a href="https://secure.wikimedia.org/wikibooks/en/wiki/XQuery/Typeswitch_Transformations">XQuery
- typeswitch transformation</a>.</p>
- <p>The demo extends the HTML page with a set of jQuery widgets. Instead of directly creating the widgets in Javascript, we use an XQuery
- module which expands a set of known tags in the jquery namespace and generates the required HTML and Javascript code for each widget.</p>
-
- <jquery:tabset id="tabs">
- <jquery:tab id="tab-info" label="Tabs">
- <p>Tabs can be created easily with a <jquery:tabset> element. The tabs are contained in its
- <jquery:tab> children. Tab sets can be nested:</p>
-<jquery:tabset id="nested-tabs">
- <jquery:tab id="nested-tab1" label="Nested Tab 1">
- <p>Nested tab 1.</p>
- </jquery:tab>
- <jquery:tab id="nested-tab2" label="Nested Tab 2">
- <p>Nested tab 2.</p>
- </jquery:tab>
- <jquery:tab href="ajax.html" label="AJAX"/>
-</jquery:tabset>
-
- <jquery:ajax-accordion class="source">
- <jquery:panel title="View Source"><jquery:source ref="nested-tabs"/></jquery:panel>
- </jquery:ajax-accordion>
- </jquery:tab>
- <jquery:tab id="tab-repeats" label="Repeating Fields">
-<div id="repeat-example">
- <p>Repeat a given part of a form. An index will be added to the name of each form element,
- so "query" becomes "query1", "query2", ...</p>
- <jquery:form-repeat trigger="#add-field" delete="#remove-field" form="#advanced-search"/>
- <form id="advanced-search" method="GET">
- <table>
- <tr class="repeat">
- <td>
- <jquery:select name="field">
- <jquery:option value="Author"/>
- <jquery:option value="Title"/>
- </jquery:select>
- </td>
- <td><jquery:input name="term"/></td>
- </tr>
- <tr>
- <td colspan="2">
- <button class="button" id="add-field">
- <span>+</span> Add search field</button>
- <button class="button" id="remove-field">
- <span>-</span> Remove selected search field</button>
- </td>
- </tr>
- <tr>
- <td colspan="2">
- <button type="submit">Search</button>
- </td>
- </tr>
- </table>
- </form>
-</div>
- <jquery:ajax-accordion class="source">
- <jquery:panel title="View Source"><jquery:source ref="repeat-example"/></jquery:panel>
- </jquery:ajax-accordion>
- </jquery:tab>
- <jquery:tab id="tab-accordion" label="Accordions">
-<jquery:ajax-accordion id="accordion-example">
- <jquery:panel title="Default">
- <p>An accordion consists of one or more panels, whose content can be either contained
- within the <jquery:panel> element itself or loaded from an AJAX source specified
- in the href attribute.</p>
- </jquery:panel>
- <jquery:panel title="Second panel">
- <p>Second panel.</p>
- </jquery:panel>
- <jquery:panel title="Callback function" on-select="accordionCallback">
- <p>Callback.</p>
- </jquery:panel>
- <jquery:panel title="AJAX panel" href="ajax.html"/>
-</jquery:ajax-accordion>
-
- <jquery:ajax-accordion class="source">
- <jquery:panel title="View Source"><jquery:source ref="accordion-example"/></jquery:panel>
- </jquery:ajax-accordion>
- </jquery:tab>
- <jquery:tab id="tab-dialogs" label="Dialogs">
-<div id="dialog-example">
- <ul>
- <li><a href="#" id="create-new">Simple Dialog</a></li>
- <li><a href="#" id="action">Dialog with action</a></li>
- </ul>
- <jquery:dialog id="new-dialog" modal="true" title="New" trigger="#create-new" width="550">
- <jquery:button id="cancel" label="Cancel"/>
- <p>The dialog may contain one or more <jquery:button> elements. The button with id="cancel" will automatically
- be set up to abort the action and close the dialog.</p>
- </jquery:dialog>
- <jquery:dialog id="action-dialog" modal="true" title="New" trigger="#action" width="550">
- <jquery:button id="cancel" label="Cancel"/>
- <jquery:button label="OK" function="dialogAction"/>
- <p>Clicking on the OK button calls the Javascript function "dialogAction".</p>
- </jquery:dialog>
-</div>
- <jquery:ajax-accordion class="source">
- <jquery:panel title="Source"><jquery:source ref="dialog-example"/></jquery:panel>
- </jquery:ajax-accordion>
- </jquery:tab>
- </jquery:tabset>
- </div>
- </body>
-</html>
\ No newline at end of file
Modified: stable/eXist-1.4.x/webapp/urlrewrite/login.xml
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/login.xml 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/login.xml 2011-07-31 09:48:06 UTC (rev 15013)
@@ -21,8 +21,8 @@
<input type="text" name="user"/>
</div>
<div>
- <label for="passord">Password:</label>
- <input type="password" name="passord"/>
+ <label for="password">Password:</label>
+ <input type="password" name="password"/>
</div>
<div>
<input type="submit" value="Login"/>
@@ -30,4 +30,4 @@
</form>
</div>
</body>
-</html>
\ No newline at end of file
+</html>
Deleted: stable/eXist-1.4.x/webapp/urlrewrite/style-jquery.xql
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/style-jquery.xql 2011-07-31 09:47:04 UTC (rev 15012)
+++ stable/eXist-1.4.x/webapp/urlrewrite/style-jquery.xql 2011-07-31 09:48:06 UTC (rev 15013)
@@ -1,11 +0,0 @@
-xquery version "1.0";
-
-import module namespace jquery="http://exist-db.org/xquery/jquery" at "resource:org/exist/xquery/lib/jquery.xql";
-
-(: declare option exist:serialize "method=xhtml media-type=application/xhtml+xml omit-xml-declaration=no enforce-xhtml=yes"; :)
-declare option exist:serialize "method=xhtml";
-
-(: We receive an HTML template as input :)
-let $input := request:get-data()
-return
- jquery:process($input)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-07-31 09:47:11
|
Revision: 15012
http://exist.svn.sourceforge.net/exist/?rev=15012&view=rev
Author: wolfgang_m
Date: 2011-07-31 09:47:04 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[feature] Ported improved XQuery URL rewrite from trunk. Many bugfixes.
Modified Paths:
--------------
stable/eXist-1.4.x/src/org/exist/http/servlets/XQueryServlet.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ControllerForward.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Forward.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ModuleCall.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PassThrough.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PathForward.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Redirect.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/RewriteConfig.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/URLRewrite.java
stable/eXist-1.4.x/src/org/exist/http/urlrewrite/XQueryURLRewrite.java
Modified: stable/eXist-1.4.x/src/org/exist/http/servlets/XQueryServlet.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/servlets/XQueryServlet.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/servlets/XQueryServlet.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -258,14 +258,14 @@
}
- if (request.getCharacterEncoding() == null)
- try {
- request.setCharacterEncoding(formEncoding);
- } catch (IllegalStateException e) {
- }
+// if (request.getCharacterEncoding() == null)
+// try {
+// request.setCharacterEncoding(formEncoding);
+// } catch (IllegalStateException e) {
+// }
ServletOutputStream sout = response.getOutputStream();
PrintWriter output = new PrintWriter(new OutputStreamWriter(sout, formEncoding));
- response.setContentType(contentType + "; charset=" + formEncoding);
+// response.setContentType(contentType + "; charset=" + formEncoding);
response.addHeader( "pragma", "no-cache" );
response.addHeader( "Cache-Control", "no-cache" );
@@ -314,7 +314,7 @@
if(descriptor.allowSource(path)) {
//Show the source of the XQuery
//writeResourceAs(resource, broker, stylesheet, encoding, "text/plain", outputProperties, response);
- response.setContentType("text/plain;charset=" + formEncoding);
+// response.setContentType("text/plain;charset=" + formEncoding);
output.write(source.getContent());
output.flush();
return;
@@ -332,18 +332,18 @@
// Date: Aug/06/2004
//-------------------------------
- String contentType = this.contentType;
- try {
- contentType = getServletContext().getMimeType(path);
- if (contentType == null)
- contentType = this.contentType;
- } catch (Throwable e) {
- contentType = this.contentType;
- } finally {
- if (contentType.startsWith("text/") || (contentType.endsWith("+xml")))
- contentType += ";charset=" + formEncoding;
- response.setContentType(contentType );
- }
+// String contentType = this.contentType;
+// try {
+// contentType = getServletContext().getMimeType(path);
+// if (contentType == null)
+// contentType = this.contentType;
+// } catch (Throwable e) {
+// contentType = this.contentType;
+// } finally {
+// if (contentType.startsWith("text/") || (contentType.endsWith("+xml")))
+// contentType += ";charset=" + formEncoding;
+// response.setContentType(contentType );
+// }
//-------------------------------
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ControllerForward.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ControllerForward.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ControllerForward.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,7 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: ControllerForward.java 13439 2010-12-22 17:12:51Z wolfgang_m $
*/
package org.exist.http.urlrewrite;
@@ -32,7 +32,7 @@
import java.io.IOException;
public class ControllerForward extends URLRewrite {
-
+
/**
* Adding server-name="www.example.com" to a root tag in the controller-config.xml file.<br/>
* <br/>
@@ -54,13 +54,16 @@
this.target = config.getAttribute("path");
}
+ @Override
public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
}
+ @Override
public boolean isControllerForward() {
return true;
}
+ @Override
protected void updateRequest(XQueryURLRewrite.RequestWrapper request) {
super.updateRequest(request);
if (!(target.length() == 0 || target.equals("/") ||target.startsWith(XmldbURI.XMLDB_URI_PREFIX))) {
@@ -70,8 +73,9 @@
}
}
+ @Override
protected void rewriteRequest(XQueryURLRewrite.RequestWrapper request) {
- if (target != null && target.startsWith(XmldbURI.XMLDB_URI_PREFIX)) {
+ if (target != null && target.startsWith(XmldbURI.XMLDB_URI_PREFIX)) {
XmldbURI dbURI = XmldbURI.create(target);
this.uri = "/rest";
String colPath = dbURI.getCollectionPath();
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Forward.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Forward.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Forward.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,30 +17,33 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: Forward.java 12936 2010-10-14 14:05:15Z gev $
*/
package org.exist.http.urlrewrite;
-import org.w3c.dom.Element;
+import java.io.IOException;
+import javax.servlet.FilterChain;
import javax.servlet.RequestDispatcher;
-import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
+import org.exist.http.servlets.HttpResponseWrapper;
+import org.w3c.dom.Element;
+
public abstract class Forward extends URLRewrite {
protected Forward(Element config, String uri) {
super(config, uri);
}
+ @Override
public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
RequestDispatcher dispatcher = getRequestDispatcher(request);
if (dispatcher == null)
throw new ServletException("Failed to initialize request dispatcher to forward request to " + uri);
- setHeaders(response);
+ setHeaders(new HttpResponseWrapper(response));
dispatcher.forward(request, response);
}
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ModuleCall.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ModuleCall.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/ModuleCall.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,11 +17,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: ModuleCall.java 11844 2010-06-14 21:35:38Z deliriumsky $
*/
package org.exist.http.urlrewrite;
import org.w3c.dom.Element;
+import org.exist.xquery.Expression;
import org.exist.xquery.XQueryContext;
import org.exist.xquery.XPathException;
import org.exist.xquery.Module;
@@ -29,25 +30,15 @@
import org.exist.xquery.ExternalModule;
import org.exist.xquery.FunctionCall;
import org.exist.xquery.value.Sequence;
-import org.exist.xquery.value.Item;
-import org.exist.xquery.value.Type;
import org.exist.dom.QName;
-import org.exist.util.serializer.SAXSerializer;
-import org.exist.util.serializer.SerializerPool;
-import org.exist.storage.serializers.Serializer;
-import org.xml.sax.SAXException;
import org.apache.log4j.Logger;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
-import javax.servlet.ServletOutputStream;
import java.io.IOException;
-import java.io.Writer;
-import java.io.OutputStreamWriter;
import java.util.ArrayList;
-import java.util.Properties;
public class ModuleCall extends URLRewrite {
@@ -80,12 +71,13 @@
else
func = context.resolveFunction(fqn, arity);
call = new FunctionCall(context, func);
- call.setArguments(new ArrayList());
+ call.setArguments(new ArrayList<Expression>());
} catch (XPathException e) {
e.printStackTrace();
}
}
+ @Override
public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
throws ServletException, IOException {
try {
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PassThrough.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PassThrough.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PassThrough.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,18 +17,20 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: PassThrough.java 12936 2010-10-14 14:05:15Z gev $
*/
package org.exist.http.urlrewrite;
-import org.w3c.dom.Element;
+import java.io.IOException;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
-import java.io.IOException;
+import org.exist.http.servlets.HttpResponseWrapper;
+import org.w3c.dom.Element;
+
public class PassThrough extends URLRewrite {
public PassThrough(HttpServletRequest request) {
@@ -41,8 +43,9 @@
this.target = request.getRequestURI().substring(request.getContextPath().length());
}
+ @Override
public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
- setHeaders(response);
+ setHeaders(new HttpResponseWrapper(response));
chain.doFilter(request, response);
}
}
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PathForward.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PathForward.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/PathForward.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,12 +17,12 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: PathForward.java 13765 2011-02-12 13:51:55Z wolfgang_m $
*/
package org.exist.http.urlrewrite;
+import org.exist.http.urlrewrite.XQueryURLRewrite.RequestWrapper;
import org.w3c.dom.Element;
-import org.exist.xmldb.XmldbURI;
import javax.servlet.RequestDispatcher;
import javax.servlet.FilterConfig;
@@ -48,6 +48,14 @@
}
}
+
+ @Override
+ protected void setAbsolutePath(RequestWrapper request) {
+ request.setPaths(target, servletName);
+ }
+
+
+ @Override
protected RequestDispatcher getRequestDispatcher(HttpServletRequest request) {
if (servletName != null)
return filterConfig.getServletContext().getNamedDispatcher(servletName);
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Redirect.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Redirect.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/Redirect.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,10 +17,11 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: Redirect.java 12936 2010-10-14 14:05:15Z gev $
*/
package org.exist.http.urlrewrite;
+import org.exist.http.servlets.HttpResponseWrapper;
import org.w3c.dom.Element;
import javax.servlet.http.HttpServletRequest;
@@ -28,8 +29,6 @@
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import java.io.IOException;
-import java.net.URI;
-import java.net.URISyntaxException;
public class Redirect extends URLRewrite {
@@ -44,8 +43,9 @@
setTarget(URLRewrite.normalizePath(redirectTo));
}
+ @Override
public void doRewrite(HttpServletRequest request, HttpServletResponse response, FilterChain chain) throws ServletException, IOException {
- setHeaders(response);
+ setHeaders(new HttpResponseWrapper(response));
response.sendRedirect(target);
}
}
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/RewriteConfig.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/RewriteConfig.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/RewriteConfig.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -6,12 +6,12 @@
import org.exist.security.PermissionDeniedException;
import org.exist.dom.DocumentImpl;
import org.exist.xmldb.XmldbURI;
-import org.exist.storage.BrokerPool;
import org.exist.storage.DBBroker;
import org.exist.storage.lock.Lock;
import org.exist.memtree.SAXAdapter;
-import org.exist.xquery.util.RegexTranslator;
import org.exist.xquery.Constants;
+import org.exist.xquery.util.RegexTranslator;
+import org.exist.xquery.util.RegexTranslator.RegexSyntaxException;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.Node;
@@ -43,6 +43,7 @@
public final static String CONFIG_FILE = "controller-config.xml";
public final static String MAP_ELEMENT = "map";
+ public final static String PATTERN_ATTRIBUTE = "pattern";
/**
* Adding server-name="www.example.com" to a root tag in the controller-config.xml file.<br/>
* <br/>
@@ -58,7 +59,6 @@
*
*/
public final static String SERVER_NAME_ATTRIBUTE = "server-name";
- public final static String PATTERN_ATTRIBUTE = "pattern";
/**
* Maps a regular expression to an URLRewrite instance
@@ -71,10 +71,11 @@
private Mapping(String regex, URLRewrite action) throws ServletException {
try {
- regex = RegexTranslator.translate(regex, true);
- this.pattern = Pattern.compile(regex, 0);
+ regex = RegexTranslator.translate(regex, true);
+
+ this.pattern = Pattern.compile(regex, 0);
this.action = action;
- } catch (RegexTranslator.RegexSyntaxException e) {
+ } catch (RegexSyntaxException e) {
throw new ServletException("Syntax error in regular expression specified for path. " +
e.getMessage(), e);
}
@@ -175,7 +176,7 @@
DBBroker broker = null;
DocumentImpl doc = null;
try {
- broker = urlRewrite.pool.get(urlRewrite.user);
+ broker = urlRewrite.pool.get(urlRewrite.defaultUser);
doc = broker.getXMLResource(XmldbURI.create(controllerConfig), Lock.READ_LOCK);
if (doc != null)
@@ -205,10 +206,8 @@
throw new ServletException("Failed to parse controller.xml: " + e.getMessage(), e);
}
}
-
try {
- urlRewrite.clearCaches();
-
+ urlRewrite.clearCaches();
} catch (EXistException e) {
throw new ServletException("Failed to update controller.xml: " + e.getMessage(), e);
}
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/URLRewrite.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/URLRewrite.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/URLRewrite.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -17,41 +17,49 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
- * $Id$
+ * $Id: URLRewrite.java 13765 2011-02-12 13:51:55Z wolfgang_m $
*/
package org.exist.http.urlrewrite;
-import org.w3c.dom.Element;
-import org.w3c.dom.Node;
-import org.exist.Namespaces;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import javax.servlet.FilterChain;
-import javax.servlet.ServletException;
import java.io.IOException;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Iterator;
import java.net.URI;
import java.net.URISyntaxException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import javax.servlet.FilterChain;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.exist.Namespaces;
+import org.exist.http.servlets.HttpResponseWrapper;
+import org.exist.http.urlrewrite.XQueryURLRewrite;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+
+
/**
* Base class for all rewritten URLs.
*/
public abstract class URLRewrite {
- private final static Object UNSET = new Object();
+ private final static String UNSET = "";
protected String uri;
protected String target;
protected String prefix = null;
- protected Map attributes = null;
- protected Map parameters = null;
- protected Map headers = null;
-
+ protected Map<String, String> attributes = null;
+ protected Map<String, List<String>> parameters = null;
+ protected Map<String, String> headers = null;
+ protected boolean absolute = false;
+
protected URLRewrite(Element config, String uri) {
this.uri = uri;
+ if (config != null && config.hasAttribute("absolute"))
+ absolute = config.getAttribute("absolute").equals("yes");
// Check for add-parameter elements etc.
if (config != null && config.hasChildNodes()) {
Node node = config.getFirstChild();
@@ -82,7 +90,15 @@
// do nothing by default
}
- /**
+ protected void setAbsolutePath(XQueryURLRewrite.RequestWrapper request) {
+ request.setPaths(target, null);
+ }
+
+ protected boolean doResolve() {
+ return !absolute;
+ }
+
+ /**
* Resolve the target of this rewrite rule against the current request context.
*
* @return the new target path excluding context path
@@ -111,26 +127,39 @@
}
private void setHeader(String key, String value) {
- if (headers == null)
- headers = new HashMap();
+ if(headers == null) {
+ headers = new HashMap<String, String>();
+ }
headers.put(key, value);
}
+ private void addNameValue(String name, String value, Map<String, List<String>> map) {
+ List<String> values = map.get(name);
+ if(values == null) {
+ values = new ArrayList<String>();
+ }
+ values.add(value);
+ map.put(name, values);
+ }
+
private void addParameter(String name, String value) {
- if (parameters == null)
- parameters = new HashMap();
- parameters.put(name, value);
+ if(parameters == null){
+ parameters = new HashMap<String, List<String>>();
+ }
+ addNameValue(name, value, parameters);
}
private void setAttribute(String name, String value) {
- if (attributes == null)
- attributes = new HashMap();
+ if(attributes == null) {
+ attributes = new HashMap<String, String>();
+ }
attributes.put(name, value);
}
private void unsetAttribute(String name) {
- if (attributes == null)
- attributes = new HashMap();
+ if(attributes == null){
+ attributes = new HashMap<String, String>();
+ }
attributes.put(name, UNSET);
}
@@ -165,27 +194,27 @@
public void prepareRequest(XQueryURLRewrite.RequestWrapper request) {
if (parameters != null) {
- for (Iterator iterator = parameters.entrySet().iterator(); iterator.hasNext();) {
- Map.Entry entry = (Map.Entry) iterator.next();
- request.addParameter(entry.getKey().toString(), (String) entry.getValue());
+ for(Map.Entry<String, List<String>> param : parameters.entrySet()) {
+ for(String paramValue : param.getValue()) {
+ request.addParameter(param.getKey().toString(), paramValue);
+ }
}
}
if (attributes != null) {
- for (Iterator iterator = attributes.entrySet().iterator(); iterator.hasNext();) {
- Map.Entry entry = (Map.Entry) iterator.next();
- Object value = entry.getValue();
- if (value == UNSET)
+ for (Map.Entry<String, String> entry : attributes.entrySet()) {
+ String value = entry.getValue();
+ if(value.equals(UNSET)) {
request.removeAttribute(entry.getKey().toString());
- else
+ } else {
request.setAttribute(entry.getKey().toString(), entry.getValue());
+ }
}
}
}
- protected void setHeaders(HttpServletResponse response) {
+ protected void setHeaders(HttpResponseWrapper response) {
if (headers != null) {
- for (Iterator iterator = headers.entrySet().iterator(); iterator.hasNext();) {
- Map.Entry entry = (Map.Entry) iterator.next();
+ for (Map.Entry<String, String> entry : headers.entrySet()) {
response.setHeader(entry.getKey().toString(), entry.getValue().toString());
}
}
Modified: stable/eXist-1.4.x/src/org/exist/http/urlrewrite/XQueryURLRewrite.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2011-07-31 09:42:13 UTC (rev 15011)
+++ stable/eXist-1.4.x/src/org/exist/http/urlrewrite/XQueryURLRewrite.java 2011-07-31 09:47:04 UTC (rev 15012)
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id$
+ * $Id: XQueryURLRewrite.java 14946 2011-07-23 09:25:49Z wolfgang_m $
*/
package org.exist.http.urlrewrite;
@@ -30,7 +30,6 @@
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
-import java.io.Writer;
import org.apache.log4j.Logger;
@@ -52,8 +51,6 @@
import org.exist.dom.DocumentImpl;
import org.exist.dom.BinaryDocument;
import org.exist.xmldb.XmldbURI;
-import org.exist.util.serializer.SAXSerializer;
-import org.exist.util.serializer.SerializerPool;
import org.exist.security.*;
import org.exist.security.xacml.AccessContext;
import org.exist.storage.BrokerPool;
@@ -61,6 +58,9 @@
import org.exist.storage.XQueryPool;
import org.exist.storage.lock.Lock;
import org.exist.storage.serializers.Serializer;
+import org.exist.util.MimeType;
+import org.exist.util.serializer.SAXSerializer;
+import org.exist.util.serializer.SerializerPool;
import org.exist.http.servlets.HttpRequestWrapper;
import org.exist.http.servlets.HttpResponseWrapper;
import org.exist.http.Descriptor;
@@ -87,17 +87,19 @@
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponseWrapper;
+import javax.xml.transform.OutputKeys;
import java.net.URISyntaxException;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
+import java.util.Map.Entry;
import java.util.Properties;
-import java.util.Vector;
+import java.util.Set;
import java.util.regex.Pattern;
import java.util.regex.Matcher;
@@ -128,6 +130,7 @@
public final static String RQ_ATTR_SERVLET_PATH = "org.exist.forward.servlet-path";
public final static String RQ_ATTR_RESULT = "org.exist.forward.result";
+
public final static String DRIVER = "org.exist.xmldb.DatabaseImpl";
private final static Pattern NAME_REGEX = Pattern.compile("^.*/([^/]+)$", 0);
@@ -136,7 +139,7 @@
private final Map<String, ModelAndView> urlCache = new HashMap<String, ModelAndView>();
- protected User user;
+ protected User defaultUser = null;
protected BrokerPool pool;
// path to the query
@@ -146,8 +149,11 @@
private boolean checkModified = true;
+ private boolean compiledCache = true;
+
private RewriteConfig rewriteConfig;
+ @Override
public void init(FilterConfig filterConfig) throws ServletException {
// save FilterConfig for later use
this.config = filterConfig;
@@ -157,8 +163,14 @@
String opt = filterConfig.getInitParameter("check-modified");
if (opt != null)
checkModified = opt != null && opt.equalsIgnoreCase("true");
+
+ opt = filterConfig.getInitParameter("compiled-cache");
+ if (opt != null)
+ compiledCache = opt != null && opt.equalsIgnoreCase("true");
+
}
+ @Override
public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException {
if (rewriteConfig == null) {
configure();
@@ -168,12 +180,6 @@
long start = System.currentTimeMillis();
HttpServletRequest request = (HttpServletRequest) servletRequest;
HttpServletResponse response = (HttpServletResponse) servletResponse;
- if (request.getCharacterEncoding() == null) {
- try {
- request.setCharacterEncoding("UTF-8");
- } catch (IllegalStateException e) {
- }
- }
if (LOG.isTraceEnabled())
LOG.trace(request.getRequestURI());
@@ -191,9 +197,11 @@
}
}
+ User user = defaultUser;
+
try {
configure();
- checkCache();
+ checkCache(user);
RequestWrapper modifiedRequest = new RequestWrapper(request);
URLRewrite staticRewrite = rewriteConfig.lookup(modifiedRequest);
@@ -213,7 +221,6 @@
// check if the request URI is already in the url cache
ModelAndView modelView = getFromCache(modifiedRequest.getHeader("Host") + modifiedRequest.getRequestURI(), user);
-
// no: create a new model and view configuration
if (modelView == null) {
modelView = new ModelAndView();
@@ -223,124 +230,132 @@
try {
broker = pool.get(user);
modifiedRequest.setAttribute(RQ_ATTR_REQUEST_URI, request.getRequestURI());
- result = runQuery(broker, modifiedRequest, response, staticRewrite);
+
+ Properties outputProperties = new Properties();
+
+ outputProperties.setProperty(OutputKeys.INDENT, "yes");
+ outputProperties.setProperty(OutputKeys.ENCODING, "UTF-8");
+ outputProperties.setProperty(OutputKeys.MEDIA_TYPE, MimeType.XML_TYPE.getName());
+
+ result = runQuery(broker, modifiedRequest, response, staticRewrite, outputProperties);
logResult(broker, result);
+
+ if (response.isCommitted()) {
+ return;
+ }
+
+ // process the query result
+ if (result.getItemCount() == 1) {
+ Item resource = result.itemAt(0);
+ if (!Type.subTypeOf(resource.getType(), Type.NODE))
+ throw new ServletException("XQueryURLRewrite: urlrewrite query should return an element!");
+ Node node = ((NodeValue) resource).getNode();
+ if (node.getNodeType() == Node.DOCUMENT_NODE)
+ node = ((Document) node).getDocumentElement();
+ if (node.getNodeType() != Node.ELEMENT_NODE) {
+ //throw new ServletException("Redirect XQuery should return an XML element!");
+ response(broker, response, outputProperties, result);
+ return;
+ }
+ Element elem = (Element) node;
+ if (!(Namespaces.EXIST_NS.equals(elem.getNamespaceURI()))) {
+ response(broker, response, outputProperties, result);
+ return;
+ // throw new ServletException("Redirect XQuery should return an element in namespace " + Namespaces.EXIST_NS);
+ }
+
+ if (Namespaces.EXIST_NS.equals(elem.getNamespaceURI()) && "dispatch".equals(elem.getLocalName())) {
+ node = elem.getFirstChild();
+ while (node != null) {
+ if (node.getNodeType() == Node.ELEMENT_NODE && Namespaces.EXIST_NS.equals(node.getNamespaceURI())) {
+ Element action = (Element) node;
+ if ("view".equals(action.getLocalName())) {
+ parseViews(modifiedRequest, action, modelView);
+ } else if ("error-handler".equals(action.getLocalName())) {
+ parseErrorHandlers(modifiedRequest, action, modelView);
+ } else if ("cache-control".equals(action.getLocalName())) {
+ String option = action.getAttribute("cache");
+ modelView.setUseCache("yes".equals(option));
+ } else {
+ URLRewrite urw = parseAction(modifiedRequest, action);
+ if (urw != null)
+ modelView.setModel(urw);
+ }
+ }
+ node = node.getNextSibling();
+ }
+ if (modelView.getModel() == null)
+ modelView.setModel(new PassThrough(elem, modifiedRequest));
+ } else if (Namespaces.EXIST_NS.equals(elem.getNamespaceURI()) && "ignore".equals(elem.getLocalName())) {
+ modelView.setModel(new PassThrough(elem, modifiedRequest));
+ NodeList nl = elem.getElementsByTagNameNS(Namespaces.EXIST_NS, "cache-control");
+ if (nl.getLength() > 0) {
+ elem = (Element) nl.item(0);
+ String option = elem.getAttribute("cache");
+ modelView.setUseCache("yes".equals(option));
+ }
+ } else {
+ response(broker, response, outputProperties, result);
+ return;
+ }
+ } else if (result.getItemCount() > 1) {
+ response(broker, response, outputProperties, result);
+ return;
+ }
+
+ if (modelView.useCache()) {
+ synchronized (urlCache) {
+ urlCache.put(modifiedRequest.getHeader("Host") + request.getRequestURI(), modelView);
+ }
+ }
} finally {
pool.release(broker);
}
- // process the query result
- if (result.getItemCount() == 1) {
- Item resource = result.itemAt(0);
- if (!Type.subTypeOf(resource.getType(), Type.NODE))
- throw new ServletException("XQueryURLRewrite: urlrewrite query should return an element!");
- Node node = ((NodeValue) resource).getNode();
- if (node.getNodeType() == Node.DOCUMENT_NODE)
- node = ((Document) node).getDocumentElement();
- if (node.getNodeType() != Node.ELEMENT_NODE) {
- throw new ServletException("Redirect XQuery should return an XML element!");
- }
- Element elem = (Element) node;
- if (!(Namespaces.EXIST_NS.equals(elem.getNamespaceURI()))) {
- throw new ServletException("Redirect XQuery should return an element in namespace " + Namespaces.EXIST_NS);
- }
-
- if ("dispatch".equals(elem.getLocalName())) {
- node = elem.getFirstChild();
- while (node != null) {
- if (node.getNodeType() == Node.ELEMENT_NODE && Namespaces.EXIST_NS.equals(node.getNamespaceURI())) {
- Element action = (Element) node;
- if ("view".equals(action.getLocalName())) {
- parseViews(modifiedRequest, action, modelView);
- } else if ("cache-control".equals(action.getLocalName())) {
- String option = action.getAttribute("cache");
- modelView.setUseCache("yes".equals(option));
- } else {
- URLRewrite urw = parseAction(modifiedRequest, action);
- if (urw != null)
- modelView.setModel(urw);
- }
- }
- node = node.getNextSibling();
- }
- if (modelView.getModel() == null)
- modelView.setModel(new PassThrough(elem, modifiedRequest));
- } else if ("ignore".equals(elem.getLocalName())) {
- modelView.setModel(new PassThrough(elem, modifiedRequest));
- NodeList nl = elem.getElementsByTagNameNS(Namespaces.EXIST_NS, "cache-control");
- if (nl.getLength() > 0) {
- elem = (Element) nl.item(0);
- String option = elem.getAttribute("cache");
- modelView.setUseCache("yes".equals(option));
- }
- }
- }
-
// store the original request URI to org.exist.forward.request-uri
modifiedRequest.setAttribute(RQ_ATTR_REQUEST_URI, request.getRequestURI());
modifiedRequest.setAttribute(RQ_ATTR_SERVLET_PATH, request.getServletPath());
- if (modelView.useCache()) {
- synchronized (urlCache) {
- urlCache.put(modifiedRequest.getHeader("Host") + request.getRequestURI(), modelView);
- }
- }
}
if (LOG.isTraceEnabled())
LOG.trace("URLRewrite took " + (System.currentTimeMillis() - start) + "ms.");
- HttpServletResponse wrappedResponse = response;
- if (modelView.hasViews())
- wrappedResponse = new CachingResponseWrapper(response, true);
+ HttpServletResponse wrappedResponse =
+ new CachingResponseWrapper(response, modelView.hasViews() || modelView.hasErrorHandlers());
if (modelView.getModel() == null)
modelView.setModel(new PassThrough(modifiedRequest));
if (staticRewrite != null) {
- staticRewrite.rewriteRequest(modifiedRequest);
+ if (modelView.getModel().doResolve())
+ staticRewrite.rewriteRequest(modifiedRequest);
+ else
+ modelView.getModel().setAbsolutePath(modifiedRequest);
}
+ modifiedRequest.allowCaching(!modelView.hasViews());
doRewrite(modelView.getModel(), modifiedRequest, wrappedResponse, filterChain);
- if (modelView.hasViews()) {
- int status = ((CachingResponseWrapper) wrappedResponse).getStatus();
- if (status == HttpServletResponse.SC_NOT_MODIFIED) {
- response.flushBuffer();
- } else if (status < 400) {
- List views = modelView.views;
- for (int i = 0; i < views.size(); i++) {
- URLRewrite view = (URLRewrite) views.get(i);
- RequestWrapper wrappedReq = new RequestWrapper(modifiedRequest);
- wrappedReq.setMethod("POST");
- wrappedReq.setCharacterEncoding(wrappedResponse.getCharacterEncoding());
- wrappedReq.setContentType(wrappedResponse.getContentType());
- byte[] data = ((CachingResponseWrapper) wrappedResponse).getData();
- if (data != null)
- wrappedReq.setData(data);
-
- if (i < views.size() - 1)
- wrappedResponse = new CachingResponseWrapper(response, true);
- else
- wrappedResponse = new CachingResponseWrapper(response, false);
- doRewrite(view, wrappedReq, wrappedResponse, null);
- wrappedResponse.flushBuffer();
-
- // catch errors in the view
- status = ((CachingResponseWrapper) wrappedResponse).getStatus();
- if (status >= 400) {
- flushError(response, wrappedResponse);
- break;
- }
- }
- } else {
- // HTTP response code indicates an error
- flushError(response, wrappedResponse);
- }
+ int status = ((CachingResponseWrapper) wrappedResponse).getStatus();
+ if (status == HttpServletResponse.SC_NOT_MODIFIED) {
+ response.flushBuffer();
+ } else if (status < 400) {
+ if (modelView.hasViews())
+ applyViews(modelView.views, response, modifiedRequest, wrappedResponse);
+ else
+ ((CachingResponseWrapper) wrappedResponse).flush();
+ } else {
+ // HTTP response code indicates an error
+ if (modelView.hasErrorHandlers()) {
+ applyViews(modelView.errorHandlers, response, modifiedRequest, wrappedResponse);
+ } else {
+ flushError(response, wrappedResponse);
+ }
}
+ }
// Sequence result;
// if ((result = (Sequence) request.getAttribute(RQ_ATTR_RESULT)) != null) {
// writeResults(response, broker, result);
// }
- }
} catch (EXistException e) {
LOG.error(e.getMessage(), e);
throw new ServletException("An error occurred while retrieving query results: "
@@ -360,8 +375,78 @@
+ e.getMessage(), e);
}
}
+
+ private void applyViews(List<URLRewrite> views, HttpServletResponse response, RequestWrapper modifiedRequest,
+ HttpServletResponse wrappedResponse)
+ throws UnsupportedEncodingException, IOException, ServletException {
+ int status;
+ for (int i = 0; i < views.size(); i++) {
+ URLRewrite view = (URLRewrite) views.get(i);
+
+ RequestWrapper wrappedReq = new RequestWrapper(modifiedRequest);
+ wrappedReq.allowCaching(false);
+ wrappedReq.setMethod("POST");
+ wrappedReq.setCharacterEncoding(wrappedResponse.getCharacterEncoding());
+ wrappedReq.setContentType(wrappedResponse.getContentType());
+ byte[] data = ((CachingResponseWrapper) wrappedResponse).getData();
+ if (data != null)
+ wrappedReq.setData(data);
+
+ wrappedResponse = new CachingResponseWrapper(response, i < views.size() - 1);
+ doRewrite(view, wrappedReq, wrappedResponse, null);
+ wrappedResponse.flushBuffer();
- private void flushError(HttpServletResponse response, HttpServletResponse wrappedResponse) throws IOException {
+ // catch errors in the view
+ status = ((CachingResponseWrapper) wrappedResponse).getStatus();
+ if (status >= 400) {
+ flushError(response, wrappedResponse);
+ break;
+ }
+ }
+ }
+
+ private void response(DBBroker broker, HttpServletResponse response, Properties outputProperties, Sequence resultSequence) throws IOException {
+
+ String encoding = outputProperties.getProperty(OutputKeys.ENCODING);
+ ServletOutputStream sout = response.getOutputStream();
+ PrintWriter output = new PrintWriter(new OutputStreamWriter(sout, encoding));
+ if (!response.containsHeader("Content-Type")){
+ String mimeType = outputProperties.getProperty(OutputKeys.MEDIA_TYPE);
+ if (mimeType != null) {
+ int semicolon = mimeType.indexOf(';');
+ if (semicolon != Constants.STRING_NOT_FOUND) {
+ mimeType = mimeType.substring(0, semicolon);
+ }
+ response.setContentType(mimeType + "; charset=" + encoding);
+ }
+ }
+
+// response.addHeader( "pragma", "no-cache" );
+// response.addHeader( "Cache-Control", "no-cache" );
+
+ Serializer serializer = broker.getSerializer();
+ serializer.reset();
+
+ SerializerPool serializerPool = SerializerPool.getInstance();
+
+ SAXSerializer sax = (SAXSerializer) serializerPool.borrowObject(SAXSerializer.class);
+ try {
+ sax.setOutput(output, outputProperties);
+
+ serializer.setProperties(outputProperties);
+ serializer.setSAXHandlers(sax, sax);
+ serializer.toSAX(resultSequence, 1, resultSequence.getItemCount(), false);
+
+ } catch (SAXException e) {
+ throw new IOException(e);
+ } finally {
+ serializerPool.returnObject(sax);
+ }
+ output.flush();
+ output.close();
+ }
+
+ private void flushError(HttpServletResponse response, HttpServletResponse wrappedResponse) throws IOException {
byte[] data = ((CachingResponseWrapper) wrappedResponse).getData();
if (data != null) {
response.setContentType(wrappedResponse.getContentType());
@@ -370,67 +455,65 @@
response.flushBuffer();
}
}
-
-
- private ModelAndView getFromCache(String url, User user) throws EXistException {
- /* Make sure we have a broker *before* we synchronize on urlCache or we may run
- * into a deadlock situation (with method checkCache)
- */
- DBBroker broker = null;
- try {
- broker = pool.get(user);
- synchronized (urlCache) {
- return urlCache.get(url);
- }
- } finally {
- pool.release(broker);
- }
- }
-
- protected void clearCaches() throws EXistException {
- DBBroker broker = null;
- try {
- broker = pool.get(user); // DW: used to be default user
- synchronized (urlCache) {
- urlCache.clear();
- sources.clear();
- }
- } finally {
- pool.release(broker);
- }
- }
- private void checkCache() throws EXistException {
+ private ModelAndView getFromCache(String url, User user) throws EXistException {
+ /* Make sure we have a broker *before* we synchronize on urlCache or we may run
+ * into a deadlock situation (with method checkCache)
+ */
+ DBBroker broker = null;
+ try {
+ broker = pool.get(user);
+ synchronized (urlCache) {
+ return urlCache.get(url);
+ }
+ } finally {
+ pool.release(broker);
+ }
+ }
+
+ private void checkCache(User user) throws EXistException {
if (checkModified) {
// check if any of the currently used sources has been updated
// if yes, clear the cache
- DBBroker broker = null;
+ DBBroker broker = null;
try {
broker = pool.get(user);
synchronized (urlCache) {
- for (Source source : sources.values()) {
- if (source instanceof DBSource) {
- // Check if the XQuery source changed. If yes, clear all caches.
- if (source.isValid(broker) != Source.VALID) {
- clearCaches();
- break;
- }
+ for (Source source : sources.values()) {
+ if (source instanceof DBSource) {
+ // Check if the XQuery source changed. If yes, clear all caches.
- } else {
- if (source.isValid((DBBroker) null) != Source.VALID) { //DW
- clearCaches();
- break;
- }
- }
- }
+ if (source.isValid(broker) != Source.VALID) {
+ clearCaches();
+ break;
+ }
+ } else {
+ if (source.isValid((DBBroker)null) != Source.VALID) {
+ clearCaches();
+ break;
+ }
+ }
+ }
}
-
} finally {
pool.release(broker);
}
}
}
+ protected void clearCaches() throws EXistException {
+ DBBroker broker = null;
+ try {
+ broker = pool.get(defaultUser);
+ synchronized (urlCache) {
+ urlCache.clear();
+ sources.clear();
+ }
+ } finally {
+ pool.release(broker);
+ }
+ }
+
/**
* Process a rewrite action. Method checks if the target path is mapped
* to another action in controller-config.xml. If yes, replaces the current action
@@ -448,6 +531,7 @@
if (action.getTarget() != null && !(action instanceof Redirect)) {
String uri = action.resolve(request);
URLRewrite staticRewrite = rewriteConfig.lookup(uri, request.getServerName(), true);
+
if (staticRewrite != null) {
staticRewrite.copyFrom(action);
action = staticRewrite;
@@ -466,13 +550,6 @@
return config;
}
-// protected void clearCaches() {
-// synchronized (urlCache) {
-// urlCache.clear();
-// sources.clear();
-// }
-// }
-
private URLRewrite parseAction(HttpServletRequest request, Element action) throws ServletException {
URLRewrite rewrite = null;
if ("forward".equals(action.getLocalName())) {
@@ -497,9 +574,23 @@
}
}
+ private void parseErrorHandlers(HttpServletRequest request, Element view, ModelAndView modelView) throws ServletException {
+ Node node = view.getFirstChild();
+ while (node != null) {
+ if (node.getNodeType() == Node.ELEMENT_NODE && Namespaces.EXIST_NS.equals(node.getNamespaceURI())) {
+ URLRewrite urw = parseAction(request, (Element) node);
+ if (urw != null)
+ modelView.addErrorHandler(urw);
+ }
+ node = node.getNextSibling();
+ }
+ }
+
private void configure() throws ServletException {
+ if (pool != null)
+ return;
try {
- Class driver = Class.forName(DRIVER);
+ Class<?> driver = Class.forName(DRIVER);
Database database = (Database) driver.newInstance();
database.setProperty("create-database", "true");
DatabaseManager.registerDatabase(database);
@@ -512,20 +603,16 @@
String username = config.getInitParameter("user");
if(username == null)
- username = DEFAULT_USER;
+ username = DEFAULT_USER;
String password = config.getInitParameter("password");
if(password == null)
- password = DEFAULT_PASS;
- try {
- pool = BrokerPool.getInstance();
- org.exist.security.SecurityManager secman = pool.getSecurityManager();
- user = secman.getUser(username);
- if (!user.validate(password)) {
- throw new ServletException("Invalid password specified for XQueryURLRewrite user");
- }
- } catch (EXistException e) {
+ password = DEFAULT_PASS;
+
+ try {
+ pool = BrokerPool.getInstance();
+ } catch (EXistException e) {
throw new ServletException("Could not intialize db: " + e.getMessage(), e);
- }
+ }
}
private void logResult(DBBroker broker, Sequence result) throws IOException, SAXException {
@@ -540,13 +627,14 @@
}
}
+ @Override
public void destroy() {
config = null;
}
private Sequence runQuery(DBBroker broker, RequestWrapper request, HttpServletResponse response,
- URLRewrite staticRewrite)
- throws ServletException, XPathException {
+ URLRewrite staticRewrite, Properties outputProperties)
+ throws ServletException, XPathException, PermissionDeniedException {
// Try to find the XQuery
SourceInfo sourceInfo;
String moduleLoadPath = config.getServletContext().getRealPath(".");
@@ -564,8 +652,12 @@
}
XQuery xquery = broker.getXQueryService();
- XQueryPool pool = xquery.getXQueryPool();
- CompiledXQuery compiled = pool.borrowCompiledXQuery(broker, sourceInfo.source);
+ XQueryPool xqyPool = xquery.getXQueryPool();
+
+ CompiledXQuery compiled = null;
+ if (compiledCache)
+ compiled = xqyPool.borrowCompiledXQuery(broker, sourceInfo.source);
+
XQueryContext queryContext;
if (compiled == null) {
queryContext = xquery.newContext(AccessContext.REST);
@@ -573,7 +665,7 @@
queryContext = compiled.getContext();
}
// Find correct module load path
- queryContext.setModuleLoadPath(moduleLoadPath);
+ queryContext.setModuleLoadPath(sourceInfo.moduleLoadPath);
declareVariables(queryContext, sourceInfo, staticRewrite, basePath, request, response);
if (compiled == null) {
try {
@@ -588,21 +680,43 @@
// if (xdebug != null)
// compiled.getContext().setDebugMode(true);
+// outputProperties.put("base-uri", collectionURI.toString());
+
try {
- return xquery.execute(compiled, null);
+ return xquery.execute(compiled, null, outputProperties);
} finally {
- pool.returnCompiledXQuery(sourceInfo.source, compiled);
+ xqyPool.returnCompiledXQuery(sourceInfo.source, compiled);
}
}
+ protected String adjustPathForSourceLookup(String basePath, String path) {
+ LOG.trace("request path=" + path);
+ if(basePath.startsWith(XmldbURI.EMBEDDED_SERVER_URI_PREFIX) && path.startsWith(basePath.replace(XmldbURI.EMBEDDED_SERVER_URI_PREFIX, ""))) {
+ path = path.replace(basePath.replace(XmldbURI.EMBEDDED_SERVER_URI_PREFIX, ""), "");
+ }
+ else if(path.startsWith("/db/")) {
+ path = path.substring(4);
+ }
+
+ if(path.startsWith("/")) {
+ path = path.substring(1);
+ }
+ LOG.trace("adjusted request path=" + path);
+
+ return path;
+ }
+
private SourceInfo findSource(HttpServletRequest request, DBBroker broker, String basePath) throws ServletException {
String requestURI = request.getRequestURI();
String path = requestURI.substring(request.getContextPath().length());
- if (path.startsWith("/"))
- path = path.substring(1);
+ LOG.trace("basePath=" + basePath);
+
+ path = adjustPathForSourceLookup(basePath, path);
+
String[] components = path.split("/");
SourceInfo sourceInfo = null;
if (basePath.startsWith(XmldbURI.XMLDB_URI_PREFIX)) {
+ LOG.trace("Looking for controller.xql in the database, starting from: " + basePath);
try {
XmldbURI locationUri = XmldbURI.xmldbUriFor(basePath);
Collection collection = broker.openCollection(locationUri, Lock.READ_LOCK);
@@ -617,8 +731,11 @@
DocumentImpl doc = null;
try {
if (components[i].length() > 0 && subColl.hasChildCollection(XmldbURI.createInternal(components[i]))) {
- subColl = broker.openCollection(subColl.getURI().append(components[i]), Lock.READ_LOCK);
+ XmldbURI newSubCollURI = subColl.getURI().append(components[i]);
+ LOG.trace("Inspecting sub-collection: " + newSubCollURI);
+ subColl = broker.openCollection(newSubCollURI, Lock.READ_LOCK);
if (subColl != null) {
+ LOG.trace("Looking for controller.xql in " + subColl.getURI());
XmldbURI docUri = subColl.getURI().append("controller.xql");
doc = broker.getXMLResource(docUri, Lock.READ_LOCK);
if (doc != null)
@@ -636,9 +753,9 @@
LOG.debug("Bad collection URI: " + path);
break;
} finally {
- if (doc != null)
+ if (doc != null && controllerDoc == null)
doc.getUpdateLock().release(Lock.READ_LOCK);
- if (subColl != null)
+ if (subColl != null && subColl != collection)
subColl.getLock().release(Lock.READ_LOCK);
}
}
@@ -656,6 +773,11 @@
LOG.warn("XQueryURLRewrite controller could not be found");
return null;
}
+
+ if(LOG.isTraceEnabled()) {
+ LOG.trace("Found controller file: " + controllerDoc.getURI());
+ }
+
try {
if (controllerDoc.getResourceType() != DocumentImpl.BINARY_FILE ||
!controllerDoc.getMetadata().getMimeType().equals("application/xquery")) {
@@ -663,8 +785,9 @@
"declares a wrong mime-type");
return null;
}
- sourceInfo = new SourceInfo(new DBSource(broker, (BinaryDocument) controllerDoc, true));
String controllerPath = controllerDoc.getCollection().getURI().getRawCollectionPath();
+ sourceInfo = new SourceInfo(new DBSource(broker, (BinaryDocument) controllerDoc, true),
+ "xmldb:exist://" + controllerPath);
sourceInfo.controllerPath =
controllerPath.substring(locationUri.getCollectionPath().length());
return sourceInfo;
@@ -677,6 +800,7 @@
return null;
}
} else {
+ LOG.trace("Looking for controller.xql in the filesystem, starting from: " + basePath);
String realPath = config.getServletContext().getRealPath(basePath);
File baseDir = new File(realPath);
if (!baseDir.isDirectory()) {
@@ -708,8 +832,8 @@
}
if (LOG.isTraceEnabled())
LOG.trace("Found controller file: " + controllerFile.getAbsolutePath());
- sourceInfo = new SourceInfo(new FileSource(controllerFile, "UTF-8", true));
String parentPath = controllerFile.getParentFile().getAbsolutePath();
+ sourceInfo = new SourceInfo(new FileSource(controllerFile, "UTF-8", true), parentPath);
sourceInfo.controllerPath =
parentPath.substring(baseDir.getAbsolutePath().length());
// replace windows path separators
@@ -733,7 +857,8 @@
!sourceDoc.getMetadata().getMimeType().equals("application/xquery"))
throw new ServletException("XQuery resource: " + query + " is not an XQuery or " +
"declares a wrong mime-type");
- sourceInfo = new SourceInfo(new DBSource(broker, (BinaryDocument) sourceDoc, true));
+ sourceInfo = new SourceInfo(new DBSource(broker, (BinaryDocument) sourceDoc, true),
+ locationUri.toString());
} catch (PermissionDeniedException e) {
throw new ServletException("permission denied to read module source from " + query);
} finally {
@@ -745,7 +870,8 @@
}
} else {
try {
- sourceInfo = new SourceInfo(SourceFactory.getSource(broker, moduleLoadPath, query, true));
+ sourceInfo = new SourceInfo(SourceFactory.getSource(broker, moduleLoadPath, query, true),
+ moduleLoadPath);
} catch (IOException e) {
throw new ServletException("IO error while reading XQuery source: " + query);
} catch (PermissionDeniedException e) {
@@ -796,7 +922,8 @@
private class ModelAndView {
URLRewrite rewrite = null;
- List views = new LinkedList();
+ List<URLRewrite> views = new LinkedList<URLRewrite>();
+ List<URLRewrite> errorHandlers = null;
boolean useCache = false;
private ModelAndView() {
@@ -810,6 +937,12 @@
return rewrite;
}
+ public void addErrorHandler(URLRewrite handler) {
+ if (errorHandler...
[truncated message content] |
|
From: <di...@us...> - 2011-07-31 09:42:20
|
Revision: 15011
http://exist.svn.sourceforge.net/exist/?rev=15011&view=rev
Author: dizzzz
Date: 2011-07-31 09:42:13 +0000 (Sun, 31 Jul 2011)
Log Message:
-----------
[ignore] small update for the examples installer
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/admin/setup.xqm
Modified: stable/eXist-1.4.x/webapp/admin/setup.xqm
===================================================================
--- stable/eXist-1.4.x/webapp/admin/setup.xqm 2011-07-30 23:00:18 UTC (rev 15010)
+++ stable/eXist-1.4.x/webapp/admin/setup.xqm 2011-07-31 09:42:13 UTC (rev 15011)
@@ -262,13 +262,13 @@
declare function setup:select() as element()
{
<form action="{session:encode-url(request:get-uri())}" method="post">
- <p>eXist ships with a number of XQuery examples. Some of these
- require certain documents to be stored in the database. The XQuery examples also use some
+ <p>eXist ships with a number of XQuery examples, which almost all
+ require certain documents to be stored in the database. Some XQuery examples require
XML data not included with the distribution which can be downloaded by selecting
the checkboxes below.</p>
<input type="checkbox" name="local" checked="true"/>
- eXist-db shipped files<br/>
+ eXist-db shipped files (*)<br/>
<input type="checkbox" name="xmlad"/>
<a href="http://sourceforge.net/projects/xmlad/">The XML Acronym Demystifier</a>
@@ -281,6 +281,8 @@
<p><input type="submit" name="action" value="Import Files"/>
<input type="submit" name="action" value="Skip"/></p>
<input type="hidden" name="panel" value="setup"/>
+ <P>(*) Contains data for the betterFORM, shakespeare, xinclude, library, mods and xproc examples.
+ It also contains the index configuration definitions for the mondial and acronym examples.</P>
</form>
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2011-07-30 23:00:24
|
Revision: 15010
http://exist.svn.sourceforge.net/exist/?rev=15010&view=rev
Author: ellefj
Date: 2011-07-30 23:00:18 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] disable legacy full text index by default for 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java
Modified: stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java 2011-07-30 22:32:09 UTC (rev 15009)
+++ stable/eXist-1.4.x/src/org/exist/storage/NativeBroker.java 2011-07-30 23:00:18 UTC (rev 15010)
@@ -1,6 +1,6 @@
/*
* eXist Open Source Native XML Database
- * Copyright (C) 2001-2007 The eXist team
+ * Copyright (C) 2001-2011 The eXist Project
* http://exist-db.org
*
* This program is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software Foundation
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * $Id$
+ * $Id$
*/
package org.exist.storage;
@@ -3350,7 +3350,7 @@
private int mode = MODE_STORE;
/** overall switch to activate fulltext indexation */
- private boolean fullTextIndex = true;
+ private boolean fullTextIndex = false;
NodeProcessor() {
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2011-07-30 22:32:16
|
Revision: 15009
http://exist.svn.sourceforge.net/exist/?rev=15009&view=rev
Author: ellefj
Date: 2011-07-30 22:32:09 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] roadmap review changes before 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/roadmap.xml
Property Changed:
----------------
stable/eXist-1.4.x/webapp/roadmap.xml
Modified: stable/eXist-1.4.x/webapp/roadmap.xml
===================================================================
--- stable/eXist-1.4.x/webapp/roadmap.xml 2011-07-30 22:18:03 UTC (rev 15008)
+++ stable/eXist-1.4.x/webapp/roadmap.xml 2011-07-30 22:32:09 UTC (rev 15009)
@@ -1,26 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
+<!-- $Id$ -->
<roadmap>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sidebar.xml"/>
- <title>eXist: Current State, Features and Roadmap</title>
+ <title>eXist-db: Current State, Features and Roadmap</title>
<comment>Due to size restrictions, longer remarks on some of the listed topics are available in
separate documents. This is indicated with a reference.</comment>
<module>
<name>Document Storage</name>
<part>
- <name>File size/complexity limits</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="2006" end="2007" isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p> The numbering scheme at the core of eXist 1.0 did limit the maximum size of a
- document to be stored within the database. In eXist releases 1.1 and later this
- is fixed.</p>
- </remark>
- </part>
- <part>
<name>Collection storage</name>
<status>Stable_redesign</status>
<priority>High</priority>
@@ -56,32 +43,6 @@
</remark>
</part>
<part>
- <name>DOM Redesign</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20080201T000000Z" end="20080226T000000Z" task="20" isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p>eXist currently uses 2 DOM (document object model) implementations: one for nodes
- stored in the db, and a different one for in-memory nodes constructed during an
- XQuery. The two models can not be mixed. To process an XQuery expression on an
- in-memory node, the query engine needs to create a temporary persistent copy.
- This costs performance and did cause stability issues in the past.</p>
-
- <p>To solve those problems, we are currently redesigning the in-memory DOM to
- implement the same interfaces as the persistent DOM. The query engine should be
- able to mix nodes of both models.</p>
-
- <p class="update">The current SVN trunk can directly evaluate XQuery expressions on
- the in-memory DOM, which solves all previous issues and contributes to the
- overall stability of the db. Refer to <a
- href="http://atomic.exist-db.org/blogs/eXist/InMemoryFragments">this
- article</a> for details.</p>
- </remark>
- </part>
- <part>
<name>Allow metadata to be associated with a document</name>
<status>Open</status>
<priority>Avg</priority>
@@ -114,22 +75,6 @@
</ul>
</remark>
<part>
- <name>Full text indexing</name>
- <status>Beta</status>
- <priority>Avg</priority>
- <test_coverage>Tested</test_coverage>
- <progress>75</progress>
- <event start="20070907T000000Z" end="20071112T000000Z" duration="149760"
- isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p class="update">As of Oct 2008, a <a
- href="http://atomic.exist-db.org/blogs/eXist/LuceneIndexModule">new full
- text index</a> is available. It is based on Lucene and eXist's new
- modularized indexing architecture.</p>
- </remark>
- </part>
- <part>
<name>XQuery and XPath Full Text 1.0</name>
<status>Open</status>
<priority>Avg</priority>
@@ -137,8 +82,7 @@
<progress>15</progress>
<who></who>
<remark>
- <p>Implement the W3C's full text extensions to XQuery, probably based on the new
- Lucene index module (see above). Many features could be easily implemented on
+ <p>Implement the W3C's full text extensions to XQuery. Many features could be easily implemented on
top of Lucene.</p>
<p>The grammar for the full text extensions has already been merged into the XQuery
@@ -147,67 +91,6 @@
</remark>
</part>
<part>
- <name>Range indexing</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Indexes on xml:id</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark>
- <p>Currently stored in the structural index. Should be moved to the range index.</p>
-
- <p class="update">As of version 1.2.4 and 1.3, xml:id values are stored in the range
- index.</p>
- </remark>
- </part>
- <part>
- <name>N-gram</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20070201T000000Z" end="20070614T000000Z" isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p>When dealing with texts in many non-European languages, the token-based full-text
- index produces insufficient results. Tokenization is currently based on Unicode
- code points. Most chinese characters, for example, are thus stored as single
- tokens. Users have to abuse the near() or phrase() function to search for
- character sequences consisting of more than one character, which is quite slow.
- It also means that real proximity searches are not available.</p>
- <p> An N-gram based index would be much more suitable for these languages. It would
- also allow additional functionality to be implemented, e.g. to deal with varying
- spellings. The main question is how the N-gram index would integrate
- conceptually with the existing full-text functions.</p>
- <p class="update">A N-gram index based on the new modularized indexing architecture
- is in SVN trunk as of July 2007 and in eXist 1.2 and later releases.</p>
- </remark>
- </part>
- <part>
- <name>Integration of other index types (e.g. Spatial indexes, external indexes)</name>
- <status>Beta</status>
- <priority>Avg</priority>
- <test_coverage>N/A</test_coverage>
- <progress>75</progress>
- <event start="20070201T000000Z" end="20070614T000000Z" isDuration="true"/>
- <who/>
- <remark>
- <p>eXist now offers spatial indexes in SVN trunk as of July 2007 and in version 1.2
- and later releases.</p>
- </remark>
- </part>
- <part>
<name>Index-support for order-by, distinct-values</name>
<status>Open</status>
<priority>Avg</priority>
@@ -249,26 +132,6 @@
high-priority.</p>
</remark>
<part>
- <name>Journal log</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Recovery</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>Tested</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
<name>Internal transaction management</name>
<status>Stable</status>
<priority>x</priority>
@@ -278,7 +141,7 @@
<who/>
<remark>
<p>Transactions are maintained internally, but they are not exposed to applications.
- eXist does not yet support full ACID transactions. Read-only operations bypass
+ eXist-db does not yet support full ACID transactions. Read-only operations bypass
the transaction system.</p>
</remark>
</part>
@@ -299,16 +162,6 @@
<module>
<name>Backup / Restore</name>
<part>
- <name>Backup / Restore Tool</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
<name>Store configuration into backup</name>
<status>Open</status>
<priority>x</priority>
@@ -321,24 +174,7 @@
page size, additional XQuery or index modules etc. are important. </p>
</remark>
</part>
- <part>
- <name>DB repair tool</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20080101T000000Z" end="20080124T000000Z" task="19" isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p>Create a DB repair tool which can handle and resolve inconsistencies in the
- database structure. It should be possible to recreate the db if at least
- dom.dbx, collections.dbx and symbols.dbx are more or less intact. If a single
- document is damaged, it could be filtered out.</p>
- <p>As of version 1.2.4, eXist provides a <a
- href="http://exist-db.org/backup.html#consistency">consistency check and
- repair</a> tool.</p>
- </remark>
- </part>
+
</module>
<module>
<name>Configuration</name>
@@ -403,102 +239,10 @@
<p>Since version 1.1, eXist supports the XACML standard for fine-grained access control
to stored XQueries, Java classes etc.</p>
</remark>
- <part>
- <name>User management</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Access control on resources and collections</name>
- <status>Stable_redesign</status>
- <priority>Avg</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark>
- <p>Need more dynamic ACL structures that can adapt to varying requirements.</p>
- </remark>
- </part>
- <part>
- <name>Access control on stored XQueries, XQuery functions and modules</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>incomplete</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Java binding </name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
</module>
<module>
<name>Schema Validation </name>
<part>
- <name>Validate document against schema when indexing</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Validate document after node-level updates</name>
- <status>Open</status>
- <priority>Avg</priority>
- <test_coverage>N/A</test_coverage>
- <progress>0</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Locate schema's and DTDs stored in database</name>
- <status>Beta</status>
- <priority>High</priority>
- <test_coverage>x</test_coverage>
- <progress>90</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Support for catalog files in database</name>
- <status>Beta</status>
- <priority>High</priority>
- <test_coverage>x</test_coverage>
- <progress>90</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Manual validation against schema</name>
- <status>Beta</status>
- <priority>High</priority>
- <test_coverage>Tested</test_coverage>
- <progress>75</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
<name>XQuery validation features</name>
<status>Open</status>
<priority>Avg</priority>
@@ -528,25 +272,15 @@
<who>dizzzz</who>
<remark/>
</part>
- <part>
- <name>Support for RelaxNG and Schematron</name>
- <status>Open</status>
- <priority>Low</priority>
- <test_coverage>No tests</test_coverage>
- <progress>0</progress>
- <event start="20080317T000000Z" end="20080409T000000Z" task="24" isDuration="true"/>
- <who>dizzzz</who>
- <remark/>
- </part>
</module>
<module>
<name>XQuery</name>
<remark>
<p>The XQuery engine as well as the standard function libraries should be updated to
- align with the XQuery 1.0 recommendation. Basically, almost all core language
+ align with the XQuery 3.0 recommendation. Basically, almost all XQuery 1.0 core language
features are implemented, excluding schema related features, which are currently
- beyond eXist's scope.</p>
- <p>XQuery support in eXist is covered by the official W3C XQuery Test Suite (XQTS) 1.02.
+ beyond eXist-db's scope.</p>
+ <p>XQuery support in eXist-db is covered by the official W3C XQuery Test Suite (XQTS) 1.02.
Implementing the official XQTS XQuery test suite was a top priority in order to
guarantee standard conformance and avoid future regressions.</p>
</remark>
@@ -612,47 +346,6 @@
</remark>
</part>
<part>
- <name>XQuery test suite – XQTS</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20070101T000000Z" end="20070730T000000Z" isDuration="true"/>
- <who/>
- </part>
- <part>
- <name>XQuery Optimizer</name>
- <status>Stable</status>
- <priority>High</priority>
- <test_coverage>tested</test_coverage>
- <progress>90</progress>
- <event start="20080515T000000Z" end="20080609T000000Z" task="23" isDuration="true"/>
- <who>wolf, perig</who>
- <remark>
- <p>With the 1.2 release, eXist features a new query-rewriting optimizer. It analyzes
- the query at compile time and searches for optimizable subexpressions within the
- query tree. If it finds an optimizable expression, the optimizer will modify the
- query and wrap some special instructions around the optimizable code block.
- Together with the new indexing features (see <a
- href="http://atomic.exist-db.org/wiki/blogs/eXist/NewIndexing">blog
- article</a>, the optimizer can achieve dramatic improvements.</p>
-
- <p>However, the optimizer is currently limited to predicate expressions. It does not
- optimize e.g. "where" clauses in a FLWOR statement. The query-rewriting should
- thus be extended to recognize other types of expressions beyond predicate
- statements. In short, we need a better static analysis of the query.</p>
-
- <p>Based on eXist's current indexes, it is also often difficult to decide if a
- certain optimization path leads to performance improvements or not. Better index
- statistics could help here. Also, there's a wide range of performance
- optimizations which could be applied if we had appropriate statistics on node
- distribution and frequency.</p>
-
- <p class="update">As of Oct 2008, the current trunk has a statistics module, but it
- is not yet used for real optimizations.</p>
- </remark>
- </part>
- <part>
<name>Error reporting</name>
<status>Stable_redesign</status>
<priority>Avg</priority>
@@ -664,73 +357,6 @@
<p>Error reports by the XQuery parser and compiler need to be improved.</p>
</remark>
</part>
- <part>
- <name>Make function calls tail-recursive</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>70</test_coverage>
- <progress>100</progress>
- <event start="20070501T000000Z" end="20070502T000000Z" isDuration="true"/>
- <who/>
- <remark>
- <p>Recursive functions may trigger a StackOverflowException. We need to handle
- tail-recursion.</p>
- <p class="update">No issues with recursive functions have been reported during the
- past year. The tail recursion handling is reliable.</p>
- </remark>
- </part>
- <part>
- <name>Better Try-Catch</name>
- <status>Stable</status>
- <priority>Low</priority>
- <test_coverage>0</test_coverage>
- <progress>0</progress>
- <who/>
- <remark>
- <p> eXist already provides a util:catch() function which basically corresponds to a
- Java try-catch. The XQuery 1.1 draft also defines try-catch, but more closely
- integrated with XQuery. It should not be too difficult to implement this in
- eXist. See <a
- href="http://www.zorba-xquery.com/doc/zorba-0.9.2/zorba/html/trycatch.html"
- >http://www.zorba-xquery.com/doc/zorba-0.9.2/zorba/html/trycatch.html</a>
- for some examples. </p>
- </remark>
- </part>
- <part>
- <name>XQuery Debugger</name>
- <status>Open</status>
- <priority>High</priority>
- <test_coverage>N/A</test_coverage>
- <progress>75</progress>
- <event start="20080315T000000Z" end="20080516T120000Z" duration="1440000" task="22"
- isDuration="true"/>
- <who>ljo, dmitriy</who>
- <remark>
- <p>Remote debugging protocol - <a href="http://www.xdebug.org">DBGp</a></p>
- <p>Command line debugger similar to jdb as prototype</p>
- <p>Decide which functionality to expose.</p>
- </remark>
- </part>
- <part>
- <name>Drop and deprecate xmldb:collection()</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>tested</test_coverage>
- <progress>100</progress>
- <event start="20070907T000000Z" end="20070910T000000Z" duration="57600" task="5"
- isDuration="true"/>
- <who>delirium</who>
- </part>
- <part>
- <name>Move fn:document() to xmldb:document() and deprecate</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>tested</test_coverage>
- <progress>100</progress>
- <event start="20070907T000000Z" end="20070910T000000Z" duration="57600" task="6"
- isDuration="true"/>
- <who>perig</who>
- </part>
</module>
<module>
<name>XInclude</name>
@@ -795,180 +421,11 @@
<event start="20071020T000000Z" end="2008" isDuration="true"/>
<who/>
</part>
- <part>
- <name>Cocoon Integration</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>No tests</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark>
- <p>General functionality tests required</p>
- </remark>
- </part>
- <part>
- <name>XQJ XQuery API for Java (JSR-225)</name>
- <status>Beta</status>
- <priority>Low</priority>
- <test_coverage>N/A</test_coverage>
- <progress>70</progress>
- <event start="20071126T000000Z" end="20080114T000000Z" task="17" isDuration="true"/>
- <who>allad, perig, ljo, dizzzz</who>
- <remark>
-
-
- <p>A nearly finished implementation of the XQuery API for Java (XQJ) is available in
- SVN. It was started as a Google Summer of Code project in 2007 and provides two
- XQJ drivers, one for embedded database access, one for remote access.</p>
-
- <p>I recently invested some time to bring the branch into sync with the current
- trunk. The remote database driver, which is based on the REST-style HTTP
- interface of eXist, should already be pretty usable. The embedded driver needs
- some redesign though (it breaks the test suite). However, it should not be too
- much work to fix this and finally merge it into trunk. Open Tasks:</p>
-
- <ul>
- <li>integrate the official XQJ test suite</li>
- <li>test for standard conformance</li>
- <li>fix the embedded database driver</li>
- <li>merge into trunk</li>
- <li>performance tests</li>
- </ul>
-
-
- </remark>
- </part>
- <part>
- <name>XForms filter</name>
- <status>Beta</status>
- <priority>Low</priority>
- <test_coverage>N/A</test_coverage>
- <progress>80</progress>
- <event start="20070907T000000Z" end="20071015T000000Z" task="8" isDuration="true"/>
- <who>delirium</who>
- <remark/>
- </part>
</module>
<module>
<name>Documentation</name>
<part>
- <name>XQuery stored modules</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark>
- <p>calling XQuery scripts stored in the DB; import stored modules into a query
- passed to the DB.</p>
- </remark>
- </part>
- <part>
- <name>WebDAV</name>
- <status>Beta</status>
- <priority>Avg</priority>
- <test_coverage>N/A</test_coverage>
- <progress>90</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Deployment</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20071020T000000Z" end="2008" isDuration="true"/>
- <who/>
- <remark>
- <p>Integration with a servlet engine, Cocoon, stand-alone server, embedded use.</p>
- </remark>
- </part>
- <part>
- <name>Index creation, index configuration and query rewriting</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20071001T000000Z" end="20071018T000000Z" task="10" isDuration="true"/>
- <who/>
- <remark/>
- </part>
- <part>
- <name>Validation</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20070907T000000Z" end="20070926T000000Z" task="4" isDuration="true"/>
- <who>dizzzz</who>
- <remark/>
- </part>
- <part>
- <name>Trigger</name>
- <status>Beta</status>
- <priority>Low</priority>
- <test_coverage>N/A</test_coverage>
- <progress>0</progress>
- <event start="20071210T000000Z" end="20071210T000000Z" task="9" duration="57600"
- isDuration="true"/>
- <who>delirium</who>
- <remark/>
- </part>
- <part>
- <name>Searchable Documentation</name>
- <status>Stable</status>
- <priority>x</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <who>wolf</who>
- <event start="20071020T000000Z" end="20071031T000000Z" isDuration="true"/>
- <remark>
- <p>The documentation that comes with eXist should be made searchable. I started
- working on a search interface which is based on eXist's own full text search
- features.</p>
-
- <p class="update">As of Oct. 2008, a <a href="http://demo.exist-db.org/search.xql"
- >search function</a> is provided. It requires features only available in SVN
- trunk though.</p>
- </remark>
- <who/>
- </part>
- <part>
- <name>XQDoc integration</name>
- <status>Alpha</status>
- <priority>High</priority>
- <test_coverage>Partially tested</test_coverage>
- <progress>60</progress>
- <event start="20071101T000000Z" end="20071126T000000Z" task="3" duration=""
- isDuration="true"/>
- <who>ljo, wolf</who>
- <remark>
- <p>Migrate the function documentation to XQDoc. Use XQDoc to better document all
- XQuery examples.</p>
- </remark>
- </part>
- </module>
- <module>
- <name>Releases</name>
- <part>
- <name>1.2</name>
- <status>Stable</status>
- <priority>High</priority>
- <test_coverage>N/A</test_coverage>
- <progress>99</progress>
- <event start="20071214T000000Z" end="20071214T000000Z" task="12" isDuration="false"/>
- <who/>
- <remark>
- <p>Imperative release with new features from 2006–2007 to replace version 1.0-line.
- The last release based on Java 1.4.</p>
- </remark>
- </part>
- <part>
- <name>1.4</name>
+ <name>1.5</name>
<status>Open</status>
<priority>Low</priority>
<test_coverage>N/A</test_coverage>
@@ -976,36 +433,14 @@
<event start="20080615T000000Z" end="20080615T000000Z" task="25" isDuration="false"/>
<who/>
<remark>
- <p>Based on Java 5.</p>
+ <p>Based on Java 6.</p>
</remark>
</part>
</module>
<module>
<name>Other Tasks</name>
<part>
- <name>Complete New Sandbox Application</name>
- <status>Beta</status>
- <priority>Avt</priority>
- <test_coverage>N/A</test_coverage>
- <progress>70%</progress>
- <event start="20071101T000000Z" end="20071122T000000Z" task="15" duration="460800"
- isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p> Some time ago we did a major rewrite of the sandbox application: <a
- href="http://demo.exist-db.org/sandbox2/sandbox.xql"
- >http://demo.exist-db.org/sandbox2/sandbox.xql</a> It is nearly usable, but
- the syntax-highlighting editor component is limited. In particular, it has no
- support for safari. Also, the sandbox still uses util:eval to execute the
- entered XQuery code. This works well for simple queries, but can have
- side-effects if the query imports external modules or tries to access the http
- context. For the purpose of the sandbox, it would be better to post the
- user-supplied query to a dedicated servlet, which executes the code and sends
- back a result. </p>
- </remark>
- </part>
- <part>
- <name>I18n</name>
+ <name>i18n</name>
<status>Open</status>
<priority>Low</priority>
<test_coverage>N/A</test_coverage>
@@ -1030,21 +465,6 @@
</remark>
</part>
<part>
- <name>Move to Java 5</name>
- <status>Open</status>
- <priority>Low</priority>
- <test_coverage>N/A</test_coverage>
- <progress>0</progress>
- <event start="20071215T000000Z" end="20071215T000000Z" isDuration="false"/>
- <who/>
- <remark>
- <p>Change build taget in switch for development branch 1.3 to Java 5 after eXist
- version 1.2 is released.</p>
- <p>This will make some more stuff easier. Especially since the jmx monitors and
- junit 4 tests are by requirements targeted for Java 5 already.</p>
- </remark>
- </part>
- <part>
<name>Move to ANTLR3 parser</name>
<status>Instable</status>
<priority>High</priority>
@@ -1059,21 +479,6 @@
<p>Maybe use gunit for testing?</p>
</remark>
</part>
- <part>
- <name>Move to AtomicWiki</name>
- <status>Stable</status>
- <priority>High</priority>
- <test_coverage>N/A</test_coverage>
- <progress>100</progress>
- <event start="20071101T000000Z" end="20071122T000000Z" task="15" duration="460800"
- isDuration="true"/>
- <who>wolf</who>
- <remark>
- <p>Change from the current spam-ridden and unmaintained wiki to our own Atom-based
- AtomicWiki.</p>
- </remark>
- </part>
-
</module>
<legend>
<title>Legend</title>
Property changes on: stable/eXist-1.4.x/webapp/roadmap.xml
___________________________________________________________________
Modified: svn:keywords
- Author Date Id Revision
+ Id Date Author Rev
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-07-30 22:18:09
|
Revision: 15008
http://exist.svn.sourceforge.net/exist/?rev=15008&view=rev
Author: dizzzz
Date: 2011-07-30 22:18:03 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] added link to URLrewriter example, to JSON / jquery-tree example
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/examples.xml
stable/eXist-1.4.x/webapp/urlrewrite/index.xml
stable/eXist-1.4.x/webapp/xquery/json/index.html
Modified: stable/eXist-1.4.x/webapp/examples.xml
===================================================================
--- stable/eXist-1.4.x/webapp/examples.xml 2011-07-30 22:14:36 UTC (rev 15007)
+++ stable/eXist-1.4.x/webapp/examples.xml 2011-07-30 22:18:03 UTC (rev 15008)
@@ -125,9 +125,10 @@
</tr>
<tr>
<td width="30%" valign="top">
- <link href="xquery/json-test.xql">Transform XML fragments to JSON</link>
+ <link href="xquery/json/">JSON Serialization Demo</link>
</td>
- <td width="70%">An XQuery does not necessarily need to return XML.</td>
+ <td width="70%">An jQuery dynatree example, the tree data is loaded via an AJAX call to an XQuery. This example shows
+ that an XQuery can return non-xml output (JSON) with a serialization option.</td>
</tr>
</table>
</section>
@@ -148,7 +149,7 @@
</tr>
<tr>
<td width="30%" valign="top">
- URL Rewriting
+ <link href="urlrewrite/">URL Rewriting</link>
</td>
<td width="70%">eXist's XQueryURLRewrite servlet filter calls a user-defined XQuery to
decide how a HTTP request is handled. The XML fragment returned by the
Modified: stable/eXist-1.4.x/webapp/urlrewrite/index.xml
===================================================================
--- stable/eXist-1.4.x/webapp/urlrewrite/index.xml 2011-07-30 22:14:36 UTC (rev 15007)
+++ stable/eXist-1.4.x/webapp/urlrewrite/index.xml 2011-07-30 22:18:03 UTC (rev 15008)
@@ -16,8 +16,7 @@
<ul>
<li><a href="protected.xml">Access control</a>: use URL rewriting to control access to a resource from the controller.xql.</li>
- <li><a href="jquery.xml">Declarative jQuery</a>: an XQuery module which parses an HTML template and generates
- jQuery/Javascript code.</li>
+ <li>Declarative jQuery: an XQuery module which parses an HTML template and generates jQuery/Javascript code. (trunk only)</li>
<li><a href="faulty.xql">Error handling</a>: redirect the user to a landing page if an XQuery error occurs.</li>
</ul>
</div>
Modified: stable/eXist-1.4.x/webapp/xquery/json/index.html
===================================================================
--- stable/eXist-1.4.x/webapp/xquery/json/index.html 2011-07-30 22:14:36 UTC (rev 15007)
+++ stable/eXist-1.4.x/webapp/xquery/json/index.html 2011-07-30 22:18:03 UTC (rev 15008)
@@ -1,10 +1,10 @@
<html>
<head>
<title>JSON Demo</title>
- <script type="text/javascript" src="libs/scripts/jquery/jquery-1.4.2.min.js"></script>
- <script type="text/javascript" src="libs/scripts/jquery/jquery-ui-1.8.custom.min.js"></script>
- <script type="text/javascript" src="libs/scripts/jquery/jquery.dynatree.min.js"></script>
- <link rel="stylesheet" type="text/css" href="libs/scripts/jquery/skin/ui.dynatree.css"/>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
+ <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.12/jquery-ui.min.js"></script>
+ <script type="text/javascript" src="http://www.exist-db.org/scripts/jquery/jquery.dynatree.min.js"></script>
+ <link rel="stylesheet" type="text/css" href="http://www.exist-db.org/scripts/jquery/skin/ui.dynatree.css"/>
<script type="text/javascript">
$(document).ready(function() {
$('#collection-tree').dynatree({
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2011-07-30 22:14:43
|
Revision: 15007
http://exist.svn.sourceforge.net/exist/?rev=15007&view=rev
Author: ellefj
Date: 2011-07-30 22:14:36 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] Updated lgpl-herader since the file had wrong year of creation and old header. It was added in 2009.
Modified Paths:
--------------
stable/eXist-1.4.x/src/org/exist/xquery/functions/util/Hash.java
Modified: stable/eXist-1.4.x/src/org/exist/xquery/functions/util/Hash.java
===================================================================
--- stable/eXist-1.4.x/src/org/exist/xquery/functions/util/Hash.java 2011-07-30 22:12:40 UTC (rev 15006)
+++ stable/eXist-1.4.x/src/org/exist/xquery/functions/util/Hash.java 2011-07-30 22:14:36 UTC (rev 15007)
@@ -1,23 +1,22 @@
/*
- * eXist Open Source Native XML Database
- * Copyright (C) 2001-09 Wolfgang M. Meier
- * wol...@ex...
- * http://exist.sourceforge.net
+ * eXist Open Source Native XML Database
+ * Copyright (C) 2009-2011 The eXist Project
+ * http://exist-db.org
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public License
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
* $Id$
*/
package org.exist.xquery.functions.util;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2011-07-30 22:12:48
|
Revision: 15006
http://exist.svn.sourceforge.net/exist/?rev=15006&view=rev
Author: ellefj
Date: 2011-07-30 22:12:40 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] xquery review changes before 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/xquery.xml
Modified: stable/eXist-1.4.x/webapp/xquery.xml
===================================================================
--- stable/eXist-1.4.x/webapp/xquery.xml 2011-07-30 21:50:33 UTC (rev 15005)
+++ stable/eXist-1.4.x/webapp/xquery.xml 2011-07-30 22:12:40 UTC (rev 15006)
@@ -5,15 +5,27 @@
<graphic fileref="logo.jpg"/>
<productname>Open Source Native XML Database</productname>
<title>XQuery Documentation</title>
- <date>November 2009</date>
+ <date>July 2011</date>
<orgname>The eXist Project</orgname>
+ <author>
+ <firstname>Wolfgang M.</firstname>
+ <surname>Meier</surname>
+ <affiliation>
+ <address format="linespecific"><email>wolfgang at exist-db.org</email></address>
+ </affiliation></author>
+ <author>
+ <firstname>Leif-Jöran</firstname>
+ <surname>Olsson</surname>
+ <affiliation>
+ <address format="linespecific"><email>ljo at exist-db.org</email></address>
+ </affiliation></author>
</bookinfo>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sidebar.xml"/>
<chapter>
<title>XQuery</title>
<section>
<title>Overview (Current Status of XQuery Support)</title>
- <para>eXist implements core XQuery syntax (with the exception of XML Schema-related
+ <para>eXist-db implements core XQuery syntax (with the exception of XML Schema-related
features) as specified in the <ulink url="http://www.w3.org/TR/xquery/">W3C
recommendation</ulink>. Functions in the standard function library should also
follow the <ulink url="http://www.w3.org/TR/xpath-functions/">"XQuery 1.0 and XPath
@@ -21,19 +33,19 @@
function library <ulink url="xquery/functions.xql">documentation</ulink>.</para>
<para>The XQuery implementation is tested against the official XQuery Test Suite (XQTS
version 1.0.2). This suite contains more than 14,000 tests. As of November 2007,
- eXist passes more than 99% of the test suite, but we are continuously trying to
+ eXist-db passes more than 99% of the test suite, but we are continuously trying to
improve these results. Current test results are reported on the <ulink
url="http://xqts.exist-db.org/">web site</ulink>. A good part of the remaining
failures is caused by smaller problems in the XQuery parser, computed constructors
- and the missing schema support in eXist.</para>
+ and the missing schema support in the eXist-db XQuery engine, though we do have schema support in an extension module.</para>
<note>
- <para>eXist implements ALL features described in the XQuery specification with the
+ <para>eXist-db implements ALL features described in the XQuery specification with the
EXCEPTION of the following unsupported features:</para>
<itemizedlist>
<listitem>
<para>Schema-related Features: <command>validate</command>, <command>import
schema</command>.</para>
- <para>eXist's XQuery processor does currently not support the schema import
+ <para>eXist-db's XQuery processor does currently not support the schema import
and schema validation features defined as optional in the XQuery
specification. The database does not store type information along with
the nodes. It therefore cannot know the typed value of a node and has to
@@ -44,16 +56,16 @@
supported, but the test <command>element(test-node,
xs:integer)</command> will result in a syntax error.</para>
<important>
- <para>To avoid misunderstandings: eXist does nevertheless support strong
+ <para>To avoid misunderstandings: eXist-db does nevertheless support strong
typing whenever the expected type of an expression, a function
argument or function return value is explicitely specified or can be
- known otherwise. Don't expect eXist to be laxist about type
+ known otherwise. Don't expect eXist-db to be laxist about type
checks!</para>
</important>
</listitem>
</itemizedlist>
</note>
- <para>In addition to the standard features, eXist provides extended support for
+ <para>In addition to the standard features, eXist-db provides extended support for
<emphasis>modules</emphasis> and implements the <emphasis>full axis</emphasis>
feature, which means you can use the <emphasis>optional axes</emphasis>: <command
>ancestor</command>, <command>ancestor-or-self</command>, <command
@@ -62,7 +74,7 @@
</section>
<section>
<title>Function Library</title>
- <para>A complete list of eXist-supported XQuery functions can be viewed on the <ulink
+ <para>A complete list of eXist-db-supported XQuery functions can be viewed on the <ulink
url="xquery/functions.xql">XQuery Function Documentation</ulink> page or the new
<ulink url="functions">XQuery Function Documentation Browser</ulink>. Each function description is taken directly from the signature
provided by the class implementing the <classname>Function</classname> interface.
@@ -70,9 +82,9 @@
</section>
<section>
<title>The Module System</title>
- <para>Using eXist, you can write entire web applications in XQuery. This may result in
+ <para>Using eXist-db, you can write entire web applications in XQuery. This may result in
rather complex XQuery scripts, consisting of several thousand lines of code. Being
- able to package related functions into modules is thus an important feature. eXist
+ able to package related functions into modules is thus an important feature. eXist-db
allows modules to be imported from a variety of sources:</para>
<itemizedlist>
<listitem>
@@ -111,7 +123,7 @@
the class path of the Module class:</para>
<synopsis language="xquery">import module namespace xdiff="http://exist-db.org/xquery/xmldiff"
at "java:org.exist.xquery.modules.xmldiff.XmlDiffModule";</synopsis>
- <para>The <filename>extensions/modules</filename> directory in the eXist distribution
+ <para>The <filename>extensions/modules</filename> directory in the eXist-db distribution
contains a number of useful modules, which could also serve as examples for
implementing your own.</para>
<section>
@@ -137,7 +149,7 @@
</section>
<section>
<title>Builtin Modules</title>
- <para>eXist comes with a set of utility modules, which are all implemented in Java.
+ <para>eXist-db comes with a set of utility modules, which are all implemented in Java.
You can also write your own modules as described <ulink url="#javamods"
>below</ulink>. Some of these utility modules are frequently used in
queries, so they are automatically imported into every query by default.</para>
@@ -159,7 +171,7 @@
</programlisting>
</example>
<para>You never need to specify a location when importing a preloaded module. The
- namespace of the module is already known and eXist knows how to load it. Also,
+ namespace of the module is already known and eXist-db knows how to load it. Also,
auto-loaded modules don't need to be explicitely imported into the main XQuery,
though you still need to import them if you want to use them from within another
XQuery module. </para>
@@ -172,7 +184,7 @@
expression will be added to an internal pool of prepared queries. The next time a
query or module is loaded from the same location, it will not be compiled again.
Instead, the already compiled code is reused. The code will only be recompiled if
- eXist decides that the source was modified or it wasn't used for a longer period of
+ eXist-db decides that the source was modified or it wasn't used for a longer period of
time.</para>
<para>If a query is accessed by more than one thread concurrently, each new thread will
create a new copy of the compiled query. The copies will be added to the query pool
@@ -180,8 +192,8 @@
<para>Modules are cached along with the main query that imported them.</para>
</section>
<section>
- <title>eXist Extension Functions</title>
- <para>eXist offers a number of additional functions and operators, which are discussed
+ <title>eXist-db Extension Functions</title>
+ <para>eXist-db offers a number of additional functions and operators, which are discussed
in some detail in the following subsections.</para>
<section>
<title>Specifying the Input Document Set</title>
@@ -193,8 +205,8 @@
>collection()</command> and <command>xmldb:xcollection()</command>. The
<command>collection()</command> and <command>doc()</command> functions are
standard XQuery/XPath functions; whereas, <command>xmldb:xcollection()</command>
- and <command>xmldb:document()</command> are eXist-specific extensions.</para>
- <para>Without an URI scheme, eXist interprets the arguments to <command
+ and <command>xmldb:document()</command> are eXist-db-specific extensions.</para>
+ <para>Without an URI scheme, eXist-db interprets the arguments to <command
>collection()</command> and <command>doc()</command> as absolute or relative
paths, leading to some collection or document within the database. For
example:</para>
@@ -289,7 +301,7 @@
let $isLoggedIn := xdb:login("xmldb:exist:///db", "admin, ""),
$out := xdb:create-collection("xmldb:exist:///db", "output")
for $rec in /rdf:RDF/* return
- xdb:store($out, concat(util:md5($rec/@rdf:about), ".xml"),
+ xdb:store($out, concat(util:hash($rec/@rdf:about, "MD5"), ".xml"),
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
{$rec}
</rdf:RDF>
@@ -313,7 +325,7 @@
<section>
<title>Utility Functions</title>
<para>The function namespace <uri>http://exist-db.org/xquery/util</uri> contains a
- number of common utility functions. The <command>util:md5</command> function,
+ number of common utility functions. The <command>util:hash</command> function,
used in the above example, is one such function. In this subsection, we discuss
a few of the important available utility functions. For a complete list, please
go to the <ulink url="functions/util">Built-in Functions</ulink>
@@ -406,7 +418,7 @@
</section>
<section>
<title>XSL Transformations</title>
- <para>eXist has a function for directly applying an XSL stylesheet to an XML
+ <para>eXist-db has a function for directly applying an XSL stylesheet to an XML
fragment within the XQuery script. This can be very convenient, for example, if
your application requirements are basic, and you do not want to install Cocoon
to run the XSLT.</para>
@@ -474,7 +486,7 @@
</section>
<section>
<title>HTTP-Related Functions</title>
- <para>eXist offers functions for handling HTTP request parameters and session
+ <para>eXist-db offers functions for handling HTTP request parameters and session
variables that use the <uri>http://exist-db.org/xquery/request</uri> namespace.
Functions in this namespace are only usable if the query is executed through the
XQueryGenerator or the XQueryServlet (for more information consult eXist's
@@ -519,7 +531,7 @@
</section>
<section id="javamods">
<title>Java Binding</title>
- <para>eXist supports calls to arbitrary Java methods from within XQuery. The binding
+ <para>eXist-db supports calls to arbitrary Java methods from within XQuery. The binding
mechanism follows the short-cut technique introduced by <ulink
url="http://saxon.sf.net"> Saxon</ulink> (a collection of tools for processing
XML documents). The class where the external function will be found is identified by
@@ -540,7 +552,7 @@
naming convention), and so, <code>to-string()</code> will call the Java method
<code>toString()</code>.</para>
<para>If more than one method in the class matches the given name and parameter count,
- eXist tries to select the method that best fits the passed parameter types at
+ eXist-db tries to select the method that best fits the passed parameter types at
runtime. The result of the method call can be assigned to an XQuery variable. If
possible, it will be mapped to the corresponding XML schema type. Otherwise, it's
type is the built-in type <option>object</option>.</para>
@@ -590,8 +602,8 @@
</section>
<section id="extension-modules">
<title>Creating XQuery Modules</title>
- <para>eXist supports XQuery-based library modules. These modules are simply collections
- of function definitions and global variable declarations, of which eXist knows two
+ <para>eXist-db supports XQuery-based library modules. These modules are simply collections
+ of function definitions and global variable declarations, of which eXist-db knows two
types: <emphasis>External Modules</emphasis>, which are themselves written in
XQuery, and <emphasis>Internal Modules</emphasis>, which are implemented in Java.
The standard XPath/XQuery functions and all extension functions described in the
@@ -602,7 +614,7 @@
XQuery context.</para>
<para>Users can also provide additional Java modules. With the current release, it is
relatively simple to add these modules, although the current API may change in the
- future. To register a module, eXist requires a namespace URI by which the module is
+ future. To register a module, eXist-db requires a namespace URI by which the module is
identified, and the list of functions it supplies. For this, you need only to pass a
driver class to the XQuery engine, and this class should implement the interface
<classname>org.exist.xpath.InternalModule</classname>.</para>
@@ -736,8 +748,8 @@
fashion. XQuery allows one to specify collations at several places by means of a
collation URI. For example, a collation can be specified in the <command>order
by</command> clause of a XQuery FLWOR expression, as well as any string-related
- functions. However, the concrete form of the URI is defined by the eXist
- implementation. Specifically, eXist recognizes the following URIs:</para>
+ functions. However, the concrete form of the URI is defined by the eXist-db
+ implementation. Specifically, eXist-db recognizes the following URIs:</para>
<orderedlist>
<listitem>
<synopsis>http://www.w3.org/2005/xpath-functions/collation/codepoint</synopsis>
@@ -771,7 +783,7 @@
<para>Which returns <option>true</option>. Note that if you use the default codepoint
collation instead, the comparison would evaluate to <option>false</option>.</para>
<note>
- <para>eXist's range index is currently only usable with the default codepoint
+ <para>eXist-db's range index is currently only usable with the default codepoint
collation. This means that comparisons using a different collation will not be
index-assisted and will thus be slow. We plan to support collation-aware indexes
in the 1.3 release.</para>
@@ -799,7 +811,7 @@
<methodname>XQueryService.setProperty()</methodname> methods in Java. These
methods are defined in <classname>javax.xml.transform.OutputKeys</classname> and
<ulink url="api/org/exist/storage/serializers/EXistOutputKeys.html"
- >EXistOutputKeys</ulink>. The latter eXist-specific options include the
+ >EXistOutputKeys</ulink>. The latter eXist-db-specific options include the
following:</para>
<variablelist>
<varlistentry>
@@ -829,7 +841,7 @@
</term>
<listitem>
<para>if a document is serialized and it has an XSL processing instruction,
- eXist can try to load the referenced stylesheet and apply it to the
+ eXist-db can try to load the referenced stylesheet and apply it to the
document.</para>
</listitem>
</varlistentry>
@@ -919,7 +931,7 @@
<para>For example, to disable XInclude expansion, and indent the output, you can use the
following syntax:</para>
<synopsis>declare option exist:serialize "expand-xincludes=no";</synopsis>
- <para>For the output method parameter, eXist currently recognizes three methods:
+ <para>For the output method parameter, eXist-db currently recognizes three methods:
<option>xml</option>, <option>xhtml</option> and <option>text</option>. Note
that unlike the xml method, the xhtml setting uses only the short form for elements
that are declared empty in the xhtml DTD. For example, the <option>br</option> tag
@@ -930,7 +942,7 @@
</section>
<section id="xqopts">
<title>Other Options</title>
- <para>To avoid that the server is blocked by a badly formulated query, eXist watches all
+ <para>To avoid that the server is blocked by a badly formulated query, eXist-db watches all
query threads. A blocking query can be killed if it takes longer than a specified
amount of time or consumes too many memory resources on the server. There are two
options to control this behaviour:</para>
@@ -956,13 +968,13 @@
<title>Pragmas</title>
<para>XQuery pragmas are a way to pass implementation-specific information to the query
engine from within a XQuery. The syntax for pragmas has changed between the
- different drafts of the XQuery specification. In earlier eXist releases, pragmas
+ different drafts of the XQuery specification. In earlier eXist-db releases, pragmas
were used similar to what is now the "declare option" prolog expression. The new
syntax is quite different: pragmas can now be wrapped around an arbitrary XQuery
expression (see the <ulink
url="http://www.w3.org/TR/xquery/#id-extension-expressions"
>specification</ulink>). </para>
- <para>Currently, eXist recognizes the following pragmas:</para>
+ <para>Currently, eXist-db recognizes the following pragmas:</para>
<section>
<title>exist:timer</title>
<para>Provides a simple way to measure the time for executing a given expression.
@@ -1007,7 +1019,7 @@
<synopsis>(# exist:force-index-use #) {
//group[. = "dba"]
}</synopsis>
- <para>Raises an error (currently <emphasis>XPDYxxxx</emphasis> since this kind of
+ <para>Raises an error (currently <emphasis>err:XPDYxxxx</emphasis> since this kind of
dynamic error is not yet defined by the XQuery specifications) if the general
comparison doesn't use a range or a QName index.</para>
</section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-07-30 21:50:40
|
Revision: 15005
http://exist.svn.sourceforge.net/exist/?rev=15005&view=rev
Author: wolfgang_m
Date: 2011-07-30 21:50:33 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[documentation] Added some notes about using zip for backups.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/backup.xml
Modified: stable/eXist-1.4.x/webapp/backup.xml
===================================================================
--- stable/eXist-1.4.x/webapp/backup.xml 2011-07-30 21:34:42 UTC (rev 15004)
+++ stable/eXist-1.4.x/webapp/backup.xml 2011-07-30 21:50:33 UTC (rev 15005)
@@ -60,6 +60,10 @@
from a server running an older version may sometimes lead to unexpected
problems.</para>
</note>
+ <important>
+ <para>Due to limitations of the ZIP format, please make sure the size of your zipped backup does
+ not exceed 4 gigabytes. All backup methods support backups to the file system as an alternative.</para>
+ </important>
</section>
<section>
<title>Backup Methods</title>
@@ -245,6 +249,7 @@
cron-trigger="0 0 0/12 * * ?">
<!-- the output directory. paths are relative to the data dir -->
<parameter name="output" value="export"/>
+ <parameter name="zip" value="yes"/>
<parameter name="backup" value="yes"/>
<parameter name="incremental" value="yes"/>
<parameter name="incremental-check" value="no"/>
@@ -277,6 +282,16 @@
</listitem>
</varlistentry>
<varlistentry>
+ <term>zip</term>
+ <listitem>
+ <para>If set to "yes", the backup will be written into a zip archive. For larger databases, please
+ make sure the generated archive is smaller than 4 gigabytes. Due to limitations of the zip format,
+ archives larger than 4 gigabytes may not be readable. In this case, use a backup to the file system
+ instead.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>incremental</term>
<listitem>
<para>Created backups will be incremental. Only resources which were
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <el...@us...> - 2011-07-30 21:34:48
|
Revision: 15004
http://exist.svn.sourceforge.net/exist/?rev=15004&view=rev
Author: ellefj
Date: 2011-07-30 21:34:42 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] indexing review changes before 1.4.1 release.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/indexing.xml
Modified: stable/eXist-1.4.x/webapp/indexing.xml
===================================================================
--- stable/eXist-1.4.x/webapp/indexing.xml 2011-07-30 21:29:09 UTC (rev 15003)
+++ stable/eXist-1.4.x/webapp/indexing.xml 2011-07-30 21:34:42 UTC (rev 15004)
@@ -5,21 +5,45 @@
<graphic fileref="logo.jpg"/>
<productname>Open Source Native XML Database</productname>
<title>Configuring Database Indexes</title>
- <date>November 2009</date>
+ <date>July 2011</date>
<orgname>The eXist Project</orgname>
+ <author>
+ <firstname>Wolfgang M.</firstname>
+ <surname>Meier</surname>
+ <affiliation>
+ <address format="linespecific"><email>wolfgang at exist-db.org</email></address>
+ </affiliation></author>
+ <author>
+ <firstname>Loren</firstname>
+ <surname>Cahlander</surname>
+ <affiliation>
+ <address format="linespecific">
+ <email>loren at syntactica.com</email>
+ </address>
+ </affiliation></author>
+ <author>
+ <firstname>Leif-Jöran</firstname>
+ <surname>Olsson</surname>
+ <affiliation>
+ <address format="linespecific"><email>ljo at exist-db.org</email></address>
+ </affiliation></author>
</bookinfo>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sidebar.xml"/>
<chapter>
<title>Configuring Database Indexes</title>
<section>
<title>Overview</title>
- <para>In this section, we discuss the types of database indexes used by eXist, as well
+ <para>In this section, we discuss the types of database indexes which might be used by eXist-db, as well
as how they are created, configured and maintained. It assumes readers have a basic
understanding of XML and XQuery.</para>
- <para>Database indexes are used extensively by eXist to facilitate efficient querying of
+ <para>Database indexes are, if defined, used extensively by eXist-db to facilitate efficient querying of
the database. This is accomplished both by system-generated and user-configured
- database indexes. The current version of eXist by default includes the following
- types of indexes:</para>
+ database indexes.</para>
+
+ <note><para>Please note that by default no indexes are defined. You therefore need to add index configurations to fit your needs.</para></note>
+
+ <para>In the current version of eXist-db the following
+ types of indexes are supported by default:</para>
<orderedlist>
<listitem>
<para>
@@ -38,17 +62,10 @@
<listitem>
<para>
<emphasis>
- <ulink url="ftlegacy.xml">Old Legacy Full Text Indexes</ulink>
- </emphasis>These map specific text nodes and attributes of the documents in
- a collection to text tokens.</para>
- </listitem>
- <listitem>
- <para>
- <emphasis>
- <ulink url="lucene.xml">New Full Text Indexes</ulink>
- </emphasis>(eXist 1.4): new full text indexing module. Features faster and
+ <ulink url="lucene.xml">Full Text Indexes</ulink>
+ </emphasis>With eXist-db 1.4 we got a new full text indexing module, which features faster and
customizable full text indexing by transparently integrating Lucene into the
- XQuery engine. Prefer this index over the old builtin implementation.
+ XQuery engine.
</para>
</listitem>
<listitem>
@@ -59,7 +76,7 @@
in a collection to splitted tokens of n-characters (where n = 3 by default).
Very efficient for exact substring searches and for queries on scripts
(mostly non-european ones) which can not be easily split into whitespace
- separated tokens and are thus a bad match for the full text index. </para>
+ separated tokens and are thus a bad match for the full text indexing. </para>
</listitem>
<listitem>
<para>
@@ -83,7 +100,7 @@
</section>
<section>
<title>Built-in Indexes</title>
- <para>This section describes the features of those indexes that are part of the eXist
+ <para>This section describes the features of those indexes that are part of the eXist-db
distribution. Some of those indexes (n-gram, spatial) may need to be enabled first
(see <ulink url="#moduleconf">below</ulink>). </para>
<section id="structuralidx">
@@ -228,12 +245,11 @@
<synopsis>//item[price = self]</synopsis>
</listitem>
</orderedlist>
- <para>Concerning range indexes on strings there's another restriction to be
- considered: up to version 1.3, range indexes on strings can only be used with
- the default unicode collation. Also, string indexes will always be case
+ <para>
+ One note on string indexes is that it will always be case
sensitive (while n-gram and full text indexes are not). It is not yet possible
to define a string index on a different collation (e.g. for German or French) or
- to make it case insensitve. This is a limitation we plan to address in the next
+ to make it case insensitve. This is a limitation we plan to address in the 1.6
release.</para>
</section>
<section id="spatialidx">
@@ -246,7 +262,7 @@
</section>
<section>
<title>Optional Index Modules</title>
- <para>eXist features a <emphasis>modularized indexing architecture</emphasis>, which
+ <para>eXist-db features a <emphasis>modularized indexing architecture</emphasis>, which
allows arbitrary indexes to be plugged into an indexing pipeline. Consequently, some
indexes were moved out of the database core and are now available as plugins. For
the DB core, those indexes are a black box: they handle their own creation,
@@ -269,11 +285,11 @@
</varlistentry>
<varlistentry>
<term>
- <ulink url="lucene.xml">New Full Text Index</ulink>
+ <ulink url="lucene.xml">Lucene Full Text Index Module</ulink>
</term>
<listitem>
<para>Faster, better configurable, more feature rich and reliable than
- eXist's old index.</para>
+ eXist-db's legacy full text index.</para>
</listitem>
</varlistentry>
<varlistentry>
@@ -281,7 +297,7 @@
<ulink url="ftlegacy.xml">Legacy Full Text Index</ulink>
</term>
<listitem>
- <para>Old full text index. Deprecated, though still supported for backwards
+ <para>Lagacy full text index. Deprecated, though still supported for backwards
compatibility.</para>
</listitem>
</varlistentry>
@@ -302,23 +318,27 @@
<section id="moduleconf">
<title>Enabling Index Modules</title>
<para>While a few indexes (n-gram, full text) are already pre-build in the standard
- eXist distribution, other modules may need to be enabled first. For example, the
+ eXist-db distribution, other modules may need to be enabled first. For example, the
spatial index depends on a bunch of external libraries, which do not ship with
- eXist. However, enabling the spatial index is a simple process:</para>
+ eXist-db. However, enabling the spatial index is a simple process if you installed the sourcecode:</para>
<procedure>
<step>
- <para>Copy the properties file <filename
- >extensions/indexes/build.properties</filename> and store it as
- <filename>local.properties</filename> in the same directory.</para>
+ <para>If you don't already have a file
+ <filename>EXIST_HOME/extensions/indexes/local.properties</filename> copy the properties file
+ <filename>EXIST_HOME/extensions/indexes/build.properties</filename> and store it as
+ <filename>EXIST_HOME/extensions/indexes/local.properties</filename>.</para>
</step>
<step>
- <para>Edit <filename>extensions/indexes/local.properties</filename>:</para>
+ <para>Edit <filename>EXIST_HOME/extensions/indexes/local.properties</filename>:</para>
<example>
<title>local.properties</title>
<programlisting>
# N-gram module
include.index.ngram = true
+# Lucene integration
+include.index.lucene = true
+
# Spatial module
include.index.spatial = false
</programlisting>
@@ -335,7 +355,7 @@
<para>The build process should create a jar file for every index implementation in
directory <filename>lib/extensions</filename>. For example, the spatial index is
packaged into the jar <filename>exist-spatial-module.jar</filename>.</para>
- <para>Once the index module has been built, it can be announced to eXist. To activate an
+ <para>Once the index module has been built, it can be announced to eXist-db. To activate an
index plugin, it needs to be added to the <sgmltag>modules</sgmltag> section within
the global configuration file <filename>conf.xml</filename>:</para>
<example>
@@ -344,11 +364,9 @@
<markup><![CDATA[<modules>
<module id="ngram-index" class="org.exist.indexing.ngram.NGramIndex"
file="ngram.dbx" n="3"/>
- <!-- The full text index is always required and should
- not be disabled. We still have some dependencies on
- this index in the database core. These will be removed
- once the redesign has been completed. -->
- <module id="ft-legacy-index" class="org.exist.fulltext.FTIndex"/>
+ <!-- The legacy full text index is fully disables from version 1.4.1.
+ -->
+ <!--module id="ft-legacy-index" class="org.exist.fulltext.FTIndex"/-->
</modules>]]></markup>
</programlisting>
</example>
@@ -365,7 +383,7 @@
</section>
<section id="idxconf">
<title>Configuring Indexes</title>
- <para>eXist has no "create index" command. Instead, indexes are configured in
+ <para>eXist-db has no "create index" command. Instead, indexes are configured in
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 like any other document (e.g. using the Admin interface or Java
@@ -377,8 +395,7 @@
by descendants in the hierarchy unless they have their own configuration (i.e. the
configuration settings for the child collection override those set for the parent).
If no collection-specific configuration file is created for any document, the global
- settings in the main configuration file, <filename>conf.xml</filename>, will apply
- by default. That being said, the <filename>conf.xml</filename> file should only
+ settings in the main configuration file, by default <filename>EXIST_HOME/conf.xml</filename>, will apply. That being said, the <filename>conf.xml</filename> file should only
define the default global <emphasis>index creation policy</emphasis>.</para>
<para> To configure a given collection - e.g. <filename>/db/foo</filename> - create a
file <filename>collection.xconf</filename> and store it as <filename
@@ -399,7 +416,7 @@
but it <emphasis>must</emphasis> have the <filename>.xconf</filename>
extension.</para>
<para>You can only have <emphasis>one</emphasis>
- <filename>.xconf</filename> file at each level.</para>
+ <filename>.xconf</filename> file in each database collection.</para>
</note>
<section>
<title>Maintaining Indexes and Re-indexing</title>
@@ -409,20 +426,20 @@
<tbody>
<tr>
<td>
- <para>The eXist index system automatically maintains and updates
- indexes defined by the user. You therefore do not need to
+ <para>The eXist-db index system automatically maintains and updates
+ indexes already defined by the user. You therefore do not need to
update an index when you update a database document or
- collection. eXist will even update indexes following partial
+ collection. eXist-db will even update indexes following partial
document updates via <emphasis>XUpdate</emphasis> or
<emphasis>XQuery Update</emphasis> expressions.</para>
- <para>The only exception to eXist's automatic update occurs when
+ <note><para>The only exception to eXist-db's automatic update occurs when
you <emphasis>add a new index definition to an existing
database collection</emphasis>. In this case, the new
index settings will <emphasis>only</emphasis> apply to new
data added to this collection, or any of its
sub-collections, and <emphasis>not</emphasis> to previously
- existing data. To apply the new settings to the entire
- collection, you need to trigger a "manual reindex" of the
+ existing data. </para></note> <para>To apply the new settings to an entire
+ collection hierarchy, you need to trigger a "manual reindex" of the
collection being updated. You can re-index collections using
the Java Admin Client (shown on the right). From the Admin
menu, select <guimenu>File</guimenu>»<guimenuitem
@@ -449,15 +466,16 @@
<programlisting><markup><![CDATA[
<collection xmlns="http://exist-db.org/collection-config/1.0">
<index>
- <!-- Old full text index configuration. Deprecated. -->
+ <!-- The legacy full text index should be disabled unless you have
+ really good reasons for enabling it. -->
<fulltext default="none" attributes="false">
- <!-- Full text indexes -->
+ <!-- Legacy full text indexes -->
<create qname="author"/>
<create qname="title" content="mixed"/>
<!-- "old" context-dependant configuration using the path attribute: -->
<include path="booktitle"/>
</fulltext>
- <!-- New full text index based on Lucene -->
+ <!-- Full text index based on Lucene -->
<lucene>
<text qname="SPEECH">
<ignore qname="SPEAKER"/>
@@ -501,10 +519,11 @@
<markup><![CDATA[
<collection xmlns="http://exist-db.org/collection-config/1.0">
<index xmlns:atom="http://www.w3.org/2005/Atom">
- <fulltext default="none" attributes="no">
- <create qname="atom:title"/>
- </fulltext>
- <create qname="atom:id" type="xs:string"/>
+ <lucene>
+ <analyzer class="org.apache.lucene.analysis.StandardAnalyzer"/>
+ <text qname="atom:title" />
+ </lucene>
+ <create qname="atom:id" type="xs:string"/>
</index>
</collection>
]]></markup>
@@ -515,7 +534,7 @@
<literal>atom</literal> namespace and we thus need to declare a mapping
for this namespace. Please note that the <option>xmlns</option> namespace
attributes have to be specified on the <sgmltag>index</sgmltag> element, not
- the <sgmltag>create</sgmltag> or <sgmltag>fulltext</sgmltag>
+ the <sgmltag>create</sgmltag> or <sgmltag>lucene</sgmltag>
elements.</para>
</section>
<section>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-07-30 21:29:15
|
Revision: 15003
http://exist.svn.sourceforge.net/exist/?rev=15003&view=rev
Author: wolfgang_m
Date: 2011-07-30 21:29:09 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[documentation] Incorrect index configuration for documentation search.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/admin/fundocs.xqm
Modified: stable/eXist-1.4.x/webapp/admin/fundocs.xqm
===================================================================
--- stable/eXist-1.4.x/webapp/admin/fundocs.xqm 2011-07-30 21:15:40 UTC (rev 15002)
+++ stable/eXist-1.4.x/webapp/admin/fundocs.xqm 2011-07-30 21:29:09 UTC (rev 15003)
@@ -25,12 +25,6 @@
</text>
<text qname="title" boost="2.0"/>
</lucene>
- <lucene>
- <analyzer class="org.apache.lucene.analysis.standard.StandardAnalyzer"/>
- <text qname="para"/>
- <text qname="title" boost="2.0"/>
- <ignore qname="title"/>
- </lucene>
<ngram qname="xqdoc:name"/>
<ngram qname="xqdoc:description"/>
</index>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <wol...@us...> - 2011-07-30 21:15:46
|
Revision: 15002
http://exist.svn.sourceforge.net/exist/?rev=15002&view=rev
Author: wolfgang_m
Date: 2011-07-30 21:15:40 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[documentation] Small addition to lucene documentation.
Modified Paths:
--------------
stable/eXist-1.4.x/webapp/lucene.xml
Modified: stable/eXist-1.4.x/webapp/lucene.xml
===================================================================
--- stable/eXist-1.4.x/webapp/lucene.xml 2011-07-30 21:01:49 UTC (rev 15001)
+++ stable/eXist-1.4.x/webapp/lucene.xml 2011-07-30 21:15:40 UTC (rev 15002)
@@ -592,5 +592,39 @@
</variablelist>
</section>
</section>
+ <section>
+ <title>Pitfalls</title>
+
+ <section>
+ <title>Indexing too much</title>
+
+ <para>While Lucene queries are usually very fast, creating a Lucene index needs considerable resources. You should thus
+ be careful when configuring a Lucene index on many different elements of a collection, in particular, if they are nested.</para>
+
+ <para>For example, a common mistake is to create an index on an element and all its descendants, using a path like
+ <option>/chapter//*</option>. This is usually unnecessary and will blow up the index. A simple index on
+ <option>/chapter</option> will already include the contents of all descendant nodes. If you would like to query
+ on a lower level, put your index on sections or paragraphs instead.</para>
+
+ <para>If you query on a high level element like chapter, but you would still like to figure out the immediate
+ context of a hit (e.g. the paragraph), you can always use the match elements eXist inserts in the matching text (when it gets serialized)
+ to locate the context of the match. In the following example, we query the <sgmltag>section</sgmltag> element, but
+ we would like to display only the paragraphs containing a match:</para>
+
+ <example>
+ <title>Filtering hits</title>
+ <programlisting language="xquery"><![CDATA[for $hit in //section[ft:query(., "lucene")]
+let $expanded := util:expand($hit)
+for $match in $expanded//exist:match
+return
+ $match/ancestor::para]]></programlisting>
+ </example>
+
+ <para>The KWIC module in eXist uses the same technique to display text matches in context. However, for best performance
+ only do this for matches you actually want to display to the user.</para>
+ </section>
+
+ </section>
+
</chapter>
</book>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-07-30 21:01:55
|
Revision: 15001
http://exist.svn.sourceforge.net/exist/?rev=15001&view=rev
Author: dizzzz
Date: 2011-07-30 21:01:49 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] prapering urlrewrite examples, copy from trunk
Added Paths:
-----------
stable/eXist-1.4.x/webapp/urlrewrite/
Property changes on: stable/eXist-1.4.x/webapp/urlrewrite
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/adam/eXist-acl/webapp/urlrewrite:14123-14668
/branches/jmfg/res64-eXist/webapp/urlrewrite:12887-13224
/trunk/eXist/nbproject/webapp/urlrewrite:8007-14504
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <di...@us...> - 2011-07-30 20:58:27
|
Revision: 15000
http://exist.svn.sourceforge.net/exist/?rev=15000&view=rev
Author: dizzzz
Date: 2011-07-30 20:58:21 +0000 (Sat, 30 Jul 2011)
Log Message:
-----------
[ignore] prapering json examples, copy from trunk
Added Paths:
-----------
stable/eXist-1.4.x/webapp/xquery/json/
Property changes on: stable/eXist-1.4.x/webapp/xquery/json
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/adam/eXist-acl/webapp/xquery/json:14123-14668
/branches/jmfg/res64-eXist/webapp/xquery/json:12887-13224
/trunk/eXist/nbproject/webapp/xquery/json:8007-14504
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|