You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by ch...@apache.org on 2005/11/22 03:26:32 UTC

svn commit: r348067 - in /lenya/trunk/src: java/org/apache/lenya/cms/editors/ java/org/apache/lenya/cms/editors/forms/ modules/lucene/config/ modules/lucene/usecases/ modules/lucene/usecases/lucene/ modules/lucene/xslt/ webapp/lenya/pubs/default/java/s...

Author: chestnut
Date: Mon Nov 21 18:26:16 2005
New Revision: 348067

URL: http://svn.apache.org/viewcvs?rev=348067&view=rev
Log:
clean up, moved lucene specific files into the lucene module directory

Added:
    lenya/trunk/src/modules/lucene/usecases/
    lenya/trunk/src/modules/lucene/usecases/lucene/
    lenya/trunk/src/modules/lucene/usecases/lucene/delete.jx
    lenya/trunk/src/modules/lucene/usecases/lucene/externalOpensearch.jx
    lenya/trunk/src/modules/lucene/usecases/lucene/index.jx
    lenya/trunk/src/modules/lucene/usecases/lucene/opensearch.jx
    lenya/trunk/src/modules/lucene/usecases/lucene/search.jx
    lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap   (with props)
    lenya/trunk/src/modules/lucene/xslt/
    lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl   (with props)
    lenya/trunk/src/modules/lucene/xslt/links2index.xsl   (with props)
    lenya/trunk/src/modules/lucene/xslt/opensearch.xml   (with props)
    lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl   (with props)
    lenya/trunk/src/modules/lucene/xslt/search2html.xsl   (with props)
    lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl   (with props)
    lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl   (with props)
Removed:
    lenya/trunk/src/webapp/lenya/usecases/lucene/
    lenya/trunk/src/webapp/lenya/xslt/lucene/
Modified:
    lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java
    lenya/trunk/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java
    lenya/trunk/src/modules/lucene/config/usecase-delete.xconf
    lenya/trunk/src/modules/lucene/config/usecase-externalOpensearch.xconf
    lenya/trunk/src/modules/lucene/config/usecase-index.xconf
    lenya/trunk/src/modules/lucene/config/usecase-opensearch.xconf
    lenya/trunk/src/modules/lucene/config/usecase-search.xconf
    lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java
    lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/EditDocument.java Mon Nov 21 18:26:16 2005
@@ -58,7 +58,7 @@
             
             //index
             resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);       
-            source = resolver.resolveURI("cocoon://core/lucene/index.xml");
+            source = resolver.resolveURI("cocoon://core/modules/lucene/lucene/index.xml");
             InputSource xmlInputSource = org.apache.cocoon.components.source.SourceUtil.getInputSource(source);
 
         } finally {

Modified: lenya/trunk/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java (original)
+++ lenya/trunk/src/java/org/apache/lenya/cms/editors/forms/OneFormEditor.java Mon Nov 21 18:26:16 2005
@@ -121,7 +121,7 @@
                             getEvent());
                     
                     //re-index      
-                    indexSource = resolver.resolveURI("cocoon://core/lucene/index.xml");
+                    indexSource = resolver.resolveURI("cocoon://core/modules/lucene/lucene/index.xml");
                     InputSource xmlInputSource = org.apache.cocoon.components.source.SourceUtil.getInputSource(indexSource);
                 }
             }

Modified: lenya/trunk/src/modules/lucene/config/usecase-delete.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/config/usecase-delete.xconf?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/config/usecase-delete.xconf (original)
+++ lenya/trunk/src/modules/lucene/config/usecase-delete.xconf Mon Nov 21 18:26:16 2005
@@ -20,7 +20,7 @@
 <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'lucene.delete']">
 
     <component-instance name="lucene.delete" logger="lenya.lucene" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="usecases/lucene/delete.jx"/>
+      <view template="modules/lucene/usecases/lucene/delete.jx"/>
       <exit usecase="lucene.delete"/>
     </component-instance>
 

Modified: lenya/trunk/src/modules/lucene/config/usecase-externalOpensearch.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/config/usecase-externalOpensearch.xconf?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/config/usecase-externalOpensearch.xconf (original)
+++ lenya/trunk/src/modules/lucene/config/usecase-externalOpensearch.xconf Mon Nov 21 18:26:16 2005
@@ -20,7 +20,7 @@
 <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'lucene.externalOpensearch']">
 
     <component-instance name="lucene.externalOpensearch" logger="lenya.lucene" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="usecases/lucene/externalOpensearch.jx"/>
+      <view template="modules/lucene/usecases/lucene/externalOpensearch.jx"/>
       <exit usecase="lucene.externalOpensearch"/>
     </component-instance>
 

Modified: lenya/trunk/src/modules/lucene/config/usecase-index.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/config/usecase-index.xconf?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/config/usecase-index.xconf (original)
+++ lenya/trunk/src/modules/lucene/config/usecase-index.xconf Mon Nov 21 18:26:16 2005
@@ -20,7 +20,7 @@
 <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'lucene.index']">
 
     <component-instance name="lucene.index" logger="lenya.lucene" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="usecases/lucene/index.jx"/>
+      <view template="modules/lucene/usecases/lucene/index.jx"/>
       <exit usecase="lucene.index"/>
     </component-instance>
 

Modified: lenya/trunk/src/modules/lucene/config/usecase-opensearch.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/config/usecase-opensearch.xconf?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/config/usecase-opensearch.xconf (original)
+++ lenya/trunk/src/modules/lucene/config/usecase-opensearch.xconf Mon Nov 21 18:26:16 2005
@@ -20,7 +20,7 @@
 <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'lucene.opensearch']">
 
     <component-instance name="lucene.opensearch" logger="lenya.lucene" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="usecases/lucene/opensearch.jx"/>
+      <view template="modules/lucene/usecases/lucene/opensearch.jx"/>
       <exit usecase="lucene.opensearch"/>
     </component-instance>
     

Modified: lenya/trunk/src/modules/lucene/config/usecase-search.xconf
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/config/usecase-search.xconf?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/modules/lucene/config/usecase-search.xconf (original)
+++ lenya/trunk/src/modules/lucene/config/usecase-search.xconf Mon Nov 21 18:26:16 2005
@@ -20,7 +20,7 @@
 <xconf xpath="/cocoon/usecases" unless="/cocoon/usecases/component-instance[@name = 'lucene.search']">
 
     <component-instance name="lucene.search" logger="lenya.lucene" class="org.apache.lenya.cms.usecase.DummyUsecase">
-      <view template="usecases/lucene/search.jx"/>
+      <view template="modules/lucene/usecases/lucene/search.jx"/>
       <exit usecase="lucene.search"/>
     </component-instance>
 

Added: lenya/trunk/src/modules/lucene/usecases/lucene/delete.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/delete.jx?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/delete.jx (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/delete.jx Mon Nov 21 18:26:16 2005
@@ -0,0 +1,19 @@
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id: serverStatus.jx 164233 2005-04-22 13:01:45Z jwkaltz $ -->
+<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+  <cinclude:src>cocoon://core/modules/lucene/lucene/delete.xml</cinclude:src>
+</cinclude:includexml>

Added: lenya/trunk/src/modules/lucene/usecases/lucene/externalOpensearch.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/externalOpensearch.jx?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/externalOpensearch.jx (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/externalOpensearch.jx Mon Nov 21 18:26:16 2005
@@ -0,0 +1,19 @@
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+  <cinclude:src>cocoon://core/modules/lucene/lucene/externalopensearch.xml</cinclude:src>
+</cinclude:includexml>

Added: lenya/trunk/src/modules/lucene/usecases/lucene/index.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/index.jx?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/index.jx (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/index.jx Mon Nov 21 18:26:16 2005
@@ -0,0 +1,19 @@
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+  <cinclude:src>cocoon://core/modules/lucene/lucene/index.xml</cinclude:src>
+</cinclude:includexml>

Added: lenya/trunk/src/modules/lucene/usecases/lucene/opensearch.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/opensearch.jx?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/opensearch.jx (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/opensearch.jx Mon Nov 21 18:26:16 2005
@@ -0,0 +1,18 @@
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+  <cinclude:src>cocoon://core/modules/lucene/lucene/opensearch.xml</cinclude:src>
+</cinclude:includexml>

Added: lenya/trunk/src/modules/lucene/usecases/lucene/search.jx
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/search.jx?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/search.jx (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/search.jx Mon Nov 21 18:26:16 2005
@@ -0,0 +1,19 @@
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<cinclude:includexml xmlns:cinclude="http://apache.org/cocoon/include/1.0">
+  <cinclude:src>cocoon://core/modules/lucene/lucene/search.xml</cinclude:src>
+</cinclude:includexml>

Added: lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap (added)
+++ lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap Mon Nov 21 18:26:16 2005
@@ -0,0 +1,157 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2005 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
+<!-- =========================== Components ================================ -->
+   <map:components>
+   
+      <map:actions default="request">
+        <map:action name="request" src="org.apache.cocoon.acting.RequestParamAction"/>
+      </map:actions>
+
+      <map:transformers default="xslt">
+        <map:transformer name="index2" logger="sitemap.transformer.luceneindextransformer2" src="org.apache.cocoon.transformation.LuceneIndexTransformer2"/>
+        <map:transformer name="cinclude" src="org.apache.cocoon.transformation.CIncludeTransformer"/>
+      </map:transformers>
+      
+   </map:components>
+
+<!-- =========================== Pipelines ================================ -->
+
+  <map:pipelines>
+
+    <map:pipeline>  
+      <map:match pattern="modules/*/**">
+        <map:mount uri-prefix="modules/{1}/" src="context://lenya/modules/{1}/sitemap.xmap" check-reload="true" reload-method="synchron"/>
+      </map:match>
+    </map:pipeline>  
+
+    <map:pipeline>
+      
+      <map:match pattern="opensearch.xml">
+          <!-- TODO: implement the opensearch results to make the search results available for an external app -->
+      	  <map:generate type="search">
+	     <map:parameter name="index" value="{realpath://lenya/pubs/{page-envelope:publication-id}/work/lucene/index}"/>
+	  </map:generate>
+
+          <map:transform src="fallback://lenya/modules/lucene/xslt/search2opensearch.xsl">	  
+	    <map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
+            <map:parameter name="document-id" value="{page-envelope:document-id}"/>
+            <map:parameter name="publication-id" value="{page-envelope:publication-id}"/>
+            <map:parameter name="document-type" value="{page-envelope:document-type}"/>
+            <map:parameter name="language" value="{page-envelope:document-language}"/>
+            <map:parameter name="page-length" value="{pageLength}"/>
+	  </map:transform>
+	  
+	  <map:transform type="cinclude"/>
+	  <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="externalopensearch.xml">
+        <!-- TODO: the location of the searchengine should be configurable somewhere else -->	
+        <!-- TODO: use the queryString parameter: request action -->	
+	<map:generate src="fallback://lenya/xslt/lucene/opensearch.xml"/>
+
+          <map:transform src="fallback://lenya/modules/lucene/xslt/opensearch2html.xsl">	  
+            <map:parameter name="url" value="{page-envelope:document-url}"/>
+            <map:parameter name="area" value="{page-envelope:area}"/>
+            <map:parameter name="pub" value="{page-envelope:publication-id}"/>
+            <map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
+            <map:parameter name="opensearch" value="opensearch.xml"/>
+	  </map:transform>
+	  
+	  <map:transform type="cinclude"/>
+	  
+          <map:transform src="fallback://xslt/page2xhtml-{page-envelope:document-type}.xsl">
+            <map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
+            <map:parameter name="document-id" value="{page-envelope:document-id}"/>
+            <map:parameter name="document-type" value="{page-envelope:document-type}"/>
+            <map:parameter name="language" value="{page-envelope:document-language}"/>
+            <map:parameter name="url" value="{page-envelope:document-url}"/>
+          </map:transform>
+
+          <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="search.xml">
+	  <map:generate type="search">
+	    <map:parameter name="index" value="{realpath://lenya/pubs/{page-envelope:publication-id}/work/lucene/index}"/>
+	  </map:generate>  
+ 
+          <map:transform src="fallback://lenya/modules/lucene/xslt/search2html.xsl">	  
+            <map:parameter name="url" value="{page-envelope:document-url}"/>
+            <map:parameter name="area" value="{page-envelope:area}"/>
+            <map:parameter name="pub" value="{page-envelope:publication-id}"/>
+            <map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
+	  </map:transform>
+	  	  
+	  <map:transform type="cinclude"/>
+	  
+          <map:transform src="fallback://xslt/page2xhtml.xsl">
+            <map:parameter name="root" value="{page-envelope:context-prefix}/{page-envelope:publication-id}/{page-envelope:area}"/>
+            <map:parameter name="document-id" value="{page-envelope:document-id}"/>
+            <map:parameter name="document-type" value="homepage"/>
+            <map:parameter name="language" value="{page-envelope:document-language}"/>
+            <map:parameter name="url" value="{page-envelope:document-url}"/>
+          </map:transform>
+
+	  <map:transform type="link-rewrite"/>
+	  
+          <map:serialize type="xml"/>
+      </map:match>
+
+      <map:match pattern="index.xml">
+          <map:aggregate element="cmsbody">
+	    <!-- TODO Use the standard pipeline for retieving the document -->
+	    <!-- <map:part src="cocoon:/modules/{page-envelope:document-type}/view.xml"/> -->
+	    <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml.meta"/>
+	    <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml"/>
+          </map:aggregate>
+	  
+	  <map:transform src="fallback://lenya/modules/lucene/xslt/{page-envelope:document-type}2index.xsl">
+	    <map:parameter name="index" value="{page-envelope:publication-id}"/>
+	    <map:parameter name="action" value="index"/>
+	    <map:parameter name="url" value="{request:requestURI}"/>
+	    <map:parameter name="id" value="{page-envelope:document-url}"/>
+	  </map:transform>
+	  
+	  <map:transform type="index2"/>
+	  <map:serialize type="xml"/>
+      </map:match>
+      
+      <map:match pattern="delete.xml">
+          <map:aggregate element="cmsbody">
+	    <!-- TODO Use the standard pipeline for retieving the document -->
+	    <!-- <map:part src="cocoon:/modules/{page-envelope:document-type}/view.xml"/> -->
+	    <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml.meta"/>
+	    <map:part src="fallback://content/{page-envelope:area}/{page-envelope:document-id}/index_{page-envelope:document-language}.xml"/>
+          </map:aggregate>
+	  
+	  <map:transform src="fallback://lenya/modules/lucene/xslt/{page-envelope:document-type}2index.xsl">
+	    <map:parameter name="index" value="{page-envelope:publication-id}"/>
+	    <map:parameter name="action" value="delete"/>
+	    <map:parameter name="url" value="{request:requestURI}"/>
+	    <map:parameter name="id" value="{page-envelope:document-url}"/>
+	  </map:transform>
+	  
+	  <map:transform type="index2"/>
+	  <map:serialize type="xml"/>
+      </map:match>
+
+    </map:pipeline>
+  </map:pipelines>
+</map:sitemap>

Propchange: lenya/trunk/src/modules/lucene/usecases/lucene/usecase.xmap
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- CVS $Id: search2html.xsl 47285 2004-09-27 12:52:44Z cziegeler $ -->
+<xsl:stylesheet version="1.0"
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
+  xmlns:dc="http://purl.org/dc/elements/1.1/"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+  exclude-result-prefixes="xhtml lucene lenya"
+>
+
+<xsl:import href="fallback://lenya/modules/lucene/xslt/xhtml2index.xsl"/>
+
+</xsl:stylesheet>
+

Propchange: lenya/trunk/src/modules/lucene/xslt/homepage2index.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/links2index.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/links2index.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/links2index.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/links2index.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,32 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- CVS $Id: search2html.xsl 47285 2004-09-27 12:52:44Z cziegeler $ -->
+<xsl:stylesheet version="1.0"
+  xmlns="http://www.w3.org/1999/xhtml"
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
+  xmlns:dc="http://purl.org/dc/elements/1.1/"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+  exclude-result-prefixes="xhtml lucene lenya"
+>
+
+<xsl:import href="fallback://lenya/modules/lucene/xslt/xhtml2index.xsl"/>
+
+</xsl:stylesheet>
+

Propchange: lenya/trunk/src/modules/lucene/xslt/links2index.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/opensearch.xml
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/opensearch.xml?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/opensearch.xml (added)
+++ lenya/trunk/src/modules/lucene/xslt/opensearch.xml Mon Nov 21 18:26:16 2005
@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+  <rss xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" >
+    <channel>
+      <title>history</title>
+      <link>history</link>
+      <description>Search A9.com</description>
+      <language>en-us</language>
+      <openSearch:totalResults>4230000</openSearch:totalResults>
+      <openSearch:startIndex>1</openSearch:startIndex>
+      <openSearch:itemsPerPage>10</openSearch:itemsPerPage>
+      <nutch:query xmlns:nutch="http://www.nutch.org/opensearchrss/1.0/">ofd</nutch:query>
+      <item>
+        <title>New York City History</title>
+        <link>http://www.columbia.edu/cu/lweb/eguides/amerihist/nyc.html</link>
+        <description>... Harlem.NYC - A virtual tour and information on 
+        businesses ...  with historic photos of Columbia's own New York 
+        neighborhood ... Internet Resources for the City's History. ...</description>
+      </item>
+      <item>
+        <title>Gotham Center for New York City History</title>
+        <link>http://www.gothamcenter.org/</link>
+        <description>... Submit Events Edit Your Submission. Main Neighborhood
+        Stories NYC History in the ... The Gotham Center for New York City History
+        is supported by The CUNY Graduate ...</description>
+      </item>
+      <item>
+        <title>Welcome to the Museum of the City of New York</title>
+        <link>http://www.mcny.org/</link>
+        <description>... a list with the event staff. Additional information
+        will be included in the confirming email.  Museum of the City
+        of New York.</description>
+      </item>
+    </channel>
+  </rss>

Propchange: lenya/trunk/src/modules/lucene/xslt/opensearch.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,73 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- CVS $Id: search2html.xsl 47285 2004-09-27 12:52:44Z cziegeler $ -->
+<xsl:stylesheet 
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+  xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
+  xmlns:nutch="http://www.nutch.org/opensearchrss/1.0/"
+  exclude-result-prefixes="xhtml cinclude search xsl openSearch"
+>
+
+<xsl:param name="url"/>
+<xsl:param name="area"/>
+<xsl:param name="pub"/>
+<xsl:param name="root"/>
+<xsl:param name="opensearch"/>
+
+  <xsl:template match="/rss/channel">  
+    <cmsbody>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/breadcrumb{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/menu{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/tabs{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/search{$url}.xml"/>      
+      <xhtml:div id="body">
+        <h1>
+          <xsl:value-of select="openSearch:totalResults"/> hit(s) on search engine
+          <a href="{link}"><xsl:value-of select="title"/></a>
+          <xsl:apply-templates select="nutch:query"/>
+	</h1>
+	
+	<p><xsl:value-of select="description"/></p>
+        <ul>
+          <xsl:apply-templates select="item"/>
+        </ul>
+        <p><a href="{$root}{$url}">Return to document</a></p>
+      </xhtml:div>
+    </cmsbody>
+  </xsl:template>
+
+  <xsl:template match="nutch:query">
+    with query <em><xsl:value-of select="."/></em>
+  </xsl:template>
+
+  <xsl:template match="item">
+    <li>
+      <h2><a href="{link}"><xsl:value-of select="title"/></a></h2>
+      <p><xsl:value-of select="description"/></p>
+    </li>
+  </xsl:template>
+
+<xsl:template match="@*|node()" priority="-1">
+<xsl:apply-templates/>
+</xsl:template>
+
+</xsl:stylesheet>
+

Propchange: lenya/trunk/src/modules/lucene/xslt/opensearch2html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/search2html.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/search2html.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/search2html.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/search2html.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,172 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- CVS $Id: search2html.xsl 47285 2004-09-27 12:52:44Z cziegeler $ -->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:cinclude="http://apache.org/cocoon/include/1.0"
+  exclude-result-prefixes="cinclude search xhtml"
+>
+
+<xsl:param name="url"/>
+<xsl:param name="area"/>
+<xsl:param name="pub"/>
+<xsl:param name="root"/>
+
+  <xsl:template match="search:results">  
+    <cmsbody>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/breadcrumb{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/menu{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/tabs{$url}.xml"/>
+      <cinclude:include src="cocoon:/modules/sitetree/{$pub}/{$area}/search{$url}.xml"/>      
+      <xhtml:div id="body">
+        <xsl:apply-templates/>
+      </xhtml:div>
+    </cmsbody>
+  </xsl:template>
+
+  <xsl:template match="search:hits">
+    <h1>
+        <xsl:value-of select="@total-count"/> hit(s)
+        <xsl:value-of select="@count-of-pages"/> page(s) on query
+        <em><xsl:value-of select="/search:results/@query-string"/></em>
+    </h1>
+    
+    <ul>
+      <xsl:apply-templates/>
+    </ul>
+    
+    <p>
+      <xsl:for-each select="/search:results/search:navigation/search:navigation-page">
+        <xsl:call-template name="navigation-link"> 
+          <xsl:with-param name="query-string" select="/search:results/@query-string"/>
+          <xsl:with-param name="page-length" select="/search:results/@page-length"/>
+          <xsl:with-param name="start-index" select="@start-index"/>
+          <xsl:with-param name="link-text" select="position()"/>
+        </xsl:call-template>
+      </xsl:for-each>
+
+    
+      <xsl:call-template name="navigation-paging-link">
+        <xsl:with-param name="query-string" select="/search:results/@query-string"/>
+        <xsl:with-param name="page-length" select="/search:results/@page-length"/>
+        <xsl:with-param name="has-previous" select="/search:results/search:navigation/@has-previous"/>
+        <xsl:with-param name="has-next" select="/search:results/search:navigation/@has-next"/>
+        <xsl:with-param name="previous-index" select="/search:results/search:navigation/@previous-index"/>
+        <xsl:with-param name="next-index" select="/search:results/search:navigation/@next-index"/>
+      </xsl:call-template>
+    </p>
+    
+    <p>
+        <a href="{$root}{$url}">Return to document</a>	
+    </p>
+    
+  </xsl:template>
+
+  <xsl:template match="search:navigation">
+    <p>
+    <xsl:call-template name="navigation-paging-form">
+      <xsl:with-param name="query-string"><xsl:value-of select="/search:results/@query-string"/></xsl:with-param>
+      <xsl:with-param name="page-length"><xsl:value-of select="/search:results/@page-length"/></xsl:with-param>
+      <xsl:with-param name="has-previous"><xsl:value-of select="@has-previous"/></xsl:with-param>
+      <xsl:with-param name="has-next"><xsl:value-of select="@has-next"/></xsl:with-param>
+      <xsl:with-param name="previous-index"><xsl:value-of select="@previous-index"/></xsl:with-param>
+      <xsl:with-param name="next-index"><xsl:value-of select="@next-index"/></xsl:with-param>
+    </xsl:call-template>
+    </p>
+  </xsl:template>
+  
+  <xsl:template match="search:hit">
+    <li>
+        <h2>Score: <xsl:value-of select="format-number( @score, '### %' )"/> Rank: <xsl:value-of select="@rank"/></h2>
+        <p><a href="{$root}{search:field[attribute::name='uid']}"><xsl:value-of select="search:field[attribute::name='title']"/></a></p>
+    </li>
+  </xsl:template>
+
+  <xsl:template name="navigation-paging-form">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="has-previous"/>
+    <xsl:param name="has-next"/>
+    <xsl:param name="previous-index"/>
+    <xsl:param name="next-index"/>
+
+    <xsl:if test="$has-previous = 'true'">
+      <form action="">
+        <input type="hidden" name="lenya.usecase" value="search"/>
+        <input type="hidden" name="startIndex" value="{$previous-index}"/>
+        <input type="hidden" name="queryString" value="{$query-string}"/>
+        <input type="hidden" name="pageLength" value="{$page-length}"/>
+        <input type="submit" name="previous" value="previous"/>
+      </form>
+    </xsl:if>
+    
+    <xsl:if test="$has-next = 'true'">
+      <form action="">
+        <input type="hidden" name="lenya.usecase" value="search"/>
+        <input type="hidden" name="startIndex" value="{$next-index}"/>
+        <input type="hidden" name="queryString" value="{$query-string}"/>
+        <input type="hidden" name="pageLength" value="{$page-length}"/>
+        <input type="submit" name="next" value="next"/>
+      </form>
+    </xsl:if>
+    
+  </xsl:template>
+
+  <xsl:template name="navigation-paging-link">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="has-previous"/>
+    <xsl:param name="has-next"/>
+    <xsl:param name="previous-index"/>
+    <xsl:param name="next-index"/>
+
+    <xsl:if test="$has-previous = 'true'">
+      
+      <xsl:call-template name="navigation-link">
+        <xsl:with-param name="query-string"><xsl:value-of select="$query-string"/></xsl:with-param>
+        <xsl:with-param name="page-length"><xsl:value-of select="$page-length"/></xsl:with-param>
+        <xsl:with-param name="start-index"><xsl:value-of select="$previous-index"/></xsl:with-param>
+        <xsl:with-param name="link-text">Previous Page Of Hits</xsl:with-param>
+      </xsl:call-template>
+    </xsl:if>
+    &#160;
+    <xsl:if test="$has-next = 'true'">
+      <a href="index.html?lenya.usecase=search&amp;startIndex={$next-index}&amp;queryString={$query-string}&amp;pageLength={$page-length}">
+        Next Page Of Hits
+      </a>
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template name="navigation-link">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="start-index"/>
+    <xsl:param name="link-text"/>
+
+    <a href="index.html?lenya.usecase=search&amp;startIndex={$start-index}&amp;queryString={$query-string}&amp;pageLength={$page-length}">
+      <xsl:value-of select="$link-text"/>
+    </a>
+    &#160;
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
+  <xsl:template match="text()" priority="-1"><xsl:value-of select="."/></xsl:template>
+
+</xsl:stylesheet>
+

Propchange: lenya/trunk/src/modules/lucene/xslt/search2html.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,156 @@
+<?xml version="1.0"?>
+<!--
+  Copyright 1999-2004 The Apache Software Foundation
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- CVS $Id: search2html.xsl 47285 2004-09-27 12:52:44Z cziegeler $ -->
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:search="http://apache.org/cocoon/search/1.0"
+  xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
+  exclude-prefix="openSearch"
+>
+
+<xsl:param name="language"/>
+<xsl:param name="root"/>
+<xsl:param name="publication-id"/>
+<xsl:param name="page-length"/>
+
+  <xsl:template match="search:results">  
+    <rss version="2.0">
+      <title><xsl:value-of select="$publication-id"/></title>
+      <link><xsl:value-of select="$root"/></link>
+      <description></description>
+      <language><xsl:value-of select="$language"/></language>
+      <xsl:apply-templates/>
+    </rss>
+  </xsl:template>
+
+
+  <xsl:template match="search:hits">
+      <openSearch:totalResults><xsl:value-of select="@total-count"/></openSearch:totalResults>
+      <openSearch:startIndex><xsl:value-of select="@count-of-pages"/></openSearch:startIndex>
+      <openSearch:itemsPerPage><xsl:value-of select="$page-length"/></openSearch:itemsPerPage>
+      
+      <xsl:for-each select="/search:results/search:navigation/search:navigation-page">
+        <xsl:call-template name="navigation-link"> 
+          <xsl:with-param name="query-string" select="/search:results/@query-string"/>
+          <xsl:with-param name="page-length" select="/search:results/@page-length"/>
+          <xsl:with-param name="start-index" select="@start-index"/>
+          <xsl:with-param name="link-text" select="position()"/>
+        </xsl:call-template>
+      </xsl:for-each>
+    
+    <xsl:call-template name="navigation-paging-link">
+      <xsl:with-param name="query-string" select="/search:results/@query-string"/>
+      <xsl:with-param name="page-length" select="/search:results/@page-length"/>
+      <xsl:with-param name="has-previous" select="/search:results/search:navigation/@has-previous"/>
+      <xsl:with-param name="has-next" select="/search:results/search:navigation/@has-next"/>
+      <xsl:with-param name="previous-index" select="/search:results/search:navigation/@previous-index"/>
+      <xsl:with-param name="next-index" select="/search:results/search:navigation/@next-index"/>
+    </xsl:call-template>
+    
+    <xsl:apply-templates/>
+    
+  </xsl:template>
+
+  <xsl:template match="search:navigation">
+    <xsl:call-template name="navigation-paging-form">
+      <xsl:with-param name="query-string"><xsl:value-of select="/search:results/@query-string"/></xsl:with-param>
+      <xsl:with-param name="page-length"><xsl:value-of select="/search:results/@page-length"/></xsl:with-param>
+      <xsl:with-param name="has-previous"><xsl:value-of select="@has-previous"/></xsl:with-param>
+      <xsl:with-param name="has-next"><xsl:value-of select="@has-next"/></xsl:with-param>
+      <xsl:with-param name="previous-index"><xsl:value-of select="@previous-index"/></xsl:with-param>
+      <xsl:with-param name="next-index"><xsl:value-of select="@next-index"/></xsl:with-param>
+    </xsl:call-template>
+  </xsl:template>
+  
+  <xsl:template match="search:hit">
+      <item>
+        <title><xsl:value-of select="search:field[@name='title']"/></title>
+        <link><xsl:value-of select="@uri"/></link>
+        <description><xsl:value-of select="search:field[@name='description']"/></description>
+      </item>
+  </xsl:template>
+
+  <xsl:template name="navigation-paging-form">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="has-previous"/>
+    <xsl:param name="has-next"/>
+    <xsl:param name="previous-index"/>
+    <xsl:param name="next-index"/>
+
+    <xsl:if test="$has-previous = 'true'">
+      <form action="findIt">
+        <input type="hidden" name="startIndex" value="{$previous-index}"/>
+        <input type="hidden" name="queryString" value="{$query-string}"/>
+        <input type="hidden" name="pageLength" value="{$page-length}"/>
+        <input type="submit" name="previous" value="previous"/>
+      </form>
+    </xsl:if>
+    
+    <xsl:if test="$has-next = 'true'">
+      <form action="findIt">
+        <input type="hidden" name="startIndex" value="{$next-index}"/>
+        <input type="hidden" name="queryString" value="{$query-string}"/>
+        <input type="hidden" name="pageLength" value="{$page-length}"/>
+        <input type="submit" name="next" value="next"/>
+      </form>
+    </xsl:if>
+    
+  </xsl:template>
+
+  <xsl:template name="navigation-paging-link">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="has-previous"/>
+    <xsl:param name="has-next"/>
+    <xsl:param name="previous-index"/>
+    <xsl:param name="next-index"/>
+
+    <xsl:if test="$has-previous = 'true'">
+      
+      <xsl:call-template name="navigation-link">
+        <xsl:with-param name="query-string"><xsl:value-of select="$query-string"/></xsl:with-param>
+        <xsl:with-param name="page-length"><xsl:value-of select="$page-length"/></xsl:with-param>
+        <xsl:with-param name="start-index"><xsl:value-of select="$previous-index"/></xsl:with-param>
+        <xsl:with-param name="link-text">Previous Page Of Hits</xsl:with-param>
+      </xsl:call-template>
+    </xsl:if>
+    &#160;
+    <xsl:if test="$has-next = 'true'">
+      <a href="findIt?startIndex={$next-index}&amp;queryString={$query-string}&amp;pageLength={$page-length}">
+        Next Page Of Hits
+      </a>
+    </xsl:if>
+  </xsl:template>
+  
+  <xsl:template name="navigation-link">
+    <xsl:param name="query-string"/>
+    <xsl:param name="page-length"/>
+    <xsl:param name="start-index"/>
+    <xsl:param name="link-text"/>
+
+    <a href="findIt?startIndex={$start-index}&amp;queryString={$query-string}&amp;pageLength={$page-length}">
+      <xsl:value-of select="$link-text"/>
+    </a>
+    &#160;
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>
+  <xsl:template match="text()" priority="-1"><xsl:value-of select="."/></xsl:template>
+
+</xsl:stylesheet>
+

Propchange: lenya/trunk/src/modules/lucene/xslt/search2opensearch.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl?rev=348067&view=auto
==============================================================================
--- lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl (added)
+++ lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl Mon Nov 21 18:26:16 2005
@@ -0,0 +1,60 @@
+<?xml version="1.0"?>
+<xsl:stylesheet version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+  xmlns:xhtml="http://www.w3.org/1999/xhtml"
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"
+  xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
+  xmlns:dc="http://purl.org/dc/elements/1.1/"
+>
+
+<xsl:param name="index"/>
+<xsl:param name="uri"/>
+<xsl:param name="id"/>
+<xsl:param name="action"/>
+
+<xsl:variable name="boost" select="number(/descendant-or-self::dc:rights)"/>  
+
+<xsl:template match="/">  
+  <xsl:choose>
+    <xsl:when test="$action = 'delete'">
+       <lucene:delete indexid="{$index}">
+        <lucene:document uid="{$id}"/>
+      </lucene:delete>     
+    </xsl:when>
+    <xsl:when test="$action = 'index'">        
+      <lucene:index clear="false" indexid="{$index}" merge-factor="100">
+        <lucene:document uid="{$id}">
+          <lucene:field name="url" boost="{$boost}"><xsl:value-of select="$uri"/></lucene:field>
+          <xsl:apply-templates/>
+        </lucene:document>
+      </lucene:index>  
+    </xsl:when>
+  </xsl:choose>
+
+</xsl:template>
+
+<xsl:template match="dc:rights" priority="1">
+</xsl:template>
+
+<xsl:template match="xhtml:body" priority="1">
+  <lucene:field name="body" boost="{$boost}"><xsl:value-of select="descendant-or-self::*"/></lucene:field>
+</xsl:template>
+
+<xsl:template match="dc:title" priority="1">
+  <lucene:field name="title" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
+</xsl:template>
+
+<xsl:template match="dc:description" priority="1">
+  <lucene:field name="description" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
+</xsl:template>
+
+<xsl:template match="dc:subject" priority="1">
+  <lucene:field name="subject" boost="{$boost}"><xsl:value-of select="."/></lucene:field>
+</xsl:template>
+
+<xsl:template match="@*|node()" priority="-1">
+    <xsl:apply-templates/>
+</xsl:template>
+
+
+</xsl:stylesheet>

Propchange: lenya/trunk/src/modules/lucene/xslt/xhtml2index.xsl
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Deactivate.java Mon Nov 21 18:26:16 2005
@@ -151,7 +151,7 @@
                     getEvent());
 
 	    resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);	    
-	    source = resolver.resolveURI("cocoon://core/lucene/delete.xml");
+	    source = resolver.resolveURI("cocoon://core/modules/lucene/lucene/delete.xml");
             InputSource xmlInputSource = org.apache.cocoon.components.source.SourceUtil.getInputSource(source);
 
             success = true;

Modified: lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java
URL: http://svn.apache.org/viewcvs/lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java?rev=348067&r1=348066&r2=348067&view=diff
==============================================================================
--- lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java (original)
+++ lenya/trunk/src/webapp/lenya/pubs/default/java/src/org/apache/lenya/defaultpub/cms/usecases/Publish.java Mon Nov 21 18:26:16 2005
@@ -258,7 +258,7 @@
                     getEvent());
 
 	    resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);	    
-	    source = resolver.resolveURI("cocoon://core/lucene/index.xml");
+	    source = resolver.resolveURI("cocoon://core/modules/lucene/lucene/index.xml");
         InputSource xmlInputSource = org.apache.cocoon.components.source.SourceUtil.getInputSource(source);
 
             boolean notify = Boolean.valueOf(getBooleanCheckboxParameter(SEND_NOTIFICATION))



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org