Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-model.xml
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- The CForms Model for editing a simple query -->
+<!-- $Id: simple-model.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"; 
xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>
+
+  <fd:widgets>
+
+    <fd:messages id="messages">
+      <fd:label><i18n:text 
i18n:catalogue="local">message.label</i18n:text></fd:label>
+    </fd:messages>
+
+               <fd:output id="id">
+                       <fd:datatype base="string"/>
+               </fd:output>
+
+               <fd:field id="name" required="true">
+                       <fd:label><i18n:text 
i18n:catalogue="local">query.name.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">query.name.hint</i18n:text></fd:hint>
+                       <fd:datatype base="string"/>
+               </fd:field>
+
+               <fd:output id="type">
+                       <fd:datatype base="string"/>
+               </fd:output>
+
+               <fd:output id="bool">
+                       <fd:datatype base="string"/>
+               </fd:output>
+
+               <fd:field id="size" required="true">
+                       <fd:label><i18n:text 
i18n:catalogue="local">paging.size.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">paging.size.hint</i18n:text></fd:hint>
+                       <fd:datatype base="long"/>
+                       <fd:selection-list>
+                               <fd:item value="10"/>
+                               <fd:item value="20"/>
+                               <fd:item value="30"/>
+                               <fd:item value="40"/>
+                               <fd:item value="50"/>
+                       </fd:selection-list>
+               </fd:field>
+
+               <fd:output id="page">
+                       <fd:label><i18n:text 
i18n:catalogue="local">paging.page.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">paging.page.hint</i18n:text></fd:hint>
+                       <fd:datatype base="long"/>
+               </fd:output>
+
+               <fd:output id="total">
+                       <fd:label><i18n:text 
i18n:catalogue="local">paging.total.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">paging.total.hint</i18n:text></fd:hint>
+                       <fd:datatype base="long"/>
+               </fd:output>
+
+               <fd:submit id="cancel" action-command="cancel" validate="false">
+                       <fd:label><i18n:text 
i18n:catalogue="local">cancel.label</i18n:text></fd:label>
+                       <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: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> 
+        
+               <fd:field id="term" required="true">
+                       <fd:label><i18n:text 
i18n:catalogue="local">criterion.term.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">criterion.term.hint</i18n:text></fd:hint>
+                       <fd:datatype base="string"/>
+               </fd:field>
+               
+               <fd:field id="field" required="true">
+                       <fd:label><i18n:text 
i18n:catalogue="local">criterion.field.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">criterion.field.hint</i18n:text></fd:hint>
+                       <fd:datatype base="string">
+                               <fd:validation>
+                                       <fd:length min="2" max="64"/>
+                               </fd:validation>
+                       </fd:datatype>
+                       <fd:selection-list src="forms/simple-fields.xml"/>
+               </fd:field>
+
+               <fd:output id="match">
+                       <fd:label><i18n:text 
i18n:catalogue="local">criterion.match.label</i18n:text>: </fd:label>
+                       <fd:hint><i18n:text 
i18n:catalogue="local">criterion.match.hint</i18n:text></fd:hint>
+                       <fd:datatype base="string"/>
+               </fd:output>
+       
+  </fd:widgets>
+</fd:form>
\ No newline at end of file

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/forms/simple-template.xml
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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.
+-->
+
+<!-- The CForms Template for editing Query Beans -->
+<!-- $Id: simple-template.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<page 
+       xmlns:ft="http://apache.org/cocoon/forms/1.0#template"; 
+       xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"; 
+       xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+>
+       <title>
+               <i18n:text i18n:catalogue="local">search.page.title</i18n:text> 
: <i18n:text i18n:catalogue="local">simple.page.title</i18n:text>
+       </title>
+       <content>
+               <p><i18n:text 
i18n:catalogue="local">simple.page.note</i18n:text></p>
+               <ft:form-template action="" method="POST">
+                       <ft:continuation-id/>
+                       <p class="woody-message"><ft:widget id="messages"/></p>
+                       <fi:group>
+                               <fi:styling layout="columns"/>
+                               <fi:hint>editor layout</fi:hint>
+                               <fi:items>
+                                       <ft:widget id="field"/>
+                                       <ft:widget id="term"/>
+                                       <hr/>
+                                       <ft:widget id="name"/>
+                                       <ft:widget id="size"/>
+                                       <hr/>
+                               </fi:items>
+                       </fi:group>
+                       <i18n:text 
i18n:catalogue="local">required.note</i18n:text>
+                       <ft:widget id="cancel"/>
+                       <ft:widget id="submit"/>
+               </ft:form-template>
+       </content>
+</page>
\ No newline at end of file

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_en.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_en.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_en.xml 
(added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_en.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: messages.xml 54581 2004-10-11 13:30:17Z jeremy $ -->
+<catalogue>
+
+       <!-- these keys are bound to your Index Field names -->
+       <!-- these keys are used for the Field Menu -->
+  <message key="field.abstract.label">Document Abstract</message>
+  <message key="field.answer.label">FAQ Answer</message>
+  <message key="field.any.label">Any Document field</message>
+  <message key="field.code.label">Document Code</message>
+  <message key="field.link.label">Document Link</message>
+  <message key="field.p.label">Document Paragraph</message>
+  <message key="[EMAIL PROTECTED]">Author Name</message>
+  <message key="field.question.label">FAQ</message>
+  <message key="[EMAIL PROTECTED]">Level 1 Section Title</message>
+  <message key="[EMAIL PROTECTED]">Level 2 Section Title</message>
+  <message key="field.source.label">Sample Source Code</message>
+  <message key="field.title.label">Document Title</message>
+
+       <!-- these keys are bound to your Index Field names -->
+       <!-- these keys are used to describe the queries -->
+  <message key="search.abstract.field">document abstract</message>
+  <message key="search.answer.field">faq answer</message>
+  <message key="search.any.field">any field</message>
+  <message key="search.code.field">document code</message>
+  <message key="search.link.field">document link</message>
+  <message key="search.p.field">document paragraph</message>
+  <message key="[EMAIL PROTECTED]">author name</message>
+  <message key="search.question.field">faq question</message>
+  <message key="[EMAIL PROTECTED]">section 1 title </message>
+  <message key="[EMAIL PROTECTED]">section 2 title</message>
+  <message key="search.source.field">sample source</message>
+  <message key="search.title.field">document title</message>
+  
+  <!-- advanced query -->
+  <message key="advanced.criterion.label">Criterion</message>
+  <message key="advanced.page.note">You can edit and save this query for later 
use.</message>
+  <message key="advanced.page.title">An advanced query</message>
+  <message key="advanced.query.label">Query</message>
+       <!-- cancel button -->
+  <message key="cancel.hint">cancel this edit</message>
+  <message key="cancel.label">Cancel</message>
+       <!-- editing criteria -->
+  <message key="criterion.add.hint">add a new criterion</message>
+  <message key="criterion.add.label">Add Criterion</message>
+  <message key="criterion.delete.hint">delete this criterion</message>
+  <message key="criterion.delete.label">-</message>
+  <message key="criterion.field.hint">which fields to search in</message>
+  <message key="criterion.field.label">Search Field</message>
+  <message key="criterion.match.hint">the way your search term is 
matched</message>
+  <message key="criterion.match.label">Match</message>
+  <message key="criterion.term.hint">the word or words you are searching 
for</message>
+  <message key="criterion.term.label">Word or Words</message>
+       <!-- displaying history -->
+  <message key="history.date.label">Time</message>
+  <message key="history.edit.hint">edit this query</message>
+  <message key="history.edit.label">Edit</message>
+  <message key="history.hits.label">Hits</message>
+  <message key="history.none">No History</message>
+  <message key="history.page.title">Query Bean : History</message>
+  <message key="history.queries.title">Queries</message>
+  <message key="history.query.label">Query</message>
+  <message key="history.search.hint">re-search this query</message>
+  <message key="history.search.label">Search</message>
+  <message key="history.title.label">Title</message>
+  <message key="history.cleared.note">Your query history has been 
cleared.</message>
+  <message key="history.save.label">Save</message>
+  <message key="history.save.hint">save this query in your favourites</message>
+  <!-- displaying favourites -->
+  <message key="favourites.page.title">Search Favourites</message>
+  <message key="favourites.queries.title">Queries</message>
+  <message key="favourites.date.label">Date</message>
+  <message key="favourites.query.label">Query</message>
+  <message key="favourites.title.label">Title</message>
+  <message key="favourites.search.label">Search</message>
+  <message key="favourites.search.hint">perform a search using this 
favourite</message>
+  <message key="favourites.delete.label">Delete</message>
+  <message key="favourites.delete.hint">permanently delete this 
favourite</message>
+  <message key="cancel.save.note">you cancelled your save</message>
+  <message key="history.title.label">Title</message>
+  <message key="search.fave.hint">one of your favourite searches</message>  
+       <!-- linking -->
+  <message key="link.home.hint">the query bean samples home page</message>
+  <message key="link.home.label">Home</message>
+       <!-- new queries -->
+  <message key="new.advanced.hint">perform complex multi-criteria 
searches</message>
+  <message key="new.advanced.label">New Advanced Query</message>
+  <message key="new.simple.hint">perform simple single-criteria 
searches</message>
+  <message key="new.simple.label">New Simple Query</message>
+       <!-- query paging -->
+  <message key="paging.page.hint">the page to start from</message>
+  <message key="paging.page.label">Page</message>
+  <message key="paging.size.hint">how many hits per page</message>
+  <message key="paging.size.label">Hits</message>
+  <message key="paging.total.hint">how many hits this query gave last time it 
was used</message>
+  <message key="paging.total.label">Results</message>
+       <!-- bool field -->
+  <message key="query.bool.hint">the way your criteria match</message>
+  <message key="query.bool.label">Search Criteria</message>
+  <!-- name field -->
+  <message key="query.name.hint">the name this query will have in the 
history</message>
+  <message key="query.name.label">Query Name</message>
+       <!-- these keys are bound to values in the SimpleLuceneQuery -->
+  <message key="search..bool">that match</message>
+  <message key="search.and.bool">that match all of</message>
+  <message key="search.or.bool">that match some of</message>
+       <!-- titles -->
+  <message key="search.advanced.title">Advanced Query</message>
+  <message key="search.edit.title">Edit this Query</message>
+  <message key="search.favourites.title">Favourites</message>
+  <message key="search.history.title">History</message>
+  <message key="search.clearhistory.title">Clear History</message>
+  <message key="search.new.title">New Query</message>
+  <message key="search.page.title">Query Bean</message>
+  <message key="search.query.title">Query</message>
+  <message key="search.section.title">Documents</message>
+  <message key="search.simple.title">Simple Query</message>
+  <message key="search.subject.title">Documents</message>
+       <!-- these keys are bound to values in the SimpleLuceneCriterion -->
+  <message key="search.all.match">contains all words in</message>
+  <message key="search.any.match">contains any word in</message>
+  <message key="search.like.match">is somthing like</message>
+  <message key="search.not.match">does not contain</message>
+  <message key="search.phrase.match">contains the phrase</message>
+       <!-- labels -->
+  <message key="search.criteria.label">these criteria</message>
+  <message key="search.criterion.label">this criterion</message>
+  <message key="search.next.label">next</message>
+  <message key="search.pagecount.label">Number of pages</message>
+  <message key="search.pagenumber.label">Page</message>
+  <message key="search.pagesize.label">Hits per page</message>
+  <message key="search.previous.label">previous</message>
+  <message key="search.rank.label">Rank</message>
+  <message key="search.recordcount.label">Total hits</message>
+  <message key="search.score.label">Score</message>
+  <message key="search.title.label">Title</message>
+  <message key="search.uri.label">URI</message>
+       <!-- hints -->
+  <message key="search.edit.hint">you can edit this Query or save it for 
future use</message>
+  <message key="search.favourites.hint">view and edit your favourite 
queries</message>
+  <message key="search.history.hint">view your search history</message>
+  <message key="search.new.hint">create a new query of the same type as this 
one</message>
+       <!-- notes -->
+  <message key="search.norecords.note">no results from your search, please try 
again</message>
+  <message key="simple.page.note">Enter some words and hit submit.</message>
+  <message key="simple.page.title">A simple query</message>
+       <message key="required.note">* required</message>
+       <message key="cancel.note">you cancelled your edit</message>
+       <!-- tips -->
+       <message key="query.tip.title">Query Tips</message>
+       <message key="query.tip.high">
+               <p>You can reduce the number of hits like this:
+                       <ul>
+                               <li>Try adding one or more criteria that match 
using "does not contain", to remove unwanted hits.</li>
+                               <li>Try searching in specific fields instead of 
all fields.</li>
+                               <li>Try requiring that all of your search 
criteria are matched, instead of just some of them.</li>
+                               <li>Try increasing the number of required 
criteria.</li>
+                               <li>Try using the match "contains the phrase" 
or "contains all words in".</li>
+                       </ul>
+               </p>
+       </message>
+       <message key="query.tip.low">
+               <p>You can increase the number of hits like this:
+                       <ul>
+                               <li>Try searching in all fields rather than a 
specific field.</li>
+                               <li>Try matching your words using "is somthing 
like" or "contains any word in".</li>
+                               <li>Try allowing the query to only match some 
of your criteria, instead of all of them.</li>
+                               <li>Try increasing the number of non-required 
criteria.</li>
+                       </ul>
+               </p>
+       </message>
+       <message key="query.tip.prohibited">
+               <p>All of your criteria are matched using  "does not contain", 
this query will not work until you add at least one criterion that positively 
finds something, then the prohibiting criteria can filter hits from that 
one.</p>
+       </message>      
+       <!-- errors -->
+  <message key="search.error.noquery">There was no query</message>
+  <message key="search.error.nohistory">You have no history at the 
moment</message>
+  <message key="search.error.noindex">You need to make a Lucene Index first 
(click <a href="create.html">here</a> to make one)</message>
+  <message key="error.invalid.content">The content you wanted indexed did not 
exist, this sample indexes 'docs/xdocs', please ensure you have built Cocoon's 
documentation.</message>
+  
+       <!-- submit button -->
+  <message key="submit.hint">save changes and search</message>
+  <message key="submit.label">Submit</message>
+       
+</catalogue>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_es.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_es.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_es.xml 
(added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/i18n/messages_es.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,200 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: messages.xml 54581 2004-10-11 13:30:17Z jeremy $ -->
+<catalogue>
+
+       <!-- these keys are bound to your Index Field names -->
+       <!-- these keys are used for the Field Menu -->
+  <message key="field.abstract.label">Resumen del Documento</message>
+  <message key="field.answer.label">Respuesta de preguntas frecuentes</message>
+  <message key="field.any.label">Cualquier campo del documento</message>
+  <message key="field.code.label">CÃÂdigo del documento</message>
+  <message key="field.link.label">Enlace del documento</message>
+  <message key="field.p.label">PÃÂrrafo del documento</message>
+  <message key="[EMAIL PROTECTED]">Nombre del autor</message>
+  <message key="field.question.label">Pregunta Frecuente</message>
+  <message key="[EMAIL PROTECTED]">TÃÂtulo de secciÃÂn nivel 1</message>
+  <message key="[EMAIL PROTECTED]">TÃÂtulo de secciÃÂn nivel 2</message>
+  <message key="field.source.label">CÃÂdigo fuente del ejemplo</message>
+  <message key="field.title.label">TÃÂtulo del documento</message>
+
+       <!-- these keys are bound to your Index Field names -->
+       <!-- these keys are used to describe the queries -->
+  <message key="search.abstract.field">Resumen del documento</message>
+  <message key="search.answer.field">faq respuesta</message>
+  <message key="search.any.field">cualquier campo</message>
+  <message key="search.code.field">cÃÂdigo del documento</message>
+  <message key="search.link.field">enlace del documento</message>
+  <message key="search.p.field">pÃÂrrafo del documento</message>
+  <message key="[EMAIL PROTECTED]">nombre del autor</message>
+  <message key="search.question.field">faq pregunta</message>
+  <message key="[EMAIL PROTECTED]">tÃÂtulo de secciÃÂn 1</message>
+  <message key="[EMAIL PROTECTED]">tÃÂtulo de secciÃÂn 2</message>
+  <message key="search.source.field">fuente de ejemplo</message>
+  <message key="search.title.field">tÃÂtulo del documento</message>
+
+  <!-- advanced query -->
+  <message key="advanced.criterion.label">Criterio</message>
+  <message key="advanced.page.note">Puede editar y guardar esta consulta para 
usarla despuÃÂs.</message>
+  <message key="advanced.page.title">Una consulta avanzada</message>
+  <message key="advanced.query.label">Consulta</message>
+       <!-- cancel button -->
+  <message key="cancel.hint">Cancelar esta ediciÃÂn</message>
+  <message key="cancel.label">Cancelar</message>
+       <!-- editing criteria -->
+  <message key="criterion.add.hint">Agregar un criterio nuevo</message>
+  <message key="criterion.add.label">Agregar criterio</message>
+  <message key="criterion.delete.hint">Borrar este criterio</message>
+  <message key="criterion.delete.label">Borrar</message>
+  <message key="criterion.field.hint">Cuales campos se deben buscar 
en</message>
+  <message key="criterion.field.label">Campo de bÃÂsqueda</message>
+  <message key="criterion.match.hint">La forma en que sus tÃÂrminos de 
bÃÂsqueda se cumplen</message>
+  <message key="criterion.match.label">Cumple</message>
+  <message key="criterion.term.hint">La palabra o palabras que busca</message>
+  <message key="criterion.term.label">Palabra o palabras</message>
+       <!-- displaying history -->
+  <message key="history.date.label">Tiempo</message>
+  <message key="history.edit.hint">Editar esta consulta</message>
+  <message key="history.edit.label">Editar</message>
+  <message key="history.hits.label">Aciertos</message>
+  <message key="history.none">Sin historia</message>
+  <message key="history.page.title">Haba de Consulta : Historia</message>
+  <message key="history.queries.title">Consultas</message>
+  <message key="history.query.label">Consulta</message>
+  <message key="history.search.hint">Re-buscar esta consulta</message>
+  <message key="history.search.label">Buscar</message>
+  <message key="history.title.label">TÃÂtulos</message>
+  <message key="history.cleared.note">Su historia de bÃÂsquedas esta 
limpia.</message>
+  <message key="history.save.label">Guardar</message>
+  <message key="history.save.hint">Guarde esta bÃÂsqueda en sus 
favoritos.</message>
+  <!-- displaying favourites -->
+  <message key="favourites.page.title">Consultas favoritas</message>
+  <message key="favourites.queries.title">Consultas</message>
+  <message key="favourites.date.label">Fecha</message>
+  <message key="favourites.query.label">Consulta</message>
+  <message key="favourites.title.label">TÃÂtulo</message>
+  <message key="favourites.search.label">BÃÂsqueda</message>
+  <message key="favourites.search.hint">Buscar utilizando este 
favorito.</message>
+  <message key="favourites.delete.label">Borrar</message>
+  <message key="favourites.delete.hint">Borre permanentemente este 
favorito.</message>
+  <message key="cancel.save.note">Guardar esta bÃÂsqueda fuÃÂ 
cancelado.</message>
+  <message key="history.title.label">TÃÂtulo</message>
+  <message key="search.fave.hint">Una de sus bÃÂsquedas favoritas.</message> 
 
+       <!-- linking -->
+  <message key="link.home.hint">PÃÂgina principal de los ejemplo de haba de 
consulta</message>
+  <message key="link.home.label">Hogar</message>
+       <!-- new queries -->
+  <message key="new.advanced.hint">ejecute bÃÂsquedas complejas de multiples 
criterios</message>
+  <message key="new.advanced.label">Nueva consulta avanzada</message>
+  <message key="new.simple.hint">ejecute bÃÂsqueda simple de un solo 
criterio</message>
+  <message key="new.simple.label">Nueva consulta simple</message>
+       <!-- query paging -->
+  <message key="paging.page.hint">la pÃÂgina desde la cual se 
inicia</message>
+  <message key="paging.page.label">PÃÂgina</message>
+  <message key="paging.size.hint">cuantos aciertos por pÃÂgina</message>
+  <message key="paging.size.label">Aciertos</message>
+  <message key="paging.total.hint">cuantos aciertos tuvo esta consulta la 
ÃÂltima vez que fue usada</message>
+  <message key="paging.total.label">Resultados</message>
+       <!-- bool field -->
+  <message key="query.bool.hint">la forma en que sus criterios se 
cumplen</message>
+  <message key="query.bool.label">Criterios de BÃÂsqueda</message>
+  <!-- name field -->
+  <message key="query.name.hint">el nombre que esta consulta tendrÃÂ en la 
historia</message>
+  <message key="query.name.label">Nombre de la Consulta</message>
+       <!-- these keys are bound to values in the SimpleLuceneQuery -->
+  <message key="search..bool">que cumple</message>
+  <message key="search.and.bool">que cumple todo de </message>
+  <message key="search.or.bool">que cumple algo de</message>
+       <!-- titles -->
+  <message key="search.advanced.title">Consulta avanzada</message>
+  <message key="search.edit.title">Editar esta consulta</message>
+  <message key="search.favourites.title">Favoritos</message>
+  <message key="search.history.title">Historia</message>
+  <message key="search.clearhistory.title">Limpiar Historia</message>
+  <message key="search.new.title">Nueva Consulta</message>
+  <message key="search.page.title">Haba de Consulta</message>
+  <message key="search.query.title">Consulta</message>
+  <message key="search.section.title">Documentos</message>
+  <message key="search.simple.title">Consulta Simple</message>
+  <message key="search.subject.title">Documentos</message>
+       <!-- these keys are bound to values in the SimpleLuceneCriterion -->
+  <message key="search.all.match">contiene todas las palabras en</message>
+  <message key="search.any.match">contiene cualquier palabra en</message>
+  <message key="search.like.match">es parecido a</message>
+  <message key="search.not.match">no contiene</message>
+  <message key="search.phrase.match">contiene la frase</message>
+       <!-- labels -->
+  <message key="search.criteria.label">estos criterios</message>
+  <message key="search.criterion.label">este criterio</message>
+  <message key="search.next.label">siguiente</message>
+  <message key="search.pagecount.label">NÃÂmero de pÃÂginas</message>
+  <message key="search.pagenumber.label">PÃÂgina</message>
+  <message key="search.pagesize.label">Aciertos por pÃÂginas</message>
+  <message key="search.previous.label">anterior</message>
+  <message key="search.rank.label">Fila</message>
+  <message key="search.recordcount.label">Total de aciertos</message>
+  <message key="search.score.label">Puntaje</message>
+  <message key="search.title.label">TÃÂtulo</message>
+  <message key="search.uri.label">URI</message>
+       <!-- hints -->
+  <message key="search.edit.hint">puede editar esta consulta o guardarla para 
usarla luego</message>
+  <message key="search.favourites.hint">ver y editar sus consultas 
favoritas</message>
+  <message key="search.history.hint">ver su historia de consultas</message>
+  <message key="search.new.hint">crear una consulta nueva de este mismo 
tipo</message>
+       <!-- notes -->
+  <message key="search.norecords.note">sin resultados, favor trate de 
nuevo</message>
+  <message key="simple.page.note">Ingrese algunas palabras y pulse 
enviar.</message>
+  <message key="simple.page.title">una consulta simple</message>
+       <message key="required.note">* requerido</message>
+       <message key="cancel.note">cancelÃÂ su ediciÃÂn</message>
+       <!-- tips -->
+       <message key="query.tip.title">Consejos para las consultas</message>
+       <message key="query.tip.high">
+               <p>Para disminuir el nÃÂmero de aciertos, intente:
+                       <ul>
+                               <li>Agregar uno o mÃÂs criterios que cumplan 
usando "no contiene", para eliminar los aciertos no deseados.</li>
+                               <li>Buscar en campos especÃÂficos en lugar de 
todos los campos.</li>
+                               <li>Requieriendo que todas sus criterios de 
bÃÂsqueda sean encontrados, en lugar de solo algunos de ellos.</li>
+                               <li>Aumentando el nÃÂmero de criterios 
requeridos.</li>
+                               <li>Use "contiene la frase" o "contiene todas 
las palabras en".</li>
+                       </ul>
+               </p>
+       </message>
+       <message key="query.tip.low">
+               <p>Para aumentar el nÃÂmero de aciertos, intente:
+                       <ul>
+                               <li>Buscar en todos los campos en lugar de 
buscar en un campo especifico.</li>
+                               <li>Buscar sus palabras usando "es como" o 
"contiene cualquier palabra en".</li>
+                               <li>Permitir a la consulta cumplir solo algunos 
de sus criterios en lugar de todos.</li>
+                               <li>Aumentando el nÃÂmero de criterios no 
requeridos.</li>
+                       </ul>
+               </p>
+       </message>
+       <message key="query.tip.prohibited">
+               <p>Todos sus criterios usan "no contiene", la consulta no 
funcionarÃÂ hasta que agrege al menos un criterio que positivamente encuentre 
algo, luego los criterios que prohiben podrÃÂn filtrar los aciertos de 
esta.</p>
+       </message>
+       <!-- errors -->
+  <message key="search.error.noquery">No habia una consulta</message>
+  <message key="search.error.nohistory">No tiene historia por el 
momento</message>
+  <message key="search.error.noindex">Debe hacer un ÃÂndice de Lucene 
primero (pulse <a href="create.html">aqui</a> para hacer uno)</message>
+  <message key="error.invalid.content">El contenido que deseaba indexar no 
existe, este ejemplo indexa 'docs/xdocs', asegÃÂrese de haber construido la 
documentaciÃÂn de Cocoon.</message>
+
+       <!-- submit button -->
+  <message key="submit.hint">guardar cambios y buscar</message>
+  <message key="submit.label">Enviar</message>
+</catalogue>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/resources/images/fave.jpg
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/resources/images/fave.jpg?view=auto&rev=157073
==============================================================================
Binary file - no diff available.

Propchange: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/resources/images/fave.jpg
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml 
(added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/cancelled.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+<page xmlns:t="http://apache.org/cocoon/templates/jx/1.0";
+  xmlns:i18n="http://apache.org/cocoon/i18n/2.1";>
+       <title>Cancelled</title>
+       <content>
+               <p><i18n:text i18n:catalogue="local">#{message}</i18n:text></p>
+       </content>
+</page>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml?view=auto&rev=157073
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml 
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/error.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $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";>
+       <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>
+       </content>
+</page>
\ No newline at end of file

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/favourites.xml
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,92 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: history.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<page
+       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
+       xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+       >
+       <title><i18n:text 
i18n:catalogue="local">favourites.page.title</i18n:text></title>
+       <content>
+               <p class="links"> 
+                       <a href="simple.html" title="local:new.simple.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.simple.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="advanced.html" title="local:new.advanced.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.advanced.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="history.html" 
title="local:search.history.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">search.history.title</i18n:text></a>
+                       <span> | </span>
+                       <a href="welcome" title="local:link.home.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">link.home.label</i18n:text></a>
+               </p>
+               <jx:choose>
+                       <jx:when test="${queries!=null}">
+                               <p class="favourites.title">
+                                       <i18n:text 
i18n:catalogue="local">favourites.queries.title</i18n:text>: 
+                                       <span class="favourites.count"><jx:out 
value="${queries.size()}"/></span>
+                               </p>
+                               <table width="100%" class="query.favourites" 
summary="Query Favourites">
+                                       <tr>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">favourites.date.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">favourites.title.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">favourites.query.label</i18n:text></th>
+                                       </tr>
+                                       <jx:forEach var="item" 
items="${queries}">
+                                               <tr valign="top">
+                                                       <td 
class="favourites.date">
+                                                               <jx:formatDate 
value="${item.date}" type="date" dateStyle="short"/>
+                                                       </td><td 
class="favourites.name">
+                                                               <a 
href="${item.type}.html?fid=${item.id}" title="local:favourites.search.hint" 
i18n:attr="title">${item.name}</a>
+                                                       </td><td 
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">
+                                                                       
<i18n:text i18n:catalogue="local">search.${item.bool}.bool</i18n:text>
+                                                               </span>
+                                                               <span 
class="query.criteria">
+                                                                       
<jx:choose>
+                                                                               
<jx:when test="${item.criteria.size() == 1}">
+                                                                               
        <i18n:text i18n:catalogue="local">search.criterion.label</i18n:text>:
+                                                                               
</jx:when>
+                                                                               
<jx:otherwise>
+                                                                               
        <i18n:text i18n:catalogue="local">search.criteria.label</i18n:text>:
+                                                                               
</jx:otherwise>
+                                                                       
</jx:choose>
+                                                                       <ul>
+                                                                               
<jx:forEach var="crit" items="${item.criteria}">
+                                                                               
        <li>
+                                                                               
                <span class="query.criterion-field" 
title="local:criterion.field.hint" i18n:attr="title">
+                                                                               
                        <i18n:text 
i18n:catalogue="local">search.${crit.field}.field</i18n:text>
+                                                                               
                </span>
+                                                                               
                <span class="query.criterion-match" 
title="local:criterion.match.hint" i18n:attr="title">
+                                                                               
                        <i18n:text 
i18n:catalogue="local">search.${crit.match}.match</i18n:text>
+                                                                               
                </span>
+                                                                               
                <span class="query.criterion-value" 
title="local:criterion.value.hint" 
i18n:attr="title">ÃÂÂ${crit.term}ÃÂÂ</span>
+                                                                               
        </li>
+                                                                               
</jx:forEach>
+                                                                       </ul>
+                                                               </span>
+                                                       </td><td>
+                                                               <a 
href="remove-favourite.html?fid=${item.id}" 
title="local:favourites.delete.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">favourites.delete.label</i18n:text></a>
+                                                       </td>
+                                               </tr>
+                                       </jx:forEach>
+                               </table>
+                       </jx:when>
+                       <jx:otherwise>
+                               <i18n:text 
i18n:catalogue="local">favourites.none</i18n:text>
+                       </jx:otherwise>
+               </jx:choose>
+       </content>
+</page>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml 
(added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/history.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,105 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: history.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<page
+       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
+       xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+       >
+       <title><i18n:text 
i18n:catalogue="local">history.page.title</i18n:text></title>
+       <content>
+               <p class="links"> 
+                       <a href="simple.html" title="local:new.simple.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.simple.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="advanced.html" title="local:new.advanced.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.advanced.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="favourites.html" 
title="local:search.favourites.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">search.favourites.title</i18n:text></a>
+                       <span> | </span>
+                       <a href="welcome" title="local:link.home.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">link.home.label</i18n:text></a>
+               </p>
+               <jx:choose>
+                       <jx:when test="${history != null &amp;&amp; 
history.size()!=0}">
+                               <p class="history.title">
+                                       <i18n:text 
i18n:catalogue="local">history.queries.title</i18n:text>: 
+                                       <span class="history.count"><jx:out 
value="${history.size()}"/></span>
+                               </p>
+                               <table width="100%" class="query.history" 
summary="Query History">
+                                       <tr>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">history.date.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">history.title.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">history.query.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">history.hits.label</i18n:text></th>
+                                       </tr>
+                                       <jx:forEach var="item" 
items="${history}">
+                                               <tr valign="top">
+                                                       <td 
class="history.date">
+                                                               <jx:if 
test="${item.query.date != null}">
+                                                                       
<jx:formatDate value="${item.query.date}" type="time"/>
+                                                               </jx:if>
+                                                       </td><td 
class="history.name">
+                                                               <a 
href="${item.query.type}.html?hid=${item.id}&amp;page=${item.query.page}" 
title="local:history.search.hint" i18n:attr="title">${item.query.name}</a>
+                                                       </td><td 
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">
+                                                                       
<i18n:text i18n:catalogue="local">search.${item.query.bool}.bool</i18n:text>
+                                                               </span>
+                                                               <span 
class="query.criteria">
+                                                                       
<jx:choose>
+                                                                               
<jx:when test="${item.query.criteria.size() == 1}">
+                                                                               
        <i18n:text i18n:catalogue="local">search.criterion.label</i18n:text>:
+                                                                               
</jx:when>
+                                                                               
<jx:otherwise>
+                                                                               
        <i18n:text i18n:catalogue="local">search.criteria.label</i18n:text>:
+                                                                               
</jx:otherwise>
+                                                                       
</jx:choose>
+                                                                       <ul>
+                                                                               
<jx:forEach var="crit" items="${item.query.criteria}">
+                                                                               
        <li>
+                                                                               
                <span class="query.criterion-field" 
title="local:criterion.field.hint" i18n:attr="title">
+                                                                               
                        <i18n:text 
i18n:catalogue="local">search.${crit.field}.field</i18n:text>
+                                                                               
                </span>
+                                                                               
                <span class="query.criterion-match" 
title="local:criterion.match.hint" i18n:attr="title">
+                                                                               
                        <i18n:text 
i18n:catalogue="local">search.${crit.match}.match</i18n:text>
+                                                                               
                </span>
+                                                                               
                <span class="query.criterion-value" 
title="local:criterion.value.hint" 
i18n:attr="title">ÃÂÂ${crit.term}ÃÂÂ</span>
+                                                                               
        </li>
+                                                                               
</jx:forEach>
+                                                                       </ul>
+                                                               </span>
+                                                       </td><td 
class="query.hitcount">
+                                                               
${item.query.total}
+                                                       </td><td>
+                                                               <a 
href="${item.query.type}.html?hid=${item.id}" title="local:history.edit.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">history.edit.label</i18n:text></a>
+                                                       </td><td align="center">
+                                                               <jx:choose>
+                                                                       
<jx:when test="${item.query.id == null}">
+                                                                               
<a href="add-favourite.html?hid=${item.id}" title="local:history.save.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">history.save.label</i18n:text></a>
+                                                                       
</jx:when>
+                                                                       
<jx:otherwise><span title="local:search.fave.hint" i18n:attr="title"><img 
src="images/fave.jpg" alt="favourite"/></span></jx:otherwise>
+                                                               </jx:choose>
+                                                       </td>
+                                               </tr>
+                                       </jx:forEach>
+                               </table>
+                               <a href="clear-history.html"><i18n:text 
i18n:catalogue="local">search.clearhistory.title</i18n:text></a>
+                       </jx:when>
+                       <jx:otherwise>
+                               <p class="history.queries-none"><i18n:text 
i18n:catalogue="local">history.none</i18n:text></p>
+                       </jx:otherwise>
+               </jx:choose>
+       </content>
+</page>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml?view=auto&rev=157073
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml 
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/index.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,104 @@
+<?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.
+-->
+<!-- $Id: index.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<page>
+       <title>Query Bean Samples</title>
+       <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>
+               
+               <h3>Search</h3>
+               <p>You can perform any of the following search types:</p>
+               <ul>
+                       <li>Quick search: 
+                               <form action="simple.html">
+                                       <input type="text" name="query" 
size="20" value="cocoon"/>
+                                       <input type="submit" value="Search" />
+                               </form>
+      </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>
+               <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>
+               <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).
+               </p><p>
+                       The results are in the form of a <code>List</code> of 
<code>Map</code>s. Each Map represents a search hit. It contains the 
<code>url</code>, <code>score</code> and <code>rank</code> of the document, 
plus any Index Fields you arranged to have stored in your Index by Lucene (in 
this sample, the only stored field is the <code>title</code>).
+               </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>
+               <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>
+               
+               <h3>How to reuse this sample in your own projects?</h3>
+                       <h4>Reuse the existing forms</h4>
+                       <p>If you are happy with the existing forms, then all 
that really needs to happen to be able to re-use this sample in your own 
projects it to set up the menu of Search Fields, so they match your Search 
Index.</p>
+                       <p>When the Lucene Index of Cocoon Documentation that 
this sample uses is created, tags within the documents are turned into Lucene 
Index Fields, which can be searched individually. The names of these fields are 
for example: <code>title</code>, <code>question</code>, <code>source</code>, 
<code>[EMAIL PROTECTED]</code> etc.</p>
+                       <p>Cocoon Forms is setup to load these menus 
(selection-lists) from their own files. The <code>simple</code> search form 
uses the file <a 
href="forms/simple-fields.xml?cocoon-view=pretty-content">forms/simple-fields.xml</a>,
 while the <code>advanced</code> search form uses the file <a 
href="forms/advanced-fields.xml?cocoon-view=pretty-content">forms/advanced-fields.xml</a>.</p>
+                       <p>Edit these files to match your own Search Index, for 
example, the item:
+                               <pre><![CDATA[
+<fd:item value="title">
+       <fd:label><i18n:text 
i18n:catalogue="local">field.title.label</i18n:text></fd:label>
+</fd:item>
+]]></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.
+                       </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>
+
+                       <h4>New Forms</h4>
+                               <p>If you know CForms, it would be relatively 
easy to develop your own Forms (<a 
href="forms/advanced-model.xml?cocoon-view=pretty-content">Model</a>, <a 
href="forms/advanced-binding.xml?cocoon-view=pretty-content">Binding</a> and <a 
href="forms/advanced-template.xml?cocoon-view=pretty-content">Template</a>). If 
you follow the existing naming scheme and you choose a new name for your form, 
it may not even be necessary to edit the <a 
href="sitemap.xmap?cocoon-view=pretty-content">Sitemap</a>.
+                               </p><p>Depending on how different your Forms 
are to the supplied ones, it may or may not be necessary to edit the 
FlowScript. It is quite possible that this will not be required.</p>
+                       <h4>New Beans</h4>
+                       <p>
+                               It is possible to build Lucene Queries that are 
more complex, or specialised than those produced by these sample Beans. To do 
so you would have to at least implement your own CriterionBean. You would 
probably need to rewrite the FlowScript to handle your new Bean. 
+                       </p>It would also be possible to implement different 
kinds of Queries, like those that used the Hibernate Criterion API.<p>
+                       </p><p>
+                               There are two Interfaces and two Bean 
Implementations of those Interfaces in the sample. 
<code>o.a.c.bean.query.SimpleLuceneQuery</code> and 
<code>o.a.c.bean.query.SimpleLuceneQueryBean</code> represent a Query, which 
has a Collection of <code>o.a.c.bean.query.SimpleLuceneCriterion</code> 
(<code>o.a.c.bean.query.SimpleLuceneCriterionBean</code>) Beans.
+                       </p><p>
+                               The <code>bool</code> property of the QueryBean 
specifies how the multiple criteria are combined. The <code>field</code> 
property of the CriterionBean specifies which Index Field to search, the 
<code>match</code> property specifies how to match that field and the 
<code>value</code> property, is the string from which Terms are extracted. All 
the rest is candy.
+                       </p>
+                       <h4>Persistance</h4>
+                       <p>Both the Query and Criterion Beans were designed to 
be Persistable using one of the Object-Relational mapping tools like Hibernate, 
OJB etc. This sample currently uses the HSQLDB instance built in to Cocoon.</p>
+       </content>
+</page>
+

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/lucene-indexer.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/lucene-indexer.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/lucene-indexer.xml
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/lucene-indexer.xml
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: results.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<lucene:index
+       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
+  xmlns:cinclude="http://apache.org/cocoon/include/1.0";
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0";   
+       analyzer="${analyzer}" 
+       directory="${directory}" 
+       create="${create}" 
+       merge-factor="${merge}"
+>
+       <jx:forEach var="entry" items="${files}">
+    <lucene:document url="${converter.convert(entry)}">
+      <cinclude:includexml ignoreErrors="true">
+        <cinclude:src>${content}${entry}</cinclude:src>
+      </cinclude:includexml>
+    </lucene:document>
+       </jx:forEach>
+</lucene:index>
\ No newline at end of file

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml 
(added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/screens/results.xml 
Fri Mar 11 04:52:08 2005
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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.
+-->
+
+<!-- $Id: results.xml 30942 2004-07-29 20:16:54Z vgritsenko $ -->
+<page
+       xmlns:jx="http://apache.org/cocoon/templates/jx/1.0";
+       xmlns:i18n="http://apache.org/cocoon/i18n/2.1";
+       >
+       <title><i18n:text 
i18n:catalogue="local">${result.query.type}.page.title</i18n:text>: 
${result.query.name}</title>
+       <content>
+               <!-- description of the query -->
+               <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">
+                               <i18n:text 
i18n:catalogue="local">search.${result.query.bool}.bool</i18n:text>
+                       </span>
+                       <span class="query.criteria">
+                               <jx:choose>
+                                       <jx:when 
test="${result.query.criteria.size() == 1}">
+                                               <i18n:text 
i18n:catalogue="local">search.criterion.label</i18n:text>:
+                                       </jx:when>
+                                       <jx:otherwise>
+                                               <i18n:text 
i18n:catalogue="local">search.criteria.label</i18n:text>:
+                                       </jx:otherwise>
+                               </jx:choose>
+                               <ul>
+                                       <jx:forEach var="item" 
items="${result.query.criteria}">
+                                               <li>
+                                                       <span 
class="query.criterion-field" title="local:criterion.field.hint" 
i18n:attr="title">
+                                                               <i18n:text 
i18n:catalogue="local">search.${item.field}.field</i18n:text>
+                                                       </span>
+                                                       <span 
class="query.criterion-match" title="local:criterion.match.hint" 
i18n:attr="title">
+                                                               <i18n:text 
i18n:catalogue="local">search.${item.match}.match</i18n:text>
+                                                       </span>
+                                                       <span 
class="query.criterion-value" title="local:criterion.value.hint" 
i18n:attr="title">ÃÂÂ${item.term}ÃÂÂ.</span>
+                                               </li>
+                                       </jx:forEach>
+                               </ul>
+                       </span>
+               </p>
+               <!-- links -->
+               <p class="links">
+                       <a href="${result.query.type}.html?hid=${result.id}" 
title="local:search.edit.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">search.edit.title</i18n:text></a>
+                       <span> | </span>
+                       <a href="history.html" 
title="local:search.history.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">search.history.title</i18n:text></a>
+                       <span> | </span>
+                       <a href="favourites.html" 
title="local:search.favourites.hint" i18n:attr="title"><i18n:text 
i18n:catalogue="local">search.favourites.title</i18n:text></a>
+                       <span> | </span>
+                       <a href="simple.html" title="local:new.simple.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.simple.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="advanced.html" title="local:new.advanced.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">new.advanced.label</i18n:text></a>
+                       <span> | </span>
+                       <a href="welcome" title="local:link.home.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">link.home.label</i18n:text></a>
+                       <span> | </span>
+                       <jx:choose>
+                               <jx:when test="${result.query.id == null}">
+                                       <a 
href="add-favourite.html?hid=${result.id}" title="local:history.save.hint" 
i18n:attr="title"><i18n:text 
i18n:catalogue="local">history.save.label</i18n:text></a>
+                               </jx:when>
+                               <jx:otherwise><span 
title="local:search.fave.hint" i18n:attr="title"><img src="images/fave.jpg" 
alt="favourite"/></span></jx:otherwise>
+                       </jx:choose>                    
+               </p>
+               <!-- paging -->
+               <title><i18n:text 
i18n:catalogue="local">search.section.title</i18n:text></title>
+               <jx:choose>
+                       <jx:when test="#{count(result/results) > 0}">
+                               <jx:if test="#{count(result/nav/index) > 1}">
+                                       <div class="query.paging">
+                                               <p>
+                                                       <span 
class="query.pagenumber"><i18n:text 
i18n:catalogue="local">search.pagenumber.label</i18n:text>: 
#{format-number(result/nav/page+1,'#')}.</span>
+                                                       <span 
class="query.pagecount"><i18n:text 
i18n:catalogue="local">search.pagecount.label</i18n:text>: 
#{result/nav/pages}.</span>
+                                                       <span 
class="query.hitcount"><i18n:text 
i18n:catalogue="local">search.recordcount.label</i18n:text>: 
#{result/nav/total}.</span>
+                                                       <span 
class="query.pagesize"><i18n:text 
i18n:catalogue="local">search.pagesize.label</i18n:text>: 
#{result/nav/size}.</span>
+                                               </p>
+                                               <p class="query.navigation">
+                                                       <jx:if 
test="#{result/nav/prev}">
+                                                               <span 
class="query.prev">
+                                                                       <a 
href="${result.query.type}.html?page=#{result/nav/prev}&amp;hid=${result.id}"><i18n:text
 i18n:catalogue="local">search.previous.label</i18n:text></a>&#160;
+                                                               </span>
+                                                       </jx:if>
+                                                       <jx:if 
test="#{result/nav/firstIndex != 0}"><span class="query.prev-dots"> ... 
</span></jx:if>
+                                                       <jx:set var="THIS" 
value="#{result/nav/page}"/>
+                                                       <jx:forEach 
items="#{result/nav/index}">
+                                                               <jx:choose>
+                                                                       
<jx:when test="#{$THIS != .}"><span class="query.page-link"> <a 
href="${result.query.type}.html?page=#{.}&amp;hid=${result.id}">#{format-number(.+1,'#')}</a>
 </span></jx:when>
+                                                                       
<jx:otherwise><span class="query.this-page"> #{format-number(.+1,'#')} 
</span></jx:otherwise>
+                                                               </jx:choose>
+                                                       </jx:forEach>
+                                                       <jx:if 
test="#{result/nav/lastIndex &lt; result/nav/pages - 1}"><span 
class="query.next-dots"> ... </span></jx:if>
+                                                       <jx:if 
test="#{result/nav/next}">
+                                                               <span 
class="query.next">
+                                                                       <a 
href="${result.query.type}.html?page=#{result/nav/next}&amp;hid=${result.id}"><i18n:text
 i18n:catalogue="local">search.next.label</i18n:text></a>
+                                                               </span>
+                                                       </jx:if>
+                                               </p>
+                                       </div>
+                               </jx:if>
+                               <!-- results -->
+                               <table class="query.results" summary="search 
results">
+                                       <tr>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">search.rank.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">search.score.label</i18n:text></th>
+                                               <th align="left"><i18n:text 
i18n:catalogue="local">search.title.label</i18n:text></th>
+                                       </tr>
+                                       <jx:forEach var="item" 
items="#{result/results}">
+                                               <jx:set var="score" 
value="${item[Packages.org.apache.cocoon.bean.query.SimpleLuceneQueryBean.SCORE_FIELD]}"/>
+                                               <jx:set var="index" 
value="${item[Packages.org.apache.cocoon.bean.query.SimpleLuceneQueryBean.INDEX_FIELD]}"/>
+                                               <jx:set var="url" 
value="${item[Packages.org.apache.cocoon.components.search.LuceneXMLIndexer.URL_FIELD]}"/>
+                                               <tr>
+                                                       <td 
class="query.result-rank">#{format-number($index +1,'#')}</td>
+                                                       <td 
class="query.result-score">#{format-number($score,'##%')}</td>
+                                                       <td 
class="query.result-title"><a href="#{$url}"><jx:if test="#{string(title) = 
''}"><span class="query.result-url">#{url}</span></jx:if>#{title}</a></td>
+                                               </tr>
+                                       </jx:forEach>
+                               </table>
+                       </jx:when>
+                       <!-- no results -->
+                       <jx:otherwise>
+                               <p class="query.results-none"><i18n:text 
i18n:catalogue="local">search.norecords.note</i18n:text></p>
+                       </jx:otherwise>
+               </jx:choose>
+               <jx:if test="${result.tip != null}">
+                       <title><i18n:text 
i18n:catalogue="local">query.tip.title</i18n:text></title>
+                       <i18n:text 
i18n:catalogue="local">${result.tip}</i18n:text>
+               </jx:if>
+       </content>
+</page>

Added: cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap?view=auto&rev=157073
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap 
(added)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/sitemap.xmap Fri 
Mar 11 04:52:08 2005
@@ -0,0 +1,259 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!--
+  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: sitemap.xmap 56371 2004-11-02 13:17:20Z cziegeler $ -->
+<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
+
+<!-- =========================== Components 
=================================== -->
+
+       <map:components>
+               <map:transformers default="xslt">
+                       <map:transformer name="i18n" 
src="org.apache.cocoon.transformation.I18nTransformer">
+                               <catalogues default="forms">
+                                       <catalogue id="local" name="messages" 
location="i18n"/>
+                                       <catalogue id="forms" 
name="FormsMessages" location="context://samples/blocks/forms/messages"/>
+                               </catalogues>
+                               <cache-at-startup>true</cache-at-startup>
+                       </map:transformer>
+     <map:transformer name="lucene-indexer" 
src="org.apache.cocoon.transformation.LuceneIndexTransformer"/>
+               </map:transformers>
+               <map:pipes default="caching"/>
+       </map:components>
+
+<!-- =========================== FlowScripts 
=================================== -->
+
+       <map:flow language="javascript">
+               <map:script src="flow/query.js"/>
+               <map:script src="flow/indexer.js"/>
+       </map:flow>
+
+<!-- =========================== Views =================================== -->
+
+<map:views>
+  <map:view name="content" from-label="content">
+   <map:serialize type="xml"/>
+  </map:view>
+
+  <map:view from-label="content" name="pretty-content">
+   <map:transform src="context://stylesheets/system/xml2html.xslt"/>
+   <map:serialize type="html"/>
+  </map:view>
+
+  <map:view name="links" from-position="last">
+   <map:serialize type="links"/>
+  </map:view>
+
+</map:views>
+
+<!-- =========================== Pipelines ================================= 
-->
+
+<map:pipelines>
+
+               <map:component-configurations>
+                       <global-variables>
+                               <history>_query_bean_history_</history><!-- the 
name of the Session Attribute, used to store History -->
+                               
<lucene-analyzer>org.apache.lucene.analysis.standard.StandardAnalyzer</lucene-analyzer><!--
 the name of the Lucene Analyzer to use -->  
+                               <!--+
+                                               |               The path to the 
Lucene Index to use. 
+                                               |
+                                               |       If you supply an 
absolute path, this will be used as-is
+                                               |       If you supply a 
non-absolute path, this will be used inside the 
+                                               |               servlet's 
work-directory. If stored here, it will be destroyed on shutdown.
+                                               |
+                                               +-->
+                               <lucene-directory>cocoon-docs</lucene-directory>
+                       </global-variables>
+               </map:component-configurations>
+
+               <map:pipeline internal-only="true">
+               
+                       <map:act type="locale">
+                       
+                               <!-- displays the forms -->
+                               <map:match pattern="form/*">
+                                       <map:generate type="jx" 
src="forms/{1}-template.xml"/>
+                                       <map:transform type="forms">
+                                               <map:parameter name="locale" 
value="{../locale}"/>  
+                                       </map:transform>
+                                       <map:transform type="i18n">
+                                               <map:parameter name="locale" 
value="{../locale}"/>  
+                                       </map:transform>
+                                       <map:transform 
src="context://samples/blocks/forms/resources/forms-samples-styling.xsl"/>
+                                       <map:transform 
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+                                               <map:parameter 
name="contextPath" value="{request:contextPath}"/>
+                                       </map:transform>
+                                       <map:serialize/>
+                               </map:match>
+
+                               <!-- prepare the document for indexing -->
+                               <map:match pattern="prepare4indexing/**">
+                                       <map:generate src="{1}"/>
+                                       <map:transform 
src="stylesheets/content2lucene.xsl"/>
+                                       <map:serialize type="xml"/>
+                               </map:match>
+
+                               <!-- the lucene indexer -->
+                               <map:match pattern="screen/indexer">
+                                       <map:generate type="jx" 
src="screens/lucene-indexer.xml"/>
+                                       <map:transform type="cinclude"/>
+                                       <map:transform type="lucene-indexer"/>
+                                       <map:transform 
src="stylesheets/lucene2simple-page.xsl"/>
+                                       <map:transform 
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+                                               <map:parameter 
name="contextPath" value="{request:contextPath}"/>
+                                       </map:transform>
+                                       <map:serialize/>
+                               </map:match>
+       
+                               <!-- displays the rest of the screens -->
+                               <map:match pattern="screen/*">
+                                       <map:generate type="jx" 
src="screens/{1}.xml"/>
+                                       <map:transform type="i18n">
+                                               <map:parameter name="locale" 
value="{../locale}"/>  
+                                       </map:transform>
+                                       <map:transform 
src="context://samples/common/style/xsl/html/simple-page2html.xsl">
+                                               <map:parameter 
name="contextPath" value="{request:contextPath}"/>
+                                       </map:transform>
+                                       <map:serialize/>
+                               </map:match>
+                               
+                       </map:act>
+
+               </map:pipeline>
+  
+               <map:pipeline>
+
+                       <!--                                    
+                        Used for CForms Continuations
+                       
+                        must be placed before external page pipelines
+                        and after internal screen pipelines
+                        otherwise you get infinite loops                       
                 
+                       -->                             
+                       <map:match type="request-parameter" 
pattern="continuation-id">
+                               <map:call continuation="{1}"/>
+                       </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="images/**">
+               <map:read src="resources/images/{1}"/>
+      </map:match>
+
+
+                       <!-- create the index -->
+                       <map:match pattern="create.html">
+                               <map:call function="createIndex">
+                                       <map:parameter name="screen" 
value="screen/indexer"/>
+                                       <map:parameter name="lucene-directory" 
value="{global:lucene-directory}"/>
+                                       <map:parameter name="lucene-analyzer" 
value="{global:lucene-analyzer}"/>
+                                       <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:call>
+                       </map:match>
+
+                       <!-- list history -->
+                       <map:match pattern="history.html">
+                               <map:call function="showHistory">
+                                       <map:parameter name="screen" 
value="screen/history"/>
+                                       <map:parameter name="history" 
value="{global:history}"/>
+                               </map:call>
+                       </map:match>
+                       
+                       <!-- clear history -->
+                       <map:match pattern="clear-history.html">
+                               <map:call function="clearHistory">
+                                       <map:parameter name="screen" 
value="screen/history"/>
+                                       <map:parameter name="history" 
value="{global:history}"/>
+                               </map:call>
+                       </map:match>
+
+                       <!-- list favourites -->
+                       <map:match pattern="favourites.html">
+                               <map:call function="showFavourites">
+                                       <map:parameter name="screen" 
value="screen/favourites"/>
+                                       <map:parameter name="user-id" 
value="anon"/>
+                                       <!-- NB. this value is for testing .... 
it is more likely you would use a value like the commented out one below -->
+                                       <!--<map:parameter name="user-id" 
value="{session-context:authentication/authentication/ID}"/>-->
+                               </map:call>
+                       </map:match>
+
+                       <!-- add a history item to the favourites, using the 
history ID -->
+                       <map:match pattern="add-favourite.html">
+                               <map:call function="addFavourite">
+                                       <map:parameter name="screen" 
value="screen/favourites"/>
+                                       <map:parameter name="user-id" 
value="anon"/>
+                                       <!-- NB. this value is for testing .... 
it is more likely you would use a value like the commented out one below -->
+                                       <!--<map:parameter name="user-id" 
value="{session-context:authentication/authentication/ID}"/>-->
+                                       <map:parameter name="hid" 
value="{request-param:hid}"/>
+                                       <map:parameter name="history" 
value="{global:history}"/>
+                               </map:call>
+                       </map:match>
+
+                       <!-- remove an item from the favourites, using the 
favourite ID -->
+                       <map:match pattern="remove-favourite.html">
+                               <map:call function="removeFavourite">
+                                       <map:parameter name="screen" 
value="screen/favourites"/>
+                                       <map:parameter name="user-id" 
value="anon"/>
+                                       <!-- NB. this value is for testing .... 
it is more likely you would use a value like the commented out one below -->
+                                       <!--<map:parameter name="user-id" 
value="{session-context:authentication/authentication/ID}"/>-->
+                                       <map:parameter name="fid" 
value="{request-param:fid}"/>
+                               </map:call>
+                       </map:match>
+
+                       <!-- do the searches -->
+                       <map:match pattern="*.html">
+                               <map:call function="doSearch">
+                                       <map:parameter name="form" 
value="form/{1}"/>
+                                       <map:parameter name="form-definition" 
value="forms/{1}-model.xml"/>
+                                       <map:parameter name="bindingURI" 
value="forms/{1}-binding.xml"/>
+                                       <map:parameter name="lucene-directory" 
value="{global:lucene-directory}"/>
+                                       <map:parameter name="lucene-analyzer" 
value="{global:lucene-analyzer}"/>
+                                       <map:parameter name="screen" 
value="screen/results"/>
+                                       <map:parameter name="history" 
value="{global:history}"/>
+                                       <map:parameter name="type" value="{1}"/>
+                                       <map:parameter name="hid" 
value="{request-param:hid}"/>
+                                       <map:parameter name="fid" 
value="{request-param:fid}"/>
+                                       <map:parameter name="page" 
value="{request-param:page}"/>
+                                       <map:parameter name="query" 
value="{request-param:query}"/>
+                                       <map:parameter name="match" 
value="{request-param:match}"/>
+                                       <map:parameter name="field" 
value="{request-param:field}"/>
+                                       <map:parameter name="size" 
value="{request-param:size}"/>
+                                       <map:parameter name="bool" 
value="{request-param:bool}"/>
+                               </map:call>
+                       </map:match>
+
+                       <!-- used in the docs, to show files -->
+                       <map:match pattern="**.xml">
+                               <map:generate src="{1}.xml"/>
+                               <map:serialize type="xml"/>
+                       </map:match>
+
+               </map:pipeline>
+       </map:pipelines>
+
+</map:sitemap>

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/content2lucene.xsl
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,41 @@
+<?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: content2lucene.xsl 36225 2004-08-11 14:36:46Z vgritsenko $ -->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+  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="[EMAIL PROTECTED]|[EMAIL PROTECTED]">
+               <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>
+               
+  <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:template match="comment()"></xsl:template>
+  
+  
+</xsl:stylesheet> 
\ No newline at end of file

Added: 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl
URL: 
http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl?view=auto&rev=157073
==============================================================================
--- 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl
 (added)
+++ 
cocoon/branches/BRANCH_2_1_X/src/blocks/querybean/samples/stylesheets/lucene2simple-page.xsl
 Fri Mar 11 04:52:08 2005
@@ -0,0 +1,57 @@
+<?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: content2lucene.xsl 36225 2004-08-11 14:36:46Z vgritsenko $ -->
+<xsl:stylesheet
+  version="1.0"
+  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
+  xmlns:lucene="http://apache.org/cocoon/lucene/1.0"; 
+>
+  <xsl:template match="lucene:index">
+    <page>
+      <title>Lucene Index</title>
+      <content>
+        <p>
+          <small>
+            <a href="welcome">Welcome</a>
+          </small>
+        </p>
+        <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>
+
+  <xsl:template match="lucene:document">
+    <tr>
+      <td><xsl:value-of select="@url"/></td>
+      <td><xsl:value-of select="@elapsed-time"/></td>
+    </tr>
+  </xsl:template>
+
+  <xsl:template match="@*|node()" priority="-1"></xsl:template>
+  <xsl:template match="text()" priority="-1"></xsl:template>
+  
+</xsl:stylesheet> 
\ No newline at end of file


Reply via email to