You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by je...@apache.org on 2006/12/17 17:22:39 UTC

svn commit: r488001 - in /cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples: ./ flow/ forms/ screens/ stylesheets/

Author: jeremy
Date: Sun Dec 17 08:22:38 2006
New Revision: 488001

URL: http://svn.apache.org/viewvc?view=rev&rev=488001
Log:
querybean sample can create an index again, it indexes welcome.xml files in block samples

Modified:
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/indexer.js
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/query.js
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-model.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-template.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl
    cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/indexer.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/indexer.js?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/indexer.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/indexer.js Sun Dec 17 08:22:38 2006
@@ -98,7 +98,7 @@
 		cocoon.log.error(error);
 		cocoon.sendPage("screen/error", {message: error});	
 	} finally {
-		resolver.release(source);
+		if (source) resolver.release(source);
 		cocoon.releaseComponent(resolver);
 	}
 }
@@ -129,7 +129,6 @@
 	this._rdir = rdir;
 	this._rsuffix = rsuffix;
 	if ("undefined".equals(this._rdir)) this._rdir = "";
-	if ("undefined".equals(this._rsuffix)) this._rsuffix = "";
 }
 
 Converter.prototype.convert = function(file) {
@@ -137,7 +136,7 @@
 	// remove the absolute base path
 	path = path.substring(this._base.length());
 	// replace the suffix, if a replacement was provided
-	if (!"".equals(this._rsuffix)) path = path.substring(0, path.lastIndexOf(".")) + this._rsuffix;
+	if (!"undefined".equals(this._rsuffix)) path = path.substring(0, path.lastIndexOf(".")) + this._rsuffix;
 	// prefix with the results path
 	path = this._rdir + path;
 	// replace windows path delimiters with http ones

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/query.js
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/query.js?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/query.js (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/flow/query.js Sun Dec 17 08:22:38 2006
@@ -127,7 +127,7 @@
 	form.createBinding(cocoon.parameters["bindingURI"]);
 	form.load(query);
 	form.showForm(cocoon.parameters["form"]);
-	if ("submit".equals(form.submitId)) {
+	if ("_submit".equals(form.submitId)) {
 		form.save(query);
 		cocoon.log.debug("form submitted");
 		query.id = null; // this is no longer a favourite, now it has been edited

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-model.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-model.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-model.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-model.xml Sun Dec 17 08:22:38 2006
@@ -88,7 +88,7 @@
 			<fd:hint><i18n:text i18n:catalogue="local">cancel.hint</i18n:text></fd:hint>
 		</fd:submit> 
 
-		<fd:submit id="submit" action-command="submit" validate="true">
+		<fd:submit id="_submit" action-command="submit" validate="true">
 			<fd:label><i18n:text i18n:catalogue="local">submit.label</i18n:text></fd:label>
 			<fd:hint><i18n:text i18n:catalogue="local">submit.hint</i18n:text></fd:hint>
 		</fd:submit> 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-template.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/advanced-template.xml Sun Dec 17 08:22:38 2006
@@ -23,6 +23,7 @@
 	xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" 
 	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
 >
+    <h4 class="samplesGroup">Query Bean - Search Form</h4>
 	<title><i18n:text i18n:catalogue="local">search.page.title</i18n:text> : <i18n:text i18n:catalogue="local">advanced.page.title</i18n:text></title>
 	<content>
 		<p><i18n:text i18n:catalogue="local">advanced.page.note</i18n:text></p>
@@ -55,7 +56,7 @@
 			</fi:group>
 			<i18n:text i18n:catalogue="local">required.note</i18n:text>
 			<ft:widget id="cancel"/>
-			<ft:widget id="submit"/>
+			<ft:widget id="_submit"/>
 		</ft:form-template>
 	</content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml Sun Dec 17 08:22:38 2006
@@ -74,7 +74,7 @@
 			<fd:hint><i18n:text i18n:catalogue="local">cancel.hint</i18n:text></fd:hint>
 		</fd:submit> 
 
-		<fd:submit id="submit" action-command="submit" validate="true">
+		<fd:submit id="_submit" action-command="submit" validate="true">
 			<fd:label><i18n:text i18n:catalogue="local">submit.label</i18n:text></fd:label>
 			<fd:hint><i18n:text i18n:catalogue="local">submit.hint</i18n:text></fd:hint>
 		</fd:submit> 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml Sun Dec 17 08:22:38 2006
@@ -23,6 +23,7 @@
 	xmlns:fi="http://apache.org/cocoon/forms/1.0#instance" 
 	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
 >
+    <h4 class="samplesGroup">Query Bean - Search Form</h4>
 	<title>
 		<i18n:text i18n:catalogue="local">search.page.title</i18n:text> : <i18n:text i18n:catalogue="local">simple.page.title</i18n:text>
 	</title>
@@ -45,7 +46,7 @@
 			</fi:group>
 			<i18n:text i18n:catalogue="local">required.note</i18n:text>
 			<ft:widget id="cancel"/>
-			<ft:widget id="submit"/>
+			<ft:widget id="_submit"/>
 		</ft:form-template>
 	</content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml Sun Dec 17 08:22:38 2006
@@ -17,8 +17,10 @@
 -->
 <page xmlns:t="http://apache.org/cocoon/templates/jx/1.0"
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+	<h4 class="samplesGroup">Query Bean - Cancelled</h4>
 	<title>Cancelled</title>
 	<content>
 		<p><i18n:text i18n:catalogue="local">#{message}</i18n:text></p>
+		<p><a href="welcome">Welcome</a></p>
 	</content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml Sun Dec 17 08:22:38 2006
@@ -19,10 +19,12 @@
 <!-- $Id: error.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
 <page xmlns:t="http://apache.org/cocoon/templates/jx/1.0"
   xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
+	<h4 class="samplesGroup">Query Bean - Error</h4>
 	<title>Error</title>
 	<content>
 		<p><i18n:text i18n:catalogue="local">#{message}</i18n:text></p>
 		<hr/>
 		<p>An error has occurred, please try again. <!--Contact <a href="mailto:">administrator</a> if this problem persists.--></p>
+		<p><a href="welcome">Welcome</a></p>
 	</content>
 </page>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml Sun Dec 17 08:22:38 2006
@@ -21,6 +21,7 @@
 	xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
 	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
 	>
+	<h4 class="samplesGroup">Query Bean - Favourites</h4>
 	<title><i18n:text i18n:catalogue="local">favourites.page.title</i18n:text></title>
 	<content>
 		<p class="links"> 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml Sun Dec 17 08:22:38 2006
@@ -21,6 +21,7 @@
 	xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
 	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
 	>
+	<h4 class="samplesGroup">Query Bean - History</h4>
 	<title><i18n:text i18n:catalogue="local">history.page.title</i18n:text></title>
 	<content>
 		<p class="links"> 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml Sun Dec 17 08:22:38 2006
@@ -17,14 +17,19 @@
 -->
 <!-- $Id: index.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
 <page>
+	<h4 class="samplesGroup">Query Bean - XML Search</h4>
 	<title>Query Bean Samples</title>
-	<content>
+	<content>        
+        
 		<p>
 			<b>NB. You need to make an index first.</b> <br/>
 			If you have not already made an index of the Cocoon Documentation, you may do so <a href="create.html">here</a>.
 		</p>
+
+		<h2>What it does</h2>
+		<p>Allows you to assemble complex Lucene Queries without having to use the Lucene Query Language. Keeps a list of the queries you have performed in it's history (for as long as your Session lasts). Allows you to re-use and edit them.</p>
 		
-		<h3>Search</h3>
+		<h2>Search</h2>
 		<p>You can perform any of the following search types:</p>
 		<ul>
 			<li>Quick search: 
@@ -32,27 +37,27 @@
 					<input type="text" name="query" size="20" value="cocoon"/>
 					<input type="submit" value="Search" />
 				</form>
-      </li>
+            </li>
 			<li><a href="simple.html">Simple</a> search: perform simple single-criteria searches.</li>
 			<li><a href="advanced.html">Advanced</a> search: perform complex multi-criteria searches.</li>
 		</ul>
 		
-		<h3>Queries</h3>
+		<h2>Queries</h2>
 		<p>You can view, reuse, and re-edit your previous queries:</p>
 		<ul>
 			<li><a href="history.html">History</a>: your search history.</li>
 			<li><a href="favourites.html">Favourites</a>: your saved searches.</li>
 		</ul>
 		
-		<h3>What it does.</h3>
-		<p>Allows you to assemble complex Lucene Queries without having to use the Lucene Query Language. Keeps a list of the queries you have performed in it's history (for as long as your Session lasts). Allows you to re-use and edit them.</p>
-		
-		<h3>How does it work?</h3>
+		<h2>How does it work?</h2>
 		<p>Through a combination of FlowScript (controller), CForms and JXTemplate (view), Beans and OJB (model), i18n and the CocoonLuceneSearcher component.</p>
+		
 		<h4>FlowScript</h4>
 		The FlowScript controls the flow of the application, it instansiates Beans, manages the History, chooses which Forms and Screens to display, controls the CocoonLuceneSearcher.
+		
 		<h4>CForms</h4>
 		<p>Cocoon Forms provideds the infrastructure to manipulate the Beans via HTML Forms. That is to change the Properties of the Beans and add and remove Criteria.</p>
+		
 		<h4>JXTemplate</h4>
 		<p>
 			JXTemplate is used to show the results and the history (List of Query Beans).
@@ -61,10 +66,13 @@
 		</p><p>
 			The history is in the form of a <code>List</code> of Query Beans.
 		</p>
+		
 		<h4>Beans</h4>
-		<p>The Beans represent an abstract (and persistable) representation of your Query.</p>
+		<p>The Beans provide an abstract representation of your Query. They may be persisted etc. The Lucene Query is generated from the Beans when you perform a search.</p>
+		
 		<h4>i18n</h4>
 		<p>i18n is used to hold all of the display strings used by the Application. Form labels and hints, Query descriptions, Screen labels and hints, Error messages etc.</p>
+		
 		<h4>CocoonLuceneSearcher</h4>
 		<p>This is the Component that does the actual searching. It is provided with the Lucene Directory and a Query by the Query Bean. If you give it a directory parameter that is a single folder name, it uses that folder in the Servlet Engine's Work Directory, if the parameter is an absolute file path, it uses that instead. It uses the default Analyser.</p>
 		
@@ -81,7 +89,7 @@
 ]]></pre>
 				makes a menu item using the i18n key <code>field.title.label</code> as the menu text and <code>title</code> as the value, where the value matches one of your Index Fields.
 			</p><p>
-				Once your CForms selection-lists are setup, you will want to edit the existing i18n message keys in <a href="i18n/messages_en.xml?cocoon-view=pretty-content">i18n/messages_en.xml</a> and/or provide new message files in your own language.
+				Once your CForms selection-lists are setup, you will want to edit the existing i18n message keys in <a href="i18n/messages.xml?cocoon-view=pretty-content">i18n/messages_en.xml</a> and/or provide new message files in your own language.
 			</p><p>
 				The last thing you may choose to do, is to supply some CSS for the screens. The <a href="screens/history.xml?cocoon-view=pretty-content">history</a>, <a href="screens/favourites.xml?cocoon-view=pretty-content">favourites</a> and <a href="screens/results.xml?cocoon-view=pretty-content">results</a> screens supply what is hopefully a rich enough
 collection of CSS Classes, have a look at the HTML output to see what there is.</p>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml Sun Dec 17 08:22:38 2006
@@ -21,9 +21,11 @@
 	xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
 	xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
 	>
+    <h4 class="samplesGroup">Query Bean - Results</h4>
 	<title><i18n:text i18n:catalogue="local">${result.query.type}.page.title</i18n:text>: ${result.query.name}</title>
 	<content>
 		<!-- description of the query -->
+        <title>Your Query</title>
 		<p class="query-description">
 			<i18n:text i18n:catalogue="local">search.subject.title</i18n:text>
 			<span class="query-bool" title="local:query.bool.hint" i18n:attr="title">

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap Sun Dec 17 08:22:38 2006
@@ -147,16 +147,21 @@
 			</map:match>
 
 			<!-- home page -->
-    	<map:match pattern="">
-    		<map:redirect-to uri="cocoon:/screen/index"/>
-      </map:match>
-    	<map:match pattern="welcome">
-    		<map:redirect-to uri="cocoon:/screen/index"/>
-      </map:match>
+            <map:match pattern="">
+                <map:redirect-to uri="cocoon:/screen/index"/>
+            </map:match>
+            <map:match pattern="welcome">
+                <map:redirect-to uri="cocoon:/screen/index"/>
+            </map:match>
 
-    	<map:match pattern="images/**">
-    		<map:read src="resources/images/{1}"/>
-      </map:match>
+            <!-- redirect to the found pages -->
+            <map:match pattern="*/welcome">
+                <map:redirect-to uri="cocoon://samples/blocks/{1}/"/>
+            </map:match>
+            
+            <map:match pattern="images/**">
+                <map:read src="resources/images/{1}"/>
+            </map:match>
 
 			<!-- create the index from the contents of a collection -->
 			<map:match pattern="create.html">
@@ -167,11 +172,10 @@
 					<map:parameter name="lucene-merge-factor" value="10"/>
 					<map:parameter name="lucene-create-index" value="false"/>
 					<map:parameter name="lucene-content" value="cocoon:/prepare4indexing/"/>
-					<map:parameter name="content-directory" value="context://docs/xdocs"/>
-					<map:parameter name="include-pattern" value="\.xml$"/>
-					<map:parameter name="exclude-pattern" value="/book\.xml$"/>
-					<map:parameter name="result-directory" value="/docs/"/>
-					<map:parameter name="result-suffix" value=".html"/>
+					<map:parameter name="content-directory" value="../"/>
+					<map:parameter name="include-pattern" value="welcome\.xml$"/>
+					<map:parameter name="result-directory" value=""/>
+					<map:parameter name="result-suffix" value=""/>
 				</map:call>
 			</map:match>
 
@@ -186,8 +190,8 @@
 					<map:parameter name="lucene-content" value="cocoon:/prepare4indexing/"/>
 					<map:parameter name="content-directory" value="{global:root}"/>
 					<map:parameter name="indexer-target" value="{1}"/><!-- the resource to be indexed -->
-					<map:parameter name="result-directory" value="/docs/"/>
-					<map:parameter name="result-suffix" value=".html"/>
+					<map:parameter name="result-directory" value=""/>
+					<map:parameter name="result-suffix" value=""/>
 				</map:call>
 			</map:match>
 

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl Sun Dec 17 08:22:38 2006
@@ -22,16 +22,9 @@
   xmlns:lucene="http://apache.org/cocoon/lucene/1.0" 
 >
 	<!-- store titles -->
-	<xsl:template match="page/title|header/title">
-		<title lucene:store="true"><xsl:apply-templates/></title>
-	</xsl:template>
-	
-	<xsl:template match="faqs[@title]|book[@title]">
-		<xsl:copy>
-			<xsl:apply-templates select="@*[local-name() != 'title']"/>
-			<title lucene:store="true"><xsl:value-of select="@title"/></title>
-			<xsl:apply-templates/>
-		</xsl:copy>
+	<xsl:template match="samples">
+		<title lucene:store="true"><xsl:value-of select="@name"/></title>
+		<xsl:apply-templates/>
 	</xsl:template>
 		
   <xsl:template match="@*|node()" priority="-2"><xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy></xsl:template>

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl
URL: http://svn.apache.org/viewvc/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl?view=diff&rev=488001&r1=488000&r2=488001
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl (original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl Sun Dec 17 08:22:38 2006
@@ -23,24 +23,39 @@
 >
   <xsl:template match="lucene:index">
     <page>
-      <title>Lucene Index</title>
+      <h4 class="samplesGroup">Query Bean - Indexer</h4>
+      <title>Query Bean - Indexer</title>
       <content>
         <p>
           <small>
             <a href="welcome">Welcome</a>
           </small>
         </p>
+        <h3>What just happened?</h3>
+        <ul>
+            <li>A Flowscript made a collection of files to index by scanning samples/blocks for welcome.xml files.</li>
+            <li>It passed this list to a JX Template, that output each file as a call to CInclude it's content.</li>
+            <li>As the files were included, they were transformed by XSLT to define how they would be indexed.</li>
+            <li>This was then passed to the IndexTransformer.</li>
+        </ul>
+        
+        <p>You can now perform <a href="simple.html">searches</a></p>
+        
+        <h3>The following URLs were indexed :</h3>
+        
+        <table style="margin-left:20px;">
+          <tr><th>url</th><th>elapsed-time</th></tr>
+          <xsl:apply-templates/>
+        </table>
+        
+        <h3>The following parameters were supplied :</h3>
+        
         <ul>
           <li>merge-factor - <xsl:value-of select="@merge-factor"/></li>
           <li>create - <xsl:value-of select="@create"/></li>
           <li>directory - <xsl:value-of select="@directory"/></li>
           <li>analyzer - <xsl:value-of select="@analyzer"/></li>
         </ul>
-
-        <table>
-          <tr><th>url</th><th>elapsed-time</th></tr>
-          <xsl:apply-templates/>
-        </table>
       </content>
     </page>
   </xsl:template>