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
(20) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
1
(11) |
|
2
(1) |
3
(2) |
4
(10) |
5
(18) |
6
(32) |
7
(5) |
8
(1) |
|
9
(3) |
10
|
11
|
12
(1) |
13
(3) |
14
|
15
|
|
16
(5) |
17
(14) |
18
|
19
(6) |
20
(3) |
21
(4) |
22
(3) |
|
23
(3) |
24
(3) |
25
(2) |
26
|
27
(4) |
28
(5) |
29
(7) |
|
30
(7) |
31
(8) |
|
|
|
|
|
|
From: <wol...@us...> - 2006-07-31 21:34:28
|
Revision: 3929 Author: wolfgang_m Date: 2006-07-31 14:34:15 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3929&view=rev Log Message: ----------- Removed forgotten log statement. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/FunNormalizeSpace.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunNormalizeSpace.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunNormalizeSpace.java 2006-07-31 21:27:52 UTC (rev 3928) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunNormalizeSpace.java 2006-07-31 21:34:15 UTC (rev 3929) @@ -78,8 +78,6 @@ if(contextItem != null) contextSequence = contextItem.toSequence(); - - LOG.debug("Context: " + contextSequence.getLength()); String value; if (getSignature().getArgumentCount() == 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-31 21:28:09
|
Revision: 3928 Author: wolfgang_m Date: 2006-07-31 14:27:52 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3928&view=rev Log Message: ----------- Fixed URI encoding problem: characters in the xpointer part have to be decoded before being passed to the XQuery engine. Modified Paths: -------------- trunk/eXist-1.0/tools/webtest/build.xml Added Paths: ----------- trunk/eXist-1.0/webapp/webtest/included.xml trunk/eXist-1.0/webapp/webtest/xinclude-test.html Modified: trunk/eXist-1.0/tools/webtest/build.xml =================================================================== --- trunk/eXist-1.0/tools/webtest/build.xml 2006-07-31 21:26:12 UTC (rev 3927) +++ trunk/eXist-1.0/tools/webtest/build.xml 2006-07-31 21:27:52 UTC (rev 3928) @@ -1,144 +1,161 @@ -<?xml version="1.0" encoding="UTF-8"?> -<project name="eXistTest" basedir="." default="all"> - - <property name="webtest.home" location="."/> - - <property name="server.home" location="../.."/> - <property name="test.webapp" location="${server.home}/webapp/webtest"/> - <property name="test.results" location="${server.home}/test/webtest"/> - <property name="test.results.html" location="${test.results}/html"/> - - <import file="${webtest.home}/classpath.xml"/> - - <available property="webtest.available" - file="webtestTaskdefs.properties" filepath="${webtest.home}"/> - - <target name="all" depends="prepare,modules,style"/> - - <target name="prepare" depends="start-jetty,clean,store,install-webtest"> - <fail unless="webtest.available">Failed to install webtest</fail> - <taskdef resource="webtest.taskdef" - loaderref="webtest.loader" - classpathref="classpath.webtest"/> - - <mkdir dir="${test.results}"/> - - <path id="classpath.webtest"> - <fileset dir="${webtest.home}/lib"> - <include name="*.jar"/> - </fileset> - <fileset dir="${server.home}/lib/core"> - <include name="*.jar"/> - </fileset> - <fileset dir="${server.home}"> - <include name="*.jar"/> - </fileset> - </path> - </target> - - <target name="modules"> - <webtest name="testModuleImports1"> - <config host="localhost" port="8080" - protocol="http" basepath="exist/webtest" - summary="true" resultpath="${test.results}" - /> - <steps> - <invoke description="XQueryServlet: import module from relative path" - url="test-modules1.xql"/> - <verifyElementText type="H1" text="PASS"/> - - <invoke description="XQueryServlet: import module from database" - url="test-modules2.xql"/> - <verifyElementText type="H1" text="PASS"/> - - <invoke description="XQueryGenerator: import module from database" - url="test-modules3.xq"/> - <verifyElementText type="H1" text="PASS"/> - - <invoke description="XQueryGenerator: import module from relative path" - url="test-modules4.xq"/> - <verifyElementText type="H1" text="PASS"/> - </steps> - </webtest> - - <webtest name="testModuleImports2"> - <config host="localhost" port="8080" protocol="http" - basepath="exist/rest/db/webtest" - summary="true" resultpath="${test.results}" - /> - <steps> - <invoke description="REST: import module from relative path" - url="test-modules1.xql"/> - <verifyElementText type="H1" text="PASS"/> - <invoke description="REST: import module from database" - url="test-modules2.xql"/> - <verifyElementText type="H1" text="PASS"/> - </steps> - </webtest> - </target> - - <target name="install-webtest" unless="webtest.available"> - <echo>Installing Canoo Webtest</echo> - <echo>-------------------------</echo> - <echo>Downloading webtest: this may take a few minutes ...</echo> - <get src="http://webtest.canoo.com/webtest/build.zip" - dest="${webtest.home}/build.zip" verbose="false"/> - <unzip src="${webtest.home}/build.zip" overwrite="true" - dest="${webtest.home}"/> - <delete file="${webtest.home}/build.zip"/> - <available property="webtest.available" - file="webtestTaskdefs.properties" filepath="${webtest.home}"/> - </target> - - <target name="store" xmlns:xdb="http://exist-db.org/ant"> - <echo>Storing required files into the database</echo> - <echo>---------------------------------------</echo> - - <xdb:store user="admin" password="" - uri="xmldb:exist://localhost:8080/exist/xmlrpc/db/webtest" createcollection="true" - initdb="true"> - <fileset dir="${test.webapp}"> - <include name="testmod.xq"/> - <include name="test-modules1.xql"/> - <include name="test-modules2.xql"/> - </fileset> - </xdb:store> - </target> - - <target name="style"> - <mkdir dir="${test.results.html}"/> - <tstamp> - <format property="now" pattern="dd.MM.yyyy HH:mm" locale="en"/> - </tstamp> - <style basedir="${test.results}" - destdir="${test.results.html}" - includes="results.xml" - extension=".html" - style="${webtest.home}/resources/WebTestReport.xsl" - > - <param name="reporttime" expression="${now}"/> - </style> - <copy todir="${test.results.html}" failonerror="false" overwrite="true"> - <fileset dir="${webtest.home}/resources"> - <include name="*.css"/> - <include name="*.js"/> - </fileset> - </copy> - </target> - - <target name="clean"> - <delete dir="${test.results}"/> - </target> - - <target name="start-jetty"> - <echo message="---------------------------------------"/> - <echo message="Starting Jetty server..."/> - <echo message="---------------------------------------"/> - <java classname="org.exist.start.Main"> - <sysproperty key="exist.home" value="${server.home}" /> - <classpath refid="classpath.jetty"/> - <arg value="jetty"/> - </java> - <echo>Server started.</echo> - </target> +<?xml version="1.0" encoding="UTF-8"?> +<project name="eXistTest" basedir="." default="all"> + + <property name="webtest.home" location="."/> + + <property name="server.home" location="../.."/> + <property name="test.webapp" location="${server.home}/webapp/webtest"/> + <property name="test.results" location="${server.home}/test/webtest"/> + <property name="test.results.html" location="${test.results}/html"/> + + <import file="${webtest.home}/classpath.xml"/> + + <available property="webtest.available" + file="webtestTaskdefs.properties" filepath="${webtest.home}"/> + + <target name="all" depends="prepare,modules,xinclude,style"/> + + <target name="prepare" depends="start-jetty,clean,store,install-webtest"> + <fail unless="webtest.available">Failed to install webtest</fail> + <taskdef resource="webtest.taskdef" + loaderref="webtest.loader" + classpathref="classpath.webtest"/> + + <mkdir dir="${test.results}"/> + + <path id="classpath.webtest"> + <fileset dir="${webtest.home}/lib"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/core"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}"> + <include name="*.jar"/> + </fileset> + </path> + </target> + + <target name="modules"> + <webtest name="testModuleImports1"> + <config host="localhost" port="8080" + protocol="http" basepath="exist/webtest" + summary="true" resultpath="${test.results}" + /> + <steps> + <invoke description="XQueryServlet: import module from relative path" + url="test-modules1.xql"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryServlet: import module from database" + url="test-modules2.xql"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryGenerator: import module from database" + url="test-modules3.xq"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryGenerator: import module from relative path" + url="test-modules4.xq"/> + <verifyElementText type="H1" text="PASS"/> + </steps> + </webtest> + + <webtest name="testModuleImports2"> + <config host="localhost" port="8080" protocol="http" + basepath="exist/rest/db/webtest" + summary="true" resultpath="${test.results}" + /> + <steps> + <invoke description="REST: import module from relative path" + url="test-modules1.xql"/> + <verifyElementText type="H1" text="PASS"/> + <invoke description="REST: import module from database" + url="test-modules2.xql"/> + <verifyElementText type="H1" text="PASS"/> + </steps> + </webtest> + </target> + + <target name="xinclude"> + <webtest name="testXInclude"> + <config host="localhost" port="8080" protocol="http" + basepath="exist/rest/db/webtest" + summary="true" resultpath="${test.results}" + /> + <steps> + <invoke description="XInclude: character encoding test" + url="xinclude-test.html"/> + <verifyTitle text="XInclude Test"/> + <verifyElementText htmlId="xpointer-simple" text="佛"/> + </steps> + </webtest> + </target> + + <target name="install-webtest" unless="webtest.available"> + <echo>Installing Canoo Webtest</echo> + <echo>-------------------------</echo> + <echo>Downloading webtest: this may take a few minutes ...</echo> + <get src="http://webtest.canoo.com/webtest/build.zip" + dest="${webtest.home}/build.zip" verbose="false"/> + <unzip src="${webtest.home}/build.zip" overwrite="true" + dest="${webtest.home}"/> + <delete file="${webtest.home}/build.zip"/> + <available property="webtest.available" + file="webtestTaskdefs.properties" filepath="${webtest.home}"/> + </target> + + <target name="store" xmlns:xdb="http://exist-db.org/ant"> + <echo>Storing required files into the database</echo> + <echo>---------------------------------------</echo> + + <xdb:store user="admin" password="" + uri="xmldb:exist://localhost:8080/exist/xmlrpc/db/webtest" createcollection="true" + initdb="true"> + <fileset dir="${test.webapp}"> + <include name="testmod.xq"/> + <include name="test-modules1.xql"/> + <include name="test-modules2.xql"/> + <include name="xinclude-test.html"/> + <include name="included.xml"/> + </fileset> + </xdb:store> + </target> + + <target name="style"> + <mkdir dir="${test.results.html}"/> + <tstamp> + <format property="now" pattern="dd.MM.yyyy HH:mm" locale="en"/> + </tstamp> + <style basedir="${test.results}" + destdir="${test.results.html}" + includes="results.xml" + extension=".html" + style="${webtest.home}/resources/WebTestReport.xsl" + > + <param name="reporttime" expression="${now}"/> + </style> + <copy todir="${test.results.html}" failonerror="false" overwrite="true"> + <fileset dir="${webtest.home}/resources"> + <include name="*.css"/> + <include name="*.js"/> + </fileset> + </copy> + </target> + + <target name="clean"> + <delete dir="${test.results}"/> + </target> + + <target name="start-jetty"> + <echo message="---------------------------------------"/> + <echo message="Starting Jetty server..."/> + <echo message="---------------------------------------"/> + <java classname="org.exist.start.Main"> + <sysproperty key="exist.home" value="${server.home}" /> + <classpath refid="classpath.jetty"/> + <arg value="jetty"/> + </java> + <echo>Server started.</echo> + </target> </project> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/included.xml =================================================================== --- trunk/eXist-1.0/webapp/webtest/included.xml (rev 0) +++ trunk/eXist-1.0/webapp/webtest/included.xml 2006-07-31 21:27:52 UTC (rev 3928) @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<test> + <node>佛</node> +</test> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/xinclude-test.html =================================================================== --- trunk/eXist-1.0/webapp/webtest/xinclude-test.html (rev 0) +++ trunk/eXist-1.0/webapp/webtest/xinclude-test.html 2006-07-31 21:27:52 UTC (rev 3928) @@ -0,0 +1,18 @@ +<?xml version="1.0" encoding="UTF-8"?> +<html xmlns:xi="http://www.w3.org/2001/XInclude"> + <head> + <title>XInclude Test</title> + </head> + <body> + <h1>Testing XPointer URI escaping</h1> + <div id="xpointer-simple"> + <xi:include href="/db/webtest#xpointer(//node[. &= '佛']/text())"/> + </div> + + <h1>XIncluding from external URL (fails)</h1> + + <!--div id="xinclude-external"> + <xi:include href="http://localhost:8080/exist/rest/db/webtest/included.xml"/> + </div--> + </body> +</html> \ 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: <wol...@us...> - 2006-07-31 21:26:19
|
Revision: 3927 Author: wolfgang_m Date: 2006-07-31 14:26:12 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3927&view=rev Log Message: ----------- Fixed URI encoding problem: characters in the xpointer part have to be decoded before being passed to the XQuery engine. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/storage/serializers/XIncludeFilter.java Modified: trunk/eXist-1.0/src/org/exist/storage/serializers/XIncludeFilter.java =================================================================== --- trunk/eXist-1.0/src/org/exist/storage/serializers/XIncludeFilter.java 2006-07-31 17:22:06 UTC (rev 3926) +++ trunk/eXist-1.0/src/org/exist/storage/serializers/XIncludeFilter.java 2006-07-31 21:26:12 UTC (rev 3927) @@ -215,7 +215,10 @@ //String docName = href; String xpointer = docUri.getFragment(); if(xpointer!=null) { - xpointer = XMLUtil.decodeAttrMarkup(xpointer); + try { + xpointer = XMLUtil.decodeAttrMarkup(URLDecoder.decode(xpointer, "UTF-8")); + } catch (UnsupportedEncodingException e) { + } } // extract possible parameters in the URI This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-31 17:22:23
|
Revision: 3926 Author: wolfgang_m Date: 2006-07-31 10:22:06 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3926&view=rev Log Message: ----------- Fixed: importing module from an xmldb URI fails on windows. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/XQueryContext.java Modified: trunk/eXist-1.0/src/org/exist/xquery/XQueryContext.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/XQueryContext.java 2006-07-31 15:27:52 UTC (rev 3925) +++ trunk/eXist-1.0/src/org/exist/xquery/XQueryContext.java 2006-07-31 17:22:06 UTC (rev 3926) @@ -1363,9 +1363,10 @@ // Is the module source stored in the database? try { XmldbURI locationUri = XmldbURI.xmldbUriFor(location); - XmldbURI moduleLoadPathUri = XmldbURI.xmldbUriFor(moduleLoadPath); - locationUri = moduleLoadPathUri.resolveCollectionPath(locationUri); - + if (moduleLoadPath.startsWith(XmldbURI.XMLDB_URI_PREFIX)) { + XmldbURI moduleLoadPathUri = XmldbURI.xmldbUriFor(moduleLoadPath); + locationUri = moduleLoadPathUri.resolveCollectionPath(locationUri); + } DocumentImpl sourceDoc = null; try { sourceDoc = broker.getXMLResource(locationUri.toCollectionPathURI(), Lock.READ_LOCK); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-31 15:28:06
|
Revision: 3925 Author: wolfgang_m Date: 2006-07-31 08:27:52 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3925&view=rev Log Message: ----------- Fixed a classpath problems. Modified Paths: -------------- trunk/eXist-1.0/tools/webtest/build.xml trunk/eXist-1.0/tools/webtest/classpath.xml Modified: trunk/eXist-1.0/tools/webtest/build.xml =================================================================== --- trunk/eXist-1.0/tools/webtest/build.xml 2006-07-31 14:26:08 UTC (rev 3924) +++ trunk/eXist-1.0/tools/webtest/build.xml 2006-07-31 15:27:52 UTC (rev 3925) @@ -22,6 +22,18 @@ classpathref="classpath.webtest"/> <mkdir dir="${test.results}"/> + + <path id="classpath.webtest"> + <fileset dir="${webtest.home}/lib"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/core"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}"> + <include name="*.jar"/> + </fileset> + </path> </target> <target name="modules"> Modified: trunk/eXist-1.0/tools/webtest/classpath.xml =================================================================== --- trunk/eXist-1.0/tools/webtest/classpath.xml 2006-07-31 14:26:08 UTC (rev 3924) +++ trunk/eXist-1.0/tools/webtest/classpath.xml 2006-07-31 15:27:52 UTC (rev 3925) @@ -1,18 +1,15 @@ <?xml version="1.0" encoding="UTF-8"?> -<project name="eXistTest" basedir="." default="all"> +<project name="webTestClasspath" basedir="." default="all"> - <path id="classpath.webtest"> - <fileset dir="${webtest.home}/lib"> + <path id="classpath.exist"> + <fileset dir="${server.home}/lib/core"> <include name="*.jar"/> </fileset> - <fileset dir="${server.home}/lib/core"> + <fileset dir="${server.home}"> <include name="*.jar"/> </fileset> - <fileset dir="${server.home}"> - <include name="*.jar"/> - </fileset> - </path> - + </path> + <path id="classpath.jetty"> <fileset dir="${server.home}/lib/core"> <include name="*.jar"/> @@ -35,6 +32,6 @@ </path> <typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant"> - <classpath refid="classpath.webtest"/> + <classpath refid="classpath.exist"/> </typedef> </project> \ 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: <wol...@us...> - 2006-07-31 14:26:17
|
Revision: 3924 Author: wolfgang_m Date: 2006-07-31 07:26:08 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3924&view=rev Log Message: ----------- Added some scripts for automated tests of eXist's web integration and HTTP based interfaces. Uses Canoo's WebTest for HTTP client support. Currently the test suite consists of 6 test cases to check module imports via REST/XQueryGenerator/XQueryServlet. Added Paths: ----------- trunk/eXist-1.0/webapp/webtest/ trunk/eXist-1.0/webapp/webtest/sitemap.xmap trunk/eXist-1.0/webapp/webtest/test-modules1.xql trunk/eXist-1.0/webapp/webtest/test-modules2.xql trunk/eXist-1.0/webapp/webtest/test-modules3.xq trunk/eXist-1.0/webapp/webtest/test-modules4.xq trunk/eXist-1.0/webapp/webtest/testmod.xq Added: trunk/eXist-1.0/webapp/webtest/sitemap.xmap =================================================================== --- trunk/eXist-1.0/webapp/webtest/sitemap.xmap (rev 0) +++ trunk/eXist-1.0/webapp/webtest/sitemap.xmap 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,34 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0"> + + <map:components> + <map:generators default="file"> + <map:generator name="xquery" logger="sitemap.generator.xquery" + src="org.exist.cocoon.XQueryGenerator"> </map:generator> + </map:generators> + <map:readers default="resource"/> + <map:serializers default="html"/> + <map:selectors default="browser"/> + <map:matchers default="wildcard"/> + <map:transformers default="xslt"> </map:transformers> + </map:components> + + <map:pipelines> + <map:pipeline> + + <map:match pattern="*.xq"> + <map:generate src="{1}.xq" type="xquery"> + <map:parameter name="file" value="{1}.xq"/> + </map:generate> + <map:serialize encoding="UTF-8" type="html"/> + </map:match> + + <map:match pattern="**.xqm"> + <map:read src="{1}.xqm" mime-type="text/text"/> + </map:match> + + </map:pipeline> + </map:pipelines> + +</map:sitemap> Added: trunk/eXist-1.0/webapp/webtest/test-modules1.xql =================================================================== --- trunk/eXist-1.0/webapp/webtest/test-modules1.xql (rev 0) +++ trunk/eXist-1.0/webapp/webtest/test-modules1.xql 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,17 @@ +xquery version "1.0"; + +declare option exist:serialize "method=xhtml"; + +import module namespace testmod="http://exist-db.org/xquery/testmod" +at "testmod.xq"; + +<html> + <head> + <title>XQueryServlet: import module from local directory</title> + </head> + <body> + {testmod:hello-world()} + + <p id="base-uri">{base-uri()}</p> + </body> +</html> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/test-modules2.xql =================================================================== --- trunk/eXist-1.0/webapp/webtest/test-modules2.xql (rev 0) +++ trunk/eXist-1.0/webapp/webtest/test-modules2.xql 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,17 @@ +xquery version "1.0"; + +declare option exist:serialize "method=xhtml"; + +import module namespace testmod="http://exist-db.org/xquery/testmod" +at "xmldb:exist:///db/webtest/testmod.xq"; + +<html> + <head> + <title>XQueryServlet: import module from database</title> + </head> + <body> + {testmod:hello-world()} + + <p id="base-uri">{base-uri()}</p> + </body> +</html> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/test-modules3.xq =================================================================== --- trunk/eXist-1.0/webapp/webtest/test-modules3.xq (rev 0) +++ trunk/eXist-1.0/webapp/webtest/test-modules3.xq 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,17 @@ +xquery version "1.0"; + +declare option exist:serialize "method=xhtml"; + +import module namespace testmod="http://exist-db.org/xquery/testmod" +at "xmldb:exist:///db/webtest/testmod.xq"; + +<html> + <head> + <title>XQueryGenerator: import module from database</title> + </head> + <body> + {testmod:hello-world()} + + <p id="base-uri">{base-uri()}</p> + </body> +</html> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/test-modules4.xq =================================================================== --- trunk/eXist-1.0/webapp/webtest/test-modules4.xq (rev 0) +++ trunk/eXist-1.0/webapp/webtest/test-modules4.xq 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,17 @@ +xquery version "1.0"; + +declare option exist:serialize "method=xhtml"; + +import module namespace testmod="http://exist-db.org/xquery/testmod" +at "testmod.xq"; + +<html> + <head> + <title>XQueryServlet: import module from database</title> + </head> + <body> + {testmod:hello-world()} + + <p id="base-uri">{base-uri()}</p> + </body> +</html> \ No newline at end of file Added: trunk/eXist-1.0/webapp/webtest/testmod.xq =================================================================== --- trunk/eXist-1.0/webapp/webtest/testmod.xq (rev 0) +++ trunk/eXist-1.0/webapp/webtest/testmod.xq 2006-07-31 14:26:08 UTC (rev 3924) @@ -0,0 +1,5 @@ +module namespace testmod="http://exist-db.org/xquery/testmod"; + +declare function testmod:hello-world() as element() { + <h1>PASS</h1> +}; \ 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: <wol...@us...> - 2006-07-31 14:25:24
|
Revision: 3923 Author: wolfgang_m Date: 2006-07-31 07:25:14 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3923&view=rev Log Message: ----------- Added some scripts for automated tests of eXist's web integration and HTTP based interfaces. Uses Canoo's WebTest for HTTP client support. Currently the test suite consists of 6 test cases to check module imports via REST/XQueryGenerator/XQueryServlet. Added Paths: ----------- trunk/eXist-1.0/tools/webtest/ trunk/eXist-1.0/tools/webtest/README.txt trunk/eXist-1.0/tools/webtest/build.xml trunk/eXist-1.0/tools/webtest/classpath.xml Added: trunk/eXist-1.0/tools/webtest/README.txt =================================================================== --- trunk/eXist-1.0/tools/webtest/README.txt (rev 0) +++ trunk/eXist-1.0/tools/webtest/README.txt 2006-07-31 14:25:14 UTC (rev 3923) @@ -0,0 +1,9 @@ +The Ant scripts in this directory are used for an automated test of eXist's web integration and +HTTP based interfaces. The Ant script requires Canoo's WebTest distribution. It will be downloaded +and installed when you run the script the first time. + +Usage: from the top-level directory of your eXist installation run: + +build.sh -f tools/webtest/build.xml + +The actual XQuery and XML files for the tests can be found in directory webapp/webtest. \ No newline at end of file Added: trunk/eXist-1.0/tools/webtest/build.xml =================================================================== --- trunk/eXist-1.0/tools/webtest/build.xml (rev 0) +++ trunk/eXist-1.0/tools/webtest/build.xml 2006-07-31 14:25:14 UTC (rev 3923) @@ -0,0 +1,132 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="eXistTest" basedir="." default="all"> + + <property name="webtest.home" location="."/> + + <property name="server.home" location="../.."/> + <property name="test.webapp" location="${server.home}/webapp/webtest"/> + <property name="test.results" location="${server.home}/test/webtest"/> + <property name="test.results.html" location="${test.results}/html"/> + + <import file="${webtest.home}/classpath.xml"/> + + <available property="webtest.available" + file="webtestTaskdefs.properties" filepath="${webtest.home}"/> + + <target name="all" depends="prepare,modules,style"/> + + <target name="prepare" depends="start-jetty,clean,store,install-webtest"> + <fail unless="webtest.available">Failed to install webtest</fail> + <taskdef resource="webtest.taskdef" + loaderref="webtest.loader" + classpathref="classpath.webtest"/> + + <mkdir dir="${test.results}"/> + </target> + + <target name="modules"> + <webtest name="testModuleImports1"> + <config host="localhost" port="8080" + protocol="http" basepath="exist/webtest" + summary="true" resultpath="${test.results}" + /> + <steps> + <invoke description="XQueryServlet: import module from relative path" + url="test-modules1.xql"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryServlet: import module from database" + url="test-modules2.xql"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryGenerator: import module from database" + url="test-modules3.xq"/> + <verifyElementText type="H1" text="PASS"/> + + <invoke description="XQueryGenerator: import module from relative path" + url="test-modules4.xq"/> + <verifyElementText type="H1" text="PASS"/> + </steps> + </webtest> + + <webtest name="testModuleImports2"> + <config host="localhost" port="8080" protocol="http" + basepath="exist/rest/db/webtest" + summary="true" resultpath="${test.results}" + /> + <steps> + <invoke description="REST: import module from relative path" + url="test-modules1.xql"/> + <verifyElementText type="H1" text="PASS"/> + <invoke description="REST: import module from database" + url="test-modules2.xql"/> + <verifyElementText type="H1" text="PASS"/> + </steps> + </webtest> + </target> + + <target name="install-webtest" unless="webtest.available"> + <echo>Installing Canoo Webtest</echo> + <echo>-------------------------</echo> + <echo>Downloading webtest: this may take a few minutes ...</echo> + <get src="http://webtest.canoo.com/webtest/build.zip" + dest="${webtest.home}/build.zip" verbose="false"/> + <unzip src="${webtest.home}/build.zip" overwrite="true" + dest="${webtest.home}"/> + <delete file="${webtest.home}/build.zip"/> + <available property="webtest.available" + file="webtestTaskdefs.properties" filepath="${webtest.home}"/> + </target> + + <target name="store" xmlns:xdb="http://exist-db.org/ant"> + <echo>Storing required files into the database</echo> + <echo>---------------------------------------</echo> + + <xdb:store user="admin" password="" + uri="xmldb:exist://localhost:8080/exist/xmlrpc/db/webtest" createcollection="true" + initdb="true"> + <fileset dir="${test.webapp}"> + <include name="testmod.xq"/> + <include name="test-modules1.xql"/> + <include name="test-modules2.xql"/> + </fileset> + </xdb:store> + </target> + + <target name="style"> + <mkdir dir="${test.results.html}"/> + <tstamp> + <format property="now" pattern="dd.MM.yyyy HH:mm" locale="en"/> + </tstamp> + <style basedir="${test.results}" + destdir="${test.results.html}" + includes="results.xml" + extension=".html" + style="${webtest.home}/resources/WebTestReport.xsl" + > + <param name="reporttime" expression="${now}"/> + </style> + <copy todir="${test.results.html}" failonerror="false" overwrite="true"> + <fileset dir="${webtest.home}/resources"> + <include name="*.css"/> + <include name="*.js"/> + </fileset> + </copy> + </target> + + <target name="clean"> + <delete dir="${test.results}"/> + </target> + + <target name="start-jetty"> + <echo message="---------------------------------------"/> + <echo message="Starting Jetty server..."/> + <echo message="---------------------------------------"/> + <java classname="org.exist.start.Main"> + <sysproperty key="exist.home" value="${server.home}" /> + <classpath refid="classpath.jetty"/> + <arg value="jetty"/> + </java> + <echo>Server started.</echo> + </target> +</project> \ No newline at end of file Added: trunk/eXist-1.0/tools/webtest/classpath.xml =================================================================== --- trunk/eXist-1.0/tools/webtest/classpath.xml (rev 0) +++ trunk/eXist-1.0/tools/webtest/classpath.xml 2006-07-31 14:25:14 UTC (rev 3923) @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project name="eXistTest" basedir="." default="all"> + + <path id="classpath.webtest"> + <fileset dir="${webtest.home}/lib"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/core"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}"> + <include name="*.jar"/> + </fileset> + </path> + + <path id="classpath.jetty"> + <fileset dir="${server.home}/lib/core"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/optional"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/cocoon"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/tools/jetty/lib"> + <include name="*.jar"/> + </fileset> + <fileset dir="${server.home}/lib/endorsed"> + <include name="*.jar"/> + </fileset> + </path> + + <typedef resource="org/exist/ant/antlib.xml" uri="http://exist-db.org/ant"> + <classpath refid="classpath.webtest"/> + </typedef> +</project> \ 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: <br...@us...> - 2006-07-31 14:01:35
|
Revision: 3922 Author: brihaye Date: 2006-07-31 07:01:23 -0700 (Mon, 31 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3922&view=rev Log Message: ----------- Refactored subSequence() to hopefully process nodeset more quickly (Thxs to Gev). No regression spotted so far.. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/FunSubSequence.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunSubSequence.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunSubSequence.java 2006-07-30 19:14:01 UTC (rev 3921) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunSubSequence.java 2006-07-31 14:01:23 UTC (rev 3922) @@ -35,6 +35,7 @@ import org.exist.xquery.value.DoubleValue; import org.exist.xquery.value.Item; import org.exist.xquery.value.Sequence; +import org.exist.xquery.value.SequenceIterator; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; import org.exist.xquery.value.ValueSequence; @@ -114,27 +115,31 @@ else --start; - if (start >= seq.getLength()) - result = Sequence.EMPTY_SEQUENCE; - else { - int length = -1; - if (getSignature().getArgumentCount() == 3) - length = ((DoubleValue) getArgument(2).eval( - contextSequence, contextItem) - .convertTo(Type.DOUBLE)).getInt(); - - if (length < 0 || length > seq.getLength() - start) - length = seq.getLength() - start; - - if (seq instanceof NodeSet) - result = new ExtArrayNodeSet(); - else - result = new ValueSequence(); - - for (int i = 0; i < length; i++) { - result.add(seq.itemAt(start + i)); - } + int length = Integer.MAX_VALUE; + if (getSignature().getArgumentCount() == 3) + length = ((DoubleValue) getArgument(2).eval( + contextSequence, contextItem) + .convertTo(Type.DOUBLE)).getInt(); + + Sequence tmp; + if (seq instanceof NodeSet) + tmp = new ExtArrayNodeSet(); + else + tmp = new ValueSequence(); + + Item item; + SequenceIterator iterator = seq.iterate(); + for(int i = 0; i < start; i++) { + item = iterator.nextItem(); + } + int i=0; + while (iterator.hasNext() && i < length) { + item = iterator.nextItem(); + tmp.add(item); + i++; } + + result = i>0?tmp:Sequence.EMPTY_SEQUENCE; } if (context.getProfiler().isEnabled()) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-30 19:14:10
|
Revision: 3921 Author: brihaye Date: 2006-07-30 12:14:01 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3921&view=rev Log Message: ----------- Added more tests for range indexes Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xmldb/test/CollectionConfigurationTest.java Modified: trunk/eXist-1.0/src/org/exist/xmldb/test/CollectionConfigurationTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xmldb/test/CollectionConfigurationTest.java 2006-07-30 13:29:41 UTC (rev 3920) +++ trunk/eXist-1.0/src/org/exist/xmldb/test/CollectionConfigurationTest.java 2006-07-30 19:14:01 UTC (rev 3921) @@ -45,7 +45,7 @@ + "<b>1</b>" + "</test>"; private final static String DOCUMENT_CONTENT2 = "<test>" + "<c>2002-12-07T12:20:46.275+01:00</c>" - + "<d>1</d>" + "<e>1</e>" + "<f>true</f>" + + "<d>1</d>" + "<e>1</e>" + "<f>true</f>" +" <g>1</g>" +"<h>1</h>" + "</test>"; @@ -64,6 +64,8 @@ + " <create path=\"//d\" type=\"xs:double\"/>" + " <create path=\"//e\" type=\"xs:float\"/>" + " <create path=\"//f\" type=\"xs:boolean\"/>" + + " <create path=\"//g\" type=\"xs:integer\"/>" + + " <create path=\"//h\" type=\"xs:string\"/>" + " </index>" + "</collection>"; @@ -451,7 +453,21 @@ result = service.query("util:index-type(/test/f)"); assertEquals("xs:boolean", result.getResource(0).getContent()); + + result = service.query("util:index-key-occurrences(/test/g, xs:integer(1))"); + assertEquals(1, result.getSize()); + assertEquals("1", result.getResource(0).getContent()); + result = service.query("util:index-type(/test/g)"); + assertEquals("xs:integer", result.getResource(0).getContent()); + + result = service.query("util:index-key-occurrences(/test/h, '1')"); + assertEquals(1, result.getSize()); + assertEquals("1", result.getResource(0).getContent()); + + result = service.query("util:index-type(/test/h)"); + assertEquals("xs:string", result.getResource(0).getContent()); + } catch(Exception e) { e.printStackTrace(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-30 13:29:48
|
Revision: 3920 Author: wolfgang_m Date: 2006-07-30 06:29:41 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3920&view=rev Log Message: ----------- Fixed: constructed element added to the output two times! See bug report by Jonas Lundberg. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/FunctionCall.java Modified: trunk/eXist-1.0/src/org/exist/xquery/FunctionCall.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/FunctionCall.java 2006-07-30 12:07:06 UTC (rev 3919) +++ trunk/eXist-1.0/src/org/exist/xquery/FunctionCall.java 2006-07-30 13:29:41 UTC (rev 3920) @@ -245,6 +245,7 @@ } protected Sequence execute() throws XPathException { + context.pushDocumentContext(); context.functionStart(functionDef.getSignature()); LocalVariable mark = context.markLocalVariables(true); try { @@ -260,6 +261,7 @@ } finally { context.popLocalVariables(mark); context.functionEnd(); + context.popDocumentContext(); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-30 12:07:14
|
Revision: 3919 Author: brihaye Date: 2006-07-30 05:07:06 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3919&view=rev Log Message: ----------- Cleaned code in general comparison Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-30 10:44:19 UTC (rev 3918) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-30 12:07:06 UTC (rev 3919) @@ -207,14 +207,10 @@ // && // Type.subTypeOf(getRight().returnsType(), Type.NODE)) { - if (context.getProfiler().isEnabled()) - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare"); result = quickNodeSetCompare(contextSequence); } else { - if (context.getProfiler().isEnabled()) - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "nodeSetCompare"); result = nodeSetCompare(contextSequence); } } @@ -222,9 +218,6 @@ //TODO : better design. Should a (buggy) null previous result be returned, we would evaluate this ! if(result == null) { - if (context.getProfiler().isEnabled()) - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, - "OPTIMIZATION CHOICE", "genericCompare"); result = genericCompare(contextSequence, contextItem); } @@ -244,6 +237,9 @@ * @throws XPathException */ protected Sequence genericCompare(Sequence contextSequence, Item contextItem) throws XPathException { + if (context.getProfiler().isEnabled()) + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, + "OPTIMIZATION CHOICE", "genericCompare"); Sequence ls = getLeft().eval(contextSequence, contextItem); Sequence rs = getRight().eval(contextSequence, contextItem); Collator collator = getCollator(contextSequence); @@ -282,6 +278,8 @@ } protected Sequence nodeSetCompare(NodeSet nodes, Sequence contextSequence) throws XPathException { + if (context.getProfiler().isEnabled()) + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "nodeSetCompare"); NodeSet result = new ExtArrayNodeSet(); Collator collator = getCollator(contextSequence); if(contextSequence != null && !contextSequence.isEmpty()) @@ -349,7 +347,10 @@ * - deliriumsky */ - // if the context sequence hasn't changed we can return a cached result + if (context.getProfiler().isEnabled()) + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION CHOICE", "quickNodeSetCompare"); + + // if the context sequence hasn't changed we can return a cached result if(cached != null && cached.isValid(contextSequence)) { if(context.getProfiler().isEnabled()) @@ -391,12 +392,13 @@ //Iterate through the right hand sequence for(SequenceIterator itRightSeq = rightSeq.iterate(); itRightSeq.hasNext();) { - //Get the index Key + //Get the index key Item key = itRightSeq.nextItem().atomize(); - //if key has truncation convert to string + //if key has truncation, convert it to string if(truncation != Constants.TRUNC_NONE) { + //TODO : log this conversion ? -pb //truncation is only possible on strings key = key.convertTo(Type.STRING); } @@ -411,6 +413,8 @@ } catch(XPathException xpe) { + //TODO : rethorw the exception ? -pb + //Could not convert the key to a suitable type for the index, fallback to nodeSetCompare() if(context.getProfiler().isEnabled()) { @@ -421,58 +425,57 @@ } } - // If key implements org.exist.storage.Indexable, we can use the index - if(key instanceof Indexable && Type.subTypeOf(key.getType(), indexType)) - { - if(truncation == Constants.TRUNC_NONE) - { - //key without truncation, find key - context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + - "' to find key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); - - NodeSet ns = context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key); - if(result == null) //if first iteration - { - result = ns; - } - else - { - result = result.union(ns); - } - } - else - { - //key with truncation, match key - context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + - "' to match key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); - try - { - NodeSet ns = context.getBroker().getValueIndex().match(docs, nodes, key.getStringValue().replace('%', '*'), DBBroker.MATCH_WILDCARDS); - if(result == null) //if first iteration - { + + if(key instanceof Indexable) { + // If key implements org.exist.storage.Indexable, we can use the index + if (Type.subTypeOf(key.getType(), indexType)) { + if(truncation == Constants.TRUNC_NONE) { + //key without truncation, find key + context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + + "' to find key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); + + NodeSet ns = context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key); + if (result == null) result = ns; - } else + result = result.union(ns); + } + else + { + //key with truncation, match key + context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + + "' to match key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); + try { - result = result.union(ns); + NodeSet ns = context.getBroker().getValueIndex().match(docs, nodes, key.getStringValue().replace('%', '*'), DBBroker.MATCH_WILDCARDS); + if (result == null) + result = ns; + else + result = result.union(ns); + } catch (EXistException e) { + throw new XPathException(getASTNode(), e.getMessage(), e); } } - catch (EXistException e) - { - throw new XPathException(getASTNode(), e.getMessage(), e); - } - } - } - else - { - //the datatype of our key does not - //implement org.exist.storage.Indexable or is not of the correct type + } else { + //the datatype of our key does not + //implement org.exist.storage.Indexable or is not of the correct type + if(context.getProfiler().isEnabled()) + { + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "Falling back to nodeSetCompare (key is of type: " + + Type.getTypeName(key.getType()) + ") whereas index is of type '" + Type.getTypeName(indexType) + "'"); + } + return(nodeSetCompare(nodes, contextSequence)); + } + } else { + //the datatype of our key does not implement org.exist.storage.Indexable if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "Falling back to nodeSetCompare (key is of type: " + Type.getTypeName(key.getType()) + ")"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "Falling back to nodeSetCompare (key is not an indexable type: " + + key.getClass().getName()); } return(nodeSetCompare(nodes, contextSequence)); - } + + } //removed by Pierrick Brihaye //REMOVED : a *general* comparison should not be dependant of the settings of a fulltext index This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-30 10:44:30
|
Revision: 3918 Author: brihaye Date: 2006-07-30 03:44:19 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3918&view=rev Log Message: ----------- Improved optimization messages in profiler Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/LocationStep.java trunk/eXist-1.0/src/org/exist/xquery/functions/FunMatches.java Modified: trunk/eXist-1.0/src/org/exist/xquery/LocationStep.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/LocationStep.java 2006-07-30 10:05:42 UTC (rev 3917) +++ trunk/eXist-1.0/src/org/exist/xquery/LocationStep.java 2006-07-30 10:44:19 UTC (rev 3918) @@ -324,7 +324,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); return index.findElementsByTagName(ElementValue.ELEMENT, docs, test .getName(), selector); } @@ -369,7 +369,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); // TODO : why a null selector here ? We have one below ! currentSet = index.findElementsByTagName( ElementValue.ATTRIBUTE, docs, test.getName(), null); @@ -406,7 +406,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); return index.getAttributesByName(docs, test.getName(), selector); } } @@ -427,7 +427,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -440,7 +440,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); DocumentSet docs = getDocumentSet(contextSet); NodeSelector selector = new ChildSelector(contextSet, contextId); return index.findElementsByTagName(ElementValue.ELEMENT, docs, test @@ -464,7 +464,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -500,7 +500,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); return index.findElementsByTagName(ElementValue.ELEMENT, docs, test .getName(), selector); } @@ -539,7 +539,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -581,7 +581,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -604,7 +604,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -668,7 +668,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -704,7 +704,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); return index.findElementsByTagName(ElementValue.ELEMENT, docs, test .getName(), selector); } @@ -729,7 +729,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); currentSet = index.findElementsByTagName(ElementValue.ELEMENT, docs, test.getName(), null); currentDocs = docs; @@ -743,7 +743,7 @@ if (context.getProfiler().isEnabled()) context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", - "using index '" + index.toString() + "'"); + "Using structural index '" + index.toString() + "'"); return index.findElementsByTagName(ElementValue.ELEMENT, docs, test .getName(), selector); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/FunMatches.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/FunMatches.java 2006-07-30 10:05:42 UTC (rev 3917) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/FunMatches.java 2006-07-30 10:44:19 UTC (rev 3918) @@ -239,7 +239,7 @@ NativeValueIndex index = context.getBroker().getValueIndex(); //TODO : check index' case compatibility with flags' one ? -pb if (context.isProfilingEnabled()) - context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "Using index " + index.toString(), "Regex: " + pattern); + context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "Using vlaue index '" + index.toString() + "'", "Regex: " + pattern); result = index.match(docs, nodes, pattern, DBBroker.MATCH_REGEXP, flags, caseSensitive); } catch (EXistException e) { throw new XPathException(getASTNode(), e.getMessage(), e); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-30 10:05:55
|
Revision: 3917 Author: wolfgang_m Date: 2006-07-30 03:05:42 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3917&view=rev Log Message: ----------- Clear buffered byte output stream if it grows too large during resource removal (it occupies too much memory if we have multiple threads). Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java Modified: branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java 2006-07-30 10:04:49 UTC (rev 3916) +++ branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java 2006-07-30 10:05:42 UTC (rev 3917) @@ -36,6 +36,10 @@ buf = null; } + public int size() { + return buf.length(); + } + public void flush() throws IOException { } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-30 10:05:02
|
Revision: 3916 Author: wolfgang_m Date: 2006-07-30 03:04:49 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3916&view=rev Log Message: ----------- Clear buffered byte output stream if it grows too large during resource removal (it occupies too much memory if we have multiple threads). Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/storage/NativeElementIndex.java Modified: branches/DLN/eXist-1.0/src/org/exist/storage/NativeElementIndex.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/storage/NativeElementIndex.java 2006-07-30 08:51:49 UTC (rev 3915) +++ branches/DLN/eXist-1.0/src/org/exist/storage/NativeElementIndex.java 2006-07-30 10:04:49 UTC (rev 3916) @@ -376,8 +376,8 @@ is.copyRaw(os, size); } else { // data are related to our document: - // skip them - changed = true; + // skip them + changed = true; is.skipBytes(size); } } @@ -404,6 +404,9 @@ } finally { lock.release(); } + if (os.size() > 512000) + // garbage collect the output stream if it is larger than 512k, otherwise reuse it + os = new VariableByteOutputStream(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-30 08:52:01
|
Revision: 3915 Author: brihaye Date: 2006-07-30 01:51:49 -0700 (Sun, 30 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3915&view=rev Log Message: ----------- Improved profiling messages in general comparisons Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-29 21:58:58 UTC (rev 3914) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-30 08:51:49 UTC (rev 3915) @@ -414,7 +414,7 @@ //Could not convert the key to a suitable type for the index, fallback to nodeSetCompare() if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "falling back to nodeSetCompare (" + xpe.getMessage() + ")"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "Falling back to nodeSetCompare (" + xpe.getMessage() + ")"); } return nodeSetCompare(nodes, contextSequence); @@ -427,30 +427,34 @@ if(truncation == Constants.TRUNC_NONE) { //key without truncation, find key - context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index to find key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); + context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + + "' to find key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); + NodeSet ns = context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key); if(result == null) //if first iteration { - result = context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key); + result = ns; } else { - result = result.union(context.getBroker().getValueIndex().find(relation, docs, nodes, (Indexable)key)); + result = result.union(ns); } } else { //key with truncation, match key - context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index to match key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); + context.getProfiler().message(this, Profiler.OPTIMIZATIONS, "OPTIMIZATION", "Using value index '" + context.getBroker().getValueIndex().toString() + + "' to match key '" + Type.getTypeName(key.getType()) + "(" + key.getStringValue() + ")'"); try - { + { + NodeSet ns = context.getBroker().getValueIndex().match(docs, nodes, key.getStringValue().replace('%', '*'), DBBroker.MATCH_WILDCARDS); if(result == null) //if first iteration { - result = context.getBroker().getValueIndex().match(docs, nodes, key.getStringValue().replace('%', '*'), DBBroker.MATCH_WILDCARDS); + result = ns; } else { - result = result.union(context.getBroker().getValueIndex().match(docs, nodes, key.getStringValue().replace('%', '*'), DBBroker.MATCH_WILDCARDS)); + result = result.union(ns); } } catch (EXistException e) @@ -465,7 +469,7 @@ //implement org.exist.storage.Indexable or is not of the correct type if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "falling back to nodeSetCompare (key is of type: " + Type.getTypeName(key.getType()) + ")"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "Falling back to nodeSetCompare (key is of type: " + Type.getTypeName(key.getType()) + ")"); } return(nodeSetCompare(nodes, contextSequence)); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 21:59:06
|
Revision: 3914 Author: wolfgang_m Date: 2006-07-29 14:58:58 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3914&view=rev Log Message: ----------- Speed up removal of resources from larger collections. Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java Modified: branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java 2006-07-29 21:57:45 UTC (rev 3913) +++ branches/DLN/eXist-1.0/src/org/exist/storage/io/VariableByteOutputStream.java 2006-07-29 21:58:58 UTC (rev 3914) @@ -15,7 +15,9 @@ public class VariableByteOutputStream extends OutputStream { protected FastByteBuffer buf; - + + private final byte[] temp = new byte[4]; + public VariableByteOutputStream() { super(); buf = new FastByteBuffer(9); @@ -80,18 +82,21 @@ } public void writeInt(int i) { + int count = 0; while ((i & ~0177) != 0) { - buf.append((byte) ((i & 0177) | 0200)); + temp[count++] = (byte) ((i & 0177) | 0200); i >>>= 7; } - buf.append((byte) i); + temp[count++] = (byte) i; + buf.append(temp, 0, count); } public void writeFixedInt(int i) { - buf.append((byte) ( ( i >>> 0 ) & 0xff )); - buf.append((byte) ( ( i >>> 8 ) & 0xff )); - buf.append((byte) ( ( i >>> 16 ) & 0xff )); - buf.append((byte) ( ( i >>> 24 ) & 0xff )); + temp[0] = (byte) ( ( i >>> 0 ) & 0xff ); + temp[1] = (byte) ( ( i >>> 8 ) & 0xff ); + temp[2] = (byte) ( ( i >>> 16 ) & 0xff ); + temp[3] = (byte) ( ( i >>> 24 ) & 0xff ); + buf.append(temp); } public void writeFixedInt(int position, int i) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 21:57:54
|
Revision: 3913 Author: wolfgang_m Date: 2006-07-29 14:57:45 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3913&view=rev Log Message: ----------- Speed up removal of resources from larger collections. Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java Modified: branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java 2006-07-29 21:13:52 UTC (rev 3912) +++ branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java 2006-07-29 21:57:45 UTC (rev 3913) @@ -2476,18 +2476,17 @@ } public void copyRaw(VariableByteOutputStream os, int count) throws IOException { - for(int i = 0; i < count; ) { + for (int i = count; i != 0; ) { if (offset == pageLen) advance(); int avail = pageLen - offset; - int remain = count - i; - if (remain >= avail) { + if (i >= avail) { os.write(nextPage.data, offset, avail); - i += avail; + i -= avail; offset = (short) pageLen; } else { - os.write(nextPage.data, offset, remain); - i = count; - offset += remain; + os.write(nextPage.data, offset, i); + offset += i; + break; } // os.writeByte(nextPage.data[offset++]); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 21:13:58
|
Revision: 3912 Author: wolfgang_m Date: 2006-07-29 14:13:52 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3912&view=rev Log Message: ----------- Speed up removal of resources from larger collections. Modified Paths: -------------- branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java Modified: branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java =================================================================== --- branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java 2006-07-29 20:26:28 UTC (rev 3911) +++ branches/DLN/eXist-1.0/src/org/exist/storage/index/BFile.java 2006-07-29 21:13:52 UTC (rev 3912) @@ -2476,9 +2476,20 @@ } public void copyRaw(VariableByteOutputStream os, int count) throws IOException { - for(long i = 0; i < count; i++) { + for(int i = 0; i < count; ) { if (offset == pageLen) advance(); - os.writeByte(nextPage.data[offset++]); + int avail = pageLen - offset; + int remain = count - i; + if (remain >= avail) { + os.write(nextPage.data, offset, avail); + i += avail; + offset = (short) pageLen; + } else { + os.write(nextPage.data, offset, remain); + i = count; + offset += remain; + } +// os.writeByte(nextPage.data[offset++]); } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-29 20:26:39
|
Revision: 3911 Author: brihaye Date: 2006-07-29 13:26:28 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3911&view=rev Log Message: ----------- Made GeneralComparison fallback messages more explicit. General design to be refactored though... Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java Modified: trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-29 18:14:34 UTC (rev 3910) +++ trunk/eXist-1.0/src/org/exist/xquery/GeneralComparison.java 2006-07-29 20:26:28 UTC (rev 3911) @@ -283,45 +283,41 @@ protected Sequence nodeSetCompare(NodeSet nodes, Sequence contextSequence) throws XPathException { NodeSet result = new ExtArrayNodeSet(); - NodeProxy current; - ContextItem c; - Sequence rs; - AtomicValue lv, rv; Collator collator = getCollator(contextSequence); - if(contextSequence != null && contextSequence != Sequence.EMPTY_SEQUENCE) + if(contextSequence != null && !contextSequence.isEmpty()) { for (Iterator i = nodes.iterator(); i.hasNext();) { - current = (NodeProxy) i.next(); - c = current.getContext(); - if(c == null) + NodeProxy current = (NodeProxy) i.next(); + ContextItem context = current.getContext(); + if (context == null) throw new XPathException(getASTNode(), "Internal error: context node missing"); - lv = current.atomize(); + AtomicValue lv = current.atomize(); //TODO : review to consider transverse context do { - rs = getRight().eval(c.getNode().toSequence()); + Sequence rs = getRight().eval(context.getNode().toSequence()); for (SequenceIterator si = rs.iterate(); si.hasNext();) { - rv = si.nextItem().atomize(); + AtomicValue rv = si.nextItem().atomize(); if (compareValues(collator, lv, rv)) { result.add(current); } } - }while ((c = c.getNextDirect()) != null); + }while ((context = context.getNextDirect()) != null); } } else { for (Iterator i = nodes.iterator(); i.hasNext();) { - current = (NodeProxy) i.next(); - lv = current.atomize(); - rs = getRight().eval(null); + NodeProxy current = (NodeProxy) i.next(); + AtomicValue lv = current.atomize(); + Sequence rs = getRight().eval(null); for (SequenceIterator si = rs.iterate(); si.hasNext();) { - rv = si.nextItem().atomize(); + AtomicValue rv = si.nextItem().atomize(); if (compareValues(collator, lv, rv)) { result.add(current); @@ -418,7 +414,7 @@ //Could not convert the key to a suitable type for the index, fallback to nodeSetCompare() if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "nodeSetCompare"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "falling back to nodeSetCompare (" + xpe.getMessage() + ")"); } return nodeSetCompare(nodes, contextSequence); @@ -469,7 +465,7 @@ //implement org.exist.storage.Indexable or is not of the correct type if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "nodeSetCompare"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "falling back to nodeSetCompare (key is of type: " + Type.getTypeName(key.getType()) + ")"); } return(nodeSetCompare(nodes, contextSequence)); } @@ -506,7 +502,7 @@ //no range index defined on the nodes in this sequence, so fallback to nodeSetCompare if(context.getProfiler().isEnabled()) { - context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "nodeSetCompare"); + context.getProfiler().message(this, Profiler.OPTIMIZATION_FLAGS, "OPTIMIZATION FALLBACK", "falling back to nodeSetCompare (no index available)"); } return(nodeSetCompare(nodes, contextSequence)); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 18:15:13
|
Revision: 3910 Author: wolfgang_m Date: 2006-07-29 11:14:34 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3910&view=rev Log Message: ----------- Added function signatures for deprecated request module functions. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetHostname.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetParameter.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerName.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerPort.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetURI.java trunk/eXist-1.0/src/org/exist/xquery/functions/request/RequestModule.java trunk/eXist-1.0/src/org/exist/xquery/functions/response/RedirectTo.java trunk/eXist-1.0/src/org/exist/xquery/functions/response/SetHeader.java trunk/eXist-1.0/src/org/exist/xquery/functions/response/StreamBinary.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/Create.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/EncodeURL.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttribute.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttributeNames.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetID.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/Invalidate.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetAttribute.java trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetCurrentUser.java trunk/eXist-1.0/src/org/exist/xquery/functions/system/GetVersion.java trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java trunk/eXist-1.0/src/org/exist/xquery/functions/util/UtilModule.java Modified: trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -79,6 +79,12 @@ setDeprecated(deprecated); } + public FunctionSignature(QName name, String description, SequenceType[] arguments, SequenceType returnType, + boolean overloaded, String deprecated) { + this(name, description, arguments, returnType, overloaded); + setDeprecated(deprecated); + } + /** * Create a new function signature. * Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -70,6 +70,17 @@ null, new SequenceType(Type.ITEM, Cardinality.ZERO_OR_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName( + "get-request-data", + RequestModule.NAMESPACE_URI, + RequestModule.PREFIX), + "Returns the content of a POST request as an XML document or a string representaion. Returns an empty sequence if there is no data.", + null, + new SequenceType(Type.ITEM, Cardinality.ZERO_OR_ONE), + "Renamed to get-data."); + public GetData(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetHostname.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetHostname.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetHostname.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -47,6 +47,14 @@ "Returns the hostname of the current request.", null, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("request-hostname", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns the hostname of the current request.", + null, + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + "Renamed to request:get-hostname."); /** * @param context Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetParameter.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetParameter.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetParameter.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -55,6 +55,22 @@ new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), new SequenceType(Type.ITEM, Cardinality.ZERO_OR_MORE)}, new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName( + "request-parameter", + RequestModule.NAMESPACE_URI, + RequestModule.PREFIX), + "Returns the HTTP request parameter identified by $a. If the parameter could not be found, " + + "the default value specified in $b is returned instead. Note: this function will not try to expand " + + "predefined entities like & or <, so a & passed through a parameter will indeed " + + "be treated as an & character.", + new SequenceType[] { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + new SequenceType(Type.ITEM, Cardinality.ZERO_OR_MORE)}, + new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE), + "Renamed to request:get-parameter."); public GetParameter(XQueryContext context) { super(context, signature); Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerName.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerName.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerName.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -47,6 +47,14 @@ "Returns the server nodename of the current request.", null, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("request-servername", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns the server nodename of the current request.", + null, + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + "Renamed to request:get-server-name."); /** * @param context Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerPort.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerPort.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetServerPort.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -48,6 +48,14 @@ null, new SequenceType(Type.INTEGER, Cardinality.EXACTLY_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("request-serverport", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns the server port of the current request.", + null, + new SequenceType(Type.INTEGER, Cardinality.EXACTLY_ONE), + "Renamed to request:get-server-port."); + /** * @param context * @param signature Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetURI.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetURI.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetURI.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -48,6 +48,14 @@ null, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("request-uri", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns the URI of the current request.", + null, + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + "Renamed to request:get-uri."); + /** * @param context * @param signature Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/RequestModule.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/RequestModule.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/RequestModule.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -26,6 +26,17 @@ import org.exist.xquery.AbstractInternalModule; import org.exist.xquery.FunctionDef; import org.exist.xquery.XPathException; +import org.exist.xquery.functions.response.RedirectTo; +import org.exist.xquery.functions.response.StreamBinary; +import org.exist.xquery.functions.session.Create; +import org.exist.xquery.functions.session.EncodeURL; +import org.exist.xquery.functions.session.GetAttribute; +import org.exist.xquery.functions.session.GetAttributeNames; +import org.exist.xquery.functions.session.GetID; +import org.exist.xquery.functions.session.Invalidate; +import org.exist.xquery.functions.session.SetAttribute; +import org.exist.xquery.functions.session.SetCurrentUser; +import org.exist.xquery.functions.util.FunUnEscapeURI; /** * @author Wolfgang Meier (wol...@ex...) @@ -51,7 +62,26 @@ new FunctionDef(GetURL.signature, GetURL.class), new FunctionDef(GetServerName.signature, GetServerName.class), new FunctionDef(GetServerPort.signature, GetServerPort.class), - new FunctionDef(GetHostname.signature, GetHostname.class) + new FunctionDef(GetHostname.signature, GetHostname.class), + + // deprecated functions: + new FunctionDef(Create.deprecated, Create.class), + new FunctionDef(EncodeURL.deprecated, EncodeURL.class), + new FunctionDef(GetData.deprecated, GetData.class), + new FunctionDef(GetAttribute.deprecated, GetAttribute.class), + new FunctionDef(GetID.deprecated, GetID.class), + new FunctionDef(Invalidate.deprecated, Invalidate.class), + new FunctionDef(RedirectTo.deprecated, RedirectTo.class), + new FunctionDef(GetHostname.deprecated, GetHostname.class), + new FunctionDef(GetParameter.deprecated, GetParameter.class), + new FunctionDef(GetServerName.deprecated, GetServerName.class), + new FunctionDef(GetServerPort.deprecated, GetServerPort.class), + new FunctionDef(GetURI.deprecated, GetURI.class), + new FunctionDef(GetAttributeNames.deprecated, GetAttributeNames.class), + new FunctionDef(SetCurrentUser.deprecated, SetCurrentUser.class), + new FunctionDef(SetAttribute.deprecated, SetAttribute.class), + new FunctionDef(StreamBinary.deprecated, StreamBinary.class), + new FunctionDef(FunUnEscapeURI.deprecated, FunUnEscapeURI.class) }; public RequestModule() throws XPathException { Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/response/RedirectTo.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/response/RedirectTo.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/response/RedirectTo.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -32,6 +32,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; @@ -49,6 +50,15 @@ "generator. Use a sitemap redirect instead.", new SequenceType[] { new SequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.ITEM, Cardinality.EMPTY)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("redirect-to", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Sends a HTTP redirect response (302) to the client. Note: this is not supported by the Cocooon " + + "generator. Use a sitemap redirect instead.", + new SequenceType[] { new SequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE) }, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + "Moved to 'response' module."); /** * @param context Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/response/SetHeader.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/response/SetHeader.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/response/SetHeader.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -32,6 +32,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Item; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; @@ -57,6 +58,17 @@ }, new SequenceType(Type.ITEM, Cardinality.EMPTY)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("set-response-header", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Set's a HTTP Header on the HTTP Response. $a is the header name, $b is the header value.", + new SequenceType[] { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + "Moved to response module and renamed to response:set-header."); + public SetHeader(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/response/StreamBinary.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/response/StreamBinary.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/response/StreamBinary.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -33,6 +33,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Base64Binary; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; @@ -56,6 +57,22 @@ true ); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("stream-binary", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Streams the binary data passed in $a to the current servlet response output stream. The ContentType " + + "HTTP header is set to the value given in $b. This function only works within a servlet context, not within " + + "Cocoon. Note: the servlet output stream will be closed afterwards and mime-type settings in the prolog " + + "will not be passed.", + new SequenceType[] { + new SequenceType(Type.BASE64_BINARY, Cardinality.ZERO_OR_ONE), + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + true, + "Renamed to response:stream-binary." + ); + public StreamBinary(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/Create.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/Create.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/Create.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -49,6 +49,15 @@ null, new SequenceType(Type.ITEM, Cardinality.EMPTY)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("create-session", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Initialize an HTTP session if not already present", + null, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + "Moved to the 'session' module. See session:create." + ); + /** * @param context * @param signature Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/EncodeURL.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/EncodeURL.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/EncodeURL.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -30,6 +30,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.functions.response.ResponseModule; import org.exist.xquery.value.AnyURIValue; import org.exist.xquery.value.JavaObjectValue; @@ -51,6 +52,16 @@ }, new SequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("encode-url", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Encodes the specified URL with the current HTTP session-id.", + new SequenceType[] { + new SequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.ANY_URI, Cardinality.EXACTLY_ONE), + "Moved to the 'session' module. See session:encode-url."); + public EncodeURL(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttribute.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttribute.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttribute.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -31,6 +31,7 @@ import org.exist.xquery.XPathException; import org.exist.xquery.XPathUtil; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Item; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; @@ -54,6 +55,17 @@ new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) }, new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("get-session-attribute", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns an attribute stored in the current session object or an empty sequence " + + "if the attribute cannot be found.", + new SequenceType[] { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE), + "Moved to 'session' module. Renamed to session:get-attribute"); public GetAttribute(XQueryContext context) { super(context, signature); Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttributeNames.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttributeNames.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetAttributeNames.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -32,6 +32,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; @@ -54,6 +55,18 @@ + "current HTTP session.", null, new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName( + "session-attributes", + RequestModule.NAMESPACE_URI, + RequestModule.PREFIX), + "Returns a sequence containing the names of all session attributes defined within the " + + "current HTTP session.", + null, + new SequenceType(Type.STRING, Cardinality.ZERO_OR_MORE), + "Moved to session module and renamed to session:get-attribute-names."); /** * @param context Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetID.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetID.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/GetID.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -30,6 +30,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Item; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; @@ -52,7 +53,15 @@ null, new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE) ); - + + public final static FunctionSignature deprecated = new FunctionSignature( + new QName("get-session-id", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns the ID of the current session or an empty sequence if there is no session.", + null, + new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE), + "Moved to session module and renamed to session:get-id." + ); + public GetID(XQueryContext context) { super(context, signature); Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/Invalidate.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/Invalidate.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/Invalidate.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -30,6 +30,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; @@ -48,6 +49,14 @@ null, new SequenceType(Type.ITEM, Cardinality.EMPTY)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("invalidate-session", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Invalidate (remove) the current HTTP session if present", + null, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + "Moved to 'session' module and renamed to session:invalidate"); + /** * @param context * @param signature Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetAttribute.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetAttribute.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetAttribute.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -32,6 +32,7 @@ import org.exist.xquery.Variable; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Item; import org.exist.xquery.value.JavaObjectValue; import org.exist.xquery.value.Sequence; @@ -53,6 +54,17 @@ }, new SequenceType(Type.ITEM, Cardinality.EMPTY)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("set-session-attribute", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Stores a value in the current session using the supplied attribute name.", + new SequenceType[] { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + new SequenceType(Type.ITEM, Cardinality.ZERO_OR_MORE) + }, + new SequenceType(Type.ITEM, Cardinality.EMPTY), + "Moved to session module and renamed to session:set-attribute."); + public SetAttribute(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetCurrentUser.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetCurrentUser.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/session/SetCurrentUser.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -57,6 +57,18 @@ }, new SequenceType(Type.BOOLEAN, Cardinality.ZERO_OR_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("set-current-user", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Change the user identity for the current HTTP session. Subsequent XQueries in the session will run with the " + + "new user identity.", + new SequenceType[] { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.BOOLEAN, Cardinality.ZERO_OR_ONE), + "Moved to session module. See session:set-current-user."); + public SetCurrentUser(XQueryContext context) { super(context, signature); } Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/system/GetVersion.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/system/GetVersion.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/system/GetVersion.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -31,6 +31,7 @@ import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.util.UtilModule; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.Type; @@ -50,6 +51,14 @@ "Returns the version of eXist running this query.", FunctionSignature.NO_ARGS, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); + + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("eXist-version", UtilModule.NAMESPACE_URI, UtilModule.PREFIX), + "Returns the version of eXist running this query.", + FunctionSignature.NO_ARGS, + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + "Moved to system module and renamed to system:get-version."); public GetVersion(XQueryContext context) { Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -30,6 +30,7 @@ import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; +import org.exist.xquery.functions.request.RequestModule; import org.exist.xquery.value.Sequence; import org.exist.xquery.value.SequenceType; import org.exist.xquery.value.StringValue; @@ -51,6 +52,18 @@ }, new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE)); + public final static FunctionSignature deprecated = + new FunctionSignature( + new QName("unescape-uri", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), + "Returns an un-escaped URL escaped string identified by $a with the encoding scheme indicated by the string $b (e.g. \"UTF-8\"). Decodes encoded sensitive characters from a URL, for example \"%2F\" becomes \"/\", i.e. does the oposite to escape-uri()", + new SequenceType[] + { + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE) + }, + new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE), + "Moved to the util module. See util:unescape-uri."); + /** * @param context * @param signature Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/util/UtilModule.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/util/UtilModule.java 2006-07-29 17:37:16 UTC (rev 3909) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/util/UtilModule.java 2006-07-29 18:14:34 UTC (rev 3910) @@ -26,6 +26,7 @@ import org.exist.xquery.AbstractInternalModule; import org.exist.xquery.FunctionDef; import org.exist.xquery.XPathException; +import org.exist.xquery.functions.system.GetVersion; /** * @author Wolfgang Meier (wol...@ex...) @@ -80,7 +81,10 @@ new FunctionDef(PrologFunctions.signatures[2], PrologFunctions.class), new FunctionDef(SystemTime.signature, SystemTime.class), new FunctionDef(RandomFunction.signature, RandomFunction.class), - new FunctionDef(FunUnEscapeURI.signature, FunUnEscapeURI.class) + new FunctionDef(FunUnEscapeURI.signature, FunUnEscapeURI.class), + + // deprecated functions + new FunctionDef(GetVersion.deprecated, GetVersion.class), }; public final static QName EXCEPTION_QNAME = This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 17:37:29
|
Revision: 3909 Author: wolfgang_m Date: 2006-07-29 10:37:16 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3909&view=rev Log Message: ----------- Added a possibility to mark functions as deprecated in the function signature. Modified Paths: -------------- trunk/eXist-1.0/webapp/xquery/styles/functions.css trunk/eXist-1.0/webapp/xquery/stylesheets/functions.xsl Modified: trunk/eXist-1.0/webapp/xquery/styles/functions.css =================================================================== --- trunk/eXist-1.0/webapp/xquery/styles/functions.css 2006-07-29 17:35:45 UTC (rev 3908) +++ trunk/eXist-1.0/webapp/xquery/styles/functions.css 2006-07-29 17:37:16 UTC (rev 3909) @@ -46,3 +46,9 @@ padding-right: 15px; line-height: inherit; } + +.deprecated { + padding: 0 15px; + line-height: inherit; + color: red; +} \ No newline at end of file Modified: trunk/eXist-1.0/webapp/xquery/stylesheets/functions.xsl =================================================================== --- trunk/eXist-1.0/webapp/xquery/stylesheets/functions.xsl 2006-07-29 17:35:45 UTC (rev 3908) +++ trunk/eXist-1.0/webapp/xquery/stylesheets/functions.xsl 2006-07-29 17:37:16 UTC (rev 3909) @@ -1,54 +1,68 @@ <?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exist="http://exist.sourceforge.net/NS/exist" version="1.0"> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exist="http://exist.sourceforge.net/NS/exist" version="1.0"> <xsl:template match="builtin-functions"> - <ul> - <xsl:for-each select="module"> - <li> - <a href="#{generate-id()}"> - <xsl:value-of select="description"/> - </a> - </li> - </xsl:for-each> - </ul> - <xsl:apply-templates/> + <ul> + <xsl:for-each select="module"> + <li> + <a href="#{generate-id()}"> + <xsl:value-of select="description"/> + </a> + </li> + </xsl:for-each> + </ul> + <xsl:apply-templates/> </xsl:template> - - <xsl:template match="module"> - <h2 class="modulename"> - <a> - <xsl:attribute name="name"><xsl:value-of select="generate-id()"/></xsl:attribute> + + <xsl:template match="module"> + <h2 class="modulename"> + <a> + <xsl:attribute name="name"> + <xsl:value-of select="generate-id()"/> + </xsl:attribute> </a> - <xsl:value-of select="description"/> - </h2> - <h3 class="moduleuri"><xsl:value-of select="@namespace"/></h3> - <xsl:apply-templates select="function"/> - </xsl:template> + <xsl:value-of select="description"/> + </h2> + <h3 class="moduleuri"> + <xsl:value-of select="@namespace"/> + </h3> + <xsl:apply-templates select="function"/> + </xsl:template> <xsl:template match="function"> - <div class="function"> - <h4 class="functionhead"> - <a name="{@name}"></a> + <div class="function"> + <h4 class="functionhead"> + <a name="{@name}"/> <xsl:value-of select="@name"/> - </h4> - <xsl:apply-templates/> - </div> - </xsl:template> - - <xsl:template match="prototype"> - <div class="prototype"> - <p class="signature"> - <xsl:value-of select="signature"/> - </p> - <xsl:apply-templates select="description"/> - </div> + </h4> + <xsl:apply-templates/> + </div> </xsl:template> - + + <xsl:template match="prototype"> + <div class="prototype"> + <p class="signature"> + <xsl:value-of select="signature"/> + </p> + <xsl:apply-templates select="description"/> + <xsl:apply-templates select="deprecated"/> + </div> + </xsl:template> + <xsl:template match="description"> - <p class="description"><xsl:apply-templates/></p> + <p class="description"> + <xsl:apply-templates/> + </p> </xsl:template> + <xsl:template match="deprecated"> + <p class="deprecated"> + <xsl:apply-templates/> + </p> + </xsl:template> + <xsl:template match="node()|@*" priority="-1"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <wol...@us...> - 2006-07-29 17:35:56
|
Revision: 3908 Author: wolfgang_m Date: 2006-07-29 10:35:45 -0700 (Sat, 29 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3908&view=rev Log Message: ----------- Added a possibility to mark functions as deprecated in the function signature. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java trunk/eXist-1.0/src/org/exist/xquery/functions/util/DescribeFunction.java Modified: trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java 2006-07-28 15:15:32 UTC (rev 3907) +++ trunk/eXist-1.0/src/org/exist/xquery/FunctionSignature.java 2006-07-29 17:35:45 UTC (rev 3908) @@ -54,6 +54,7 @@ private SequenceType returnType; private boolean isOverloaded = false; private String description = null; + private String deprecated = null; public FunctionSignature(QName name) { this(name, null, DEFAULT_TYPE, false); @@ -72,6 +73,12 @@ this(name, description, arguments, returnType, false); } + public FunctionSignature(QName name, String description, SequenceType[] arguments, SequenceType returnType, + String deprecated) { + this(name, description, arguments, returnType, false); + setDeprecated(deprecated); + } + /** * Create a new function signature. * @@ -127,6 +134,18 @@ return isOverloaded; } + public boolean isDeprecated() { + return deprecated != null; + } + + public String getDeprecated() { + return deprecated; + } + + public void setDeprecated(String message) { + deprecated = message; + } + public String toString() { StringBuffer buf = new StringBuffer(); buf.append(name.toString()); Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/util/DescribeFunction.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/util/DescribeFunction.java 2006-07-28 15:15:32 UTC (rev 3907) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/util/DescribeFunction.java 2006-07-29 17:35:45 UTC (rev 3908) @@ -114,6 +114,11 @@ builder.characters(signature.getDescription()); builder.endElement(); } + if (signature.getDeprecated() != null) { + builder.startElement("", "deprecated", "deprecated", attribs); + builder.characters(signature.getDeprecated()); + builder.endElement(); + } builder.endElement(); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-28 22:00:22
|
Revision: 3901 Author: brihaye Date: 2006-07-26 22:55:54 -0700 (Wed, 26 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3901&view=rev Log Message: ----------- An untested fix to make unescape-uri() available again. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java 2006-07-25 20:58:24 UTC (rev 3900) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/util/FunUnEscapeURI.java 2006-07-27 05:55:54 UTC (rev 3901) @@ -27,7 +27,6 @@ import org.exist.dom.QName; import org.exist.xquery.BasicFunction; import org.exist.xquery.Cardinality; -import org.exist.xquery.Function; import org.exist.xquery.FunctionSignature; import org.exist.xquery.XPathException; import org.exist.xquery.XQueryContext; @@ -43,7 +42,7 @@ public final static FunctionSignature signature = new FunctionSignature( - new QName("unescape-uri", Function.BUILTIN_FUNCTION_NS), + new QName("unescape-uri", UtilModule.NAMESPACE_URI, UtilModule.PREFIX), "Returns an un-escaped URL escaped string identified by $a with the encoding scheme indicated by the string $b (e.g. \"UTF-8\"). Decodes encoded sensitive characters from a URL, for example \"%2F\" becomes \"/\", i.e. does the oposite to escape-uri()", new SequenceType[] { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <del...@us...> - 2006-07-28 21:33:40
|
Revision: 3907 Author: deliriumsky Date: 2006-07-28 08:15:32 -0700 (Fri, 28 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3907&view=rev Log Message: ----------- Small fix for when there is no POST data Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java Modified: trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java 2006-07-28 10:31:26 UTC (rev 3906) +++ trunk/eXist-1.0/src/org/exist/xquery/functions/request/GetData.java 2006-07-28 15:15:32 UTC (rev 3907) @@ -66,7 +66,7 @@ "get-data", RequestModule.NAMESPACE_URI, RequestModule.PREFIX), - "Returns the content of a POST request as an XML document or a string representaion", + "Returns the content of a POST request as an XML document or a string representaion. Returns an empty sequence if there is no data.", null, new SequenceType(Type.ITEM, Cardinality.ZERO_OR_ONE)); @@ -93,6 +93,12 @@ { RequestWrapper request = (RequestWrapper)value.getObject(); + //if the content length is unknown, return + if(request.getContentLength() == -1) + { + return Sequence.EMPTY_SEQUENCE; + } + //first, get the content of the request byte[] bufRequestData = null; try This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
|
From: <br...@us...> - 2006-07-28 19:39:16
|
Revision: 3904 Author: brihaye Date: 2006-07-28 00:27:31 -0700 (Fri, 28 Jul 2006) ViewCVS: http://svn.sourceforge.net/exist/?rev=3904&view=rev Log Message: ----------- Added a test case for functions in the last step of path expressions. Modified Paths: -------------- trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java Modified: trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java =================================================================== --- trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java 2006-07-27 18:21:56 UTC (rev 3903) +++ trunk/eXist-1.0/src/org/exist/xquery/test/XPathQueryTest.java 2006-07-28 07:27:31 UTC (rev 3904) @@ -706,7 +706,15 @@ result = service.queryResource("numbers.xml", query); assertEquals("XPath: " + query, 2, result.getSize()); + + query = "let $test := <test><a> a </a><a>a</a></test>" + + "return distinct-values($test/a/normalize-space(.))"; + result = service.queryResource("numbers.xml", query); + assertEquals("XPath: " + query, 1, result.getSize()); + resource = (XMLResource)result.getResource(0); + assertEquals("XPath: " + query, "a", resource.getContent().toString()); + // TODO: clarify // query = "let $a := ('a', 'b', 'c') for $b in $a[position()] return <blah>{$b}</blah>"; // result = service.queryResource("numbers.xml", query); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |