You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by jl...@apache.org on 2012/10/07 15:32:05 UTC

svn commit: r1395298 [39/42] - in /ofbiz/trunk/applications/content/template/docbook: ./ assembly/ assembly/schema/ common/ doc/ docsrc/ eclipse/ epub/ epub/bin/ epub/bin/lib/ epub/bin/xslt/ epub3/ extensions/ fo/ highlighting/ html/ htmlhelp/ images/ ...

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js Sun Oct  7 13:31:52 2012
@@ -0,0 +1,881 @@
+/*----------------------------------------------------------------------------
+ * JavaScript for webhelp search
+ *----------------------------------------------------------------------------
+ This file is part of the webhelpsearch plugin for DocBook WebHelp
+ Copyright (c) 2007-2008 NexWave Solutions All Rights Reserved.
+ www.nexwave.biz Nadege Quaine
+ http://kasunbg.blogspot.com/ Kasun Gajasinghe
+ */
+
+//string initialization
+var htmlfileList = "htmlFileInfoList.js";
+var htmlfileinfoList = "htmlFileInfoList.js";
+var useCJKTokenizing = false;
+
+var w = new Object();
+var scoring = new Object();
+
+var searchTextField = '';
+var no = 0;
+var noWords = 0;
+var partialSearch = "<font class=\"highlightText\">There is no page containing all the search terms.<br>Partial results:</font>";
+var warningMsg = '<div style="padding: 5px;margin-right:5px;;background-color:#FFFF00;">';
+warningMsg+='<b>Please note that due to security settings, Google Chrome does not highlight';
+warningMsg+=' the search results in the right frame.</b><br>';
+warningMsg+='This happens only when the WebHelp files are loaded from the local file system.<br>';
+warningMsg+='Workarounds:';
+warningMsg+='<ul>';
+warningMsg+='<li>Try using another web browser.</li>';
+warningMsg+='<li>Deploy the WebHelp files on a web server.</li>';
+warningMsg+='</div>';
+txt_filesfound = 'Results';
+txt_enter_at_least_1_char = "You must enter at least one character.";
+txt_enter_more_than_10_words = "Only first 10 words will be processed.";
+txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended.";
+txt_please_wait = "Please wait. Search in progress...";
+txt_results_for = "Results for: ";
+
+/* This function verify the validity of search input by the user
+  Cette fonction verifie la validite de la recherche entrre par l utilisateur */
+function Verifie(searchForm) {
+
+    // Check browser compatibility
+    if (navigator.userAgent.indexOf("Konquerer") > -1) {
+
+        alert(txt_browser_not_supported);
+        return;
+    }
+
+    searchTextField = trim(document.searchForm.textToSearch.value);
+    searchTextField = searchTextField.replace(/['"]/g,'');
+	var expressionInput = searchTextField;
+    $.cookie('textToSearch', expressionInput);
+
+    if (expressionInput.length < 1) {
+
+        // expression is invalid
+        alert(txt_enter_at_least_1_char);
+        // reactive la fenetre de search (utile car cadres)
+
+        document.searchForm.textToSearch.focus();
+    }
+    else {
+    var splitSpace = searchTextField.split(" ");
+       var splitWords = [];
+        for (var i = 0 ; i < splitSpace.length ; i++) {
+          var splitDot = splitSpace[i].split(".");
+          for (var i1 = 0; i1 < splitDot.length; i1++) {
+               var splitColon = splitDot[i1].split(":");
+            for (var i2 = 0; i2 < splitColon.length; i2++) {
+                var splitDash = splitColon[i2].split("-");
+                 for (var i3 = 0; i3 < splitDash.length; i3++) {
+                     if (splitDash[i3].split("").length > 0) {
+                           splitWords.push(splitDash[i3]);
+                       }
+                 }
+            }
+          }
+       }
+       noWords = splitWords;
+    	if (noWords.length > 9){
+          // Allow to search maximum 10 words
+    		alert(txt_enter_more_than_10_words);
+    		expressionInput = '';
+    		for (var x = 0 ; x < 10 ; x++){
+    			expressionInput = expressionInput + " " + noWords[x]; 
+    		}    		
+    		Effectuer_recherche(expressionInput);
+    		document.searchForm.textToSearch.focus();
+    	} else {
+	        // Effectuer la recherche
+             expressionInput = '';
+          for (var x = 0 ; x < noWords.length ; x++) {
+                 expressionInput = expressionInput + " " + noWords[x]; 
+             }
+	        Effectuer_recherche(expressionInput);
+	        // reactive la fenetre de search (utile car cadres)
+	        document.searchForm.textToSearch.focus();        
+    	}
+    }
+}
+
+var stemQueryMap = new Array();  // A hashtable which maps stems to query words
+
+/* This function parses the search expression, loads the indices and displays the results*/
+function Effectuer_recherche(expressionInput) {
+
+    /* Display a waiting message */
+    //DisplayWaitingMessage();
+
+    /*data initialisation*/
+    var searchFor = "";       // expression en lowercase et sans les caracte    res speciaux
+    //w = new Object();  // hashtable, key=word, value = list of the index of the html files
+    scriptLetterTab = new Scriptfirstchar(); // Array containing the first letter of each word to look for
+    var wordsList = new Array(); // Array with the words to look for
+    var finalWordsList = new Array(); // Array with the words to look for after removing spaces
+    var linkTab = new Array();
+    var fileAndWordList = new Array();
+    var txt_wordsnotfound = "";
+
+
+    // --------------------------------------
+    // Begin Thu's patch 
+    /*nqu: expressionInput, la recherche est lower cased, plus remplacement des char speciaux*/
+    //The original replacement expression is: 
+    //searchFor = expressionInput.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/\.|%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, "</").replace(/_di_/g, "%24_");
+    //The above expression was error prone because it did not deal with words that have a . as part of the word correctly, for example, document.txt
+    
+    //Do not automatically replace a . with a space
+    searchFor = expressionInput.toLowerCase().replace(/<\//g, "_st_").replace(/\$_/g, "_di_").replace(/%2C|%3B|%21|%3A|@|\/|\*/g, " ").replace(/(%20)+/g, " ").replace(/_st_/g, "</").replace(/_di_/g, "%24_");
+    
+    //If it ends with a period, replace it with a space
+    searchFor = searchFor.replace(/[.]$/,"");
+    // End Thu's Patch
+    // ------------------------------------------
+
+    searchFor = searchFor.replace(/  +/g, " ");
+    searchFor = searchFor.replace(/ $/, "").replace(/^ /, "");
+
+    wordsList = searchFor.split(" ");
+    wordsList.sort();
+
+    //set the tokenizing method
+    useCJKTokenizing = typeof indexerLanguage != "undefined" && (indexerLanguage == "zh" || indexerLanguage == "ja" || indexerLanguage == "ko");
+    //If Lucene CJKTokenizer was used as the indexer, then useCJKTokenizing will be true. Else, do normal tokenizing.
+    // 2-gram tokenizinghappens in CJKTokenizing, 
+    //If doStem then make tokenize with Stemmer
+    var finalArray;
+    if (doStem){
+	    if(useCJKTokenizing){
+	        finalWordsList = cjkTokenize(wordsList);
+          finalArray = finalWordsList;
+	    } else { 
+	        finalWordsList = tokenize(wordsList);
+          finalArray = finalWordsList;
+	    }
+    } else if(useCJKTokenizing){
+          finalWordsList = cjkTokenize(wordsList);
+          finalArray = finalWordsList;
+         } else{
+
+    //load the scripts with the indices: the following lines do not work on the server. To be corrected
+    /*if (IEBrowser) {
+     scriptsarray = loadTheIndexScripts (scriptLetterTab);
+     } */
+
+    /**
+     * Compare with the indexed words (in the w[] array), and push words that are in it to tempTab.
+     */
+    var tempTab = new Array();
+	
+    // ---------------------------------------
+    // Thu's patch
+    //Do not use associative array in for loop, for example:
+    //for(var t in finalWordsList)
+    //it causes errors when finalWordList contains 
+    //stemmed words such as: kei from the stemmed word: key
+    for(var t=0;t<finalWordsList.length;++t){
+        var aWord=finalWordsList[t];
+        //w is a Map like Object, use the current word in finalWordList as the key
+        if(w[aWord] == undefined){
+            txt_wordsnotfound += aWord + " ";
+	        }
+        else{
+            tempTab.push(aWord);
+    		}
+    	}
+    	finalWordsList = tempTab;		
+    //Check all the inputs to see if the root words are in the finalWordsList, if not add them there
+    var inputs = expressionInput.split(' ');
+    // Thu's Patch 
+    // -------------------------------------------
+
+    
+    txt_wordsnotfound = expressionInput;
+	finalWordsList = removeDuplicate(finalWordsList);
+    
+   }
+    if (finalWordsList.length) {
+      //search 'and' and 'or' one time
+      fileAndWordList = SortResults(finalWordsList);
+      
+      if (fileAndWordList == undefined){
+        	var cpt = 0;
+      } else {
+      	  var cpt = fileAndWordList.length;
+		  var maxNumberOfWords = fileAndWordList[0][0].motsnb;
+      }
+	  if (cpt > 0){
+		var searchedWords = noWords.length;
+		var foundedWords  = fileAndWordList[0][0].motslisteDisplay.split(",").length;
+		//console.info("search : " + noWords.length + "   found : " + fileAndWordList[0][0].motslisteDisplay.split(",").length);
+		if (searchedWords != foundedWords){
+			linkTab.push(partialSearch);
+		}
+	  }
+	  
+      
+      for (var i = 0; i < cpt; i++) {
+			
+			var hundredProcent = fileAndWordList[i][0].scoring + 100 * fileAndWordList[i][0].motsnb;
+			var ttScore_first = fileAndWordList[i][0].scoring;
+			var numberOfWords = fileAndWordList[i][0].motsnb;
+			
+            if (fileAndWordList[i] != undefined) {
+                linkTab.push("<p>" + txt_results_for + " " + "<span class=\"searchExpression\">" + fileAndWordList[i][0].motslisteDisplay + "</span>" + "</p>");
+
+                linkTab.push("<ul class='searchresult'>");
+                for (t in fileAndWordList[i]) {
+                    //linkTab.push("<li><a href=\"../"+fl[fileAndWordList[i][t].filenb]+"\">"+fl[fileAndWordList[i][t].filenb]+"</a></li>");
+				                        
+                    var ttInfo = fileAndWordList[i][t].filenb;
+                    // Get scoring
+                    var ttScore = fileAndWordList[i][t].scoring;
+                    var tempInfo = fil[ttInfo];
+				    
+                    var pos1 = tempInfo.indexOf("@@@");
+                    var pos2 = tempInfo.lastIndexOf("@@@");
+                    var tempPath = tempInfo.substring(0, pos1);
+                    var tempTitle = tempInfo.substring(pos1 + 3, pos2);
+                    var tempShortdesc = tempInfo.substring(pos2 + 3, tempInfo.length);
+
+                    
+                    // toc.html will not be displayed on search result
+                    if (tempPath == 'toc.html'){
+                        continue;
+                    }
+                    /*
+                    //file:///home/kasun/docbook/WEBHELP/webhelp-draft-output-format-idea/src/main/resources/web/webhelp/installation.html
+                    var linkString = "<li><a href=" + tempPath + ">" + tempTitle + "</a>";
+                    // var linkString = "<li><a href=\"installation.html\">" + tempTitle + "</a>";
+                    */
+                    var split = fileAndWordList[i][t].motsliste.split(",");
+                    // var splitedValues = expressionInput.split(" ");
+					// var finalArray = split.concat(splitedValues);					
+					
+                    arrayString = 'Array(';
+                    for(var x in finalArray){
+                      if (finalArray[x].length > 2 || useCJKTokenizing){
+                    		arrayString+= "'" + finalArray[x] + "',";
+                    	} 
+                    }
+                    arrayString = arrayString.substring(0,arrayString.length - 1) + ")";
+                    var idLink = 'foundLink' + no;
+                    var linkString = '<li><a id="' + idLink + '" href="' + tempPath + '" class="foundResult">' + tempTitle + '</a>';
+                    var starWidth = (ttScore * 100/ hundredProcent)/(ttScore_first/hundredProcent) * (numberOfWords/maxNumberOfWords);
+                    starWidth = starWidth < 10 ? (starWidth + 5) : starWidth;
+                    // Keep the 5 stars format
+                    if (starWidth > 85){
+						starWidth = 85;
+					}
+					/*
+					var noFullStars = Math.ceil(starWidth/17);
+					var fullStar  = "curr";
+					var emptyStar = "";
+					if (starWidth % 17 == 0){
+						// am stea plina
+						
+					} else {
+						
+					}
+					console.info(noFullStars);
+					*/
+                    // Also check if we have a valid description
+                    if ((tempShortdesc != "null" && tempShortdesc != '...')) {
+                    
+                        linkString += "\n<div class=\"shortdesclink\">" + tempShortdesc + "</div>";
+                    }
+                    linkString += "</li>";
+                    
+                    // Add rating values for scoring at the list of matches	
+					linkString += "<div id=\"rightDiv\">";
+					linkString += "<div id=\"star\">";
+					//linkString += "<div style=\"color: rgb(136, 136, 136);\" id=\"starUser0\" class=\"user\">" 
+					//				+ ((ttScore * 100/ hundredProcent)/(ttScore_first/hundredProcent)) * 1 + "</div>";
+	                linkString += "<ul id=\"star0\" class=\"star\">";
+					linkString += "<li id=\"starCur0\" class=\"curr\" style=\"width: " + starWidth + "px;\"></li>";
+	                linkString += "</ul>";
+	                
+	                linkString += "<br style=\"clear: both;\">";
+	                linkString += "</div>";
+					linkString += "</div>";
+                    //linkString += '<b>Rating: ' + ttScore + '</b>';
+                                           
+                    linkTab.push(linkString);
+                    no++;
+                }
+                linkTab.push("</ul>");
+            }
+        }
+    }
+
+    var results = "";
+    if (linkTab.length > 0) { 
+        /*writeln ("<p>" + txt_results_for + " " + "<span class=\"searchExpression\">"  + cleanwordsList + "</span>" + "<br/>"+"</p>");*/
+        results = "<p>";
+        //write("<ul class='searchresult'>");
+        for (t in linkTab) {
+            results += linkTab[t].toString();
+        }
+        results += "</p>";
+    } else {
+        results = "<p>" + localeresource.search_no_results + " <span class=\"searchExpression\">" + txt_wordsnotfound + "</span>" + "</p>";
+    }
+    
+    
+    // Verify if the browser is Google Chrome and the WebHelp is used on a local machine
+    // If browser is Google Chrome and WebHelp is used on a local machine a warning message will appear
+    // Highlighting will not work in this conditions. There is 2 workarounds
+    if (verifyBrowser()){
+        document.getElementById('searchResults').innerHTML = results;
+    } else {
+        document.getElementById('searchResults').innerHTML = warningMsg + results;
+    }
+    
+}
+
+
+// Verify if the stemmed word is aproximately the same as the searched word
+function verifyWord(word, arr){
+	for (var i = 0 ; i < arr.length ; i++){
+		if (word[0] == arr[i][0] 
+			&& word[1] == arr[i][1] 
+			//&& word[2] == arr[i][2]
+			){
+			return true;
+		}
+	}
+	return false;
+}
+
+// Look for elements that start with searchedValue.
+function wordsStartsWith(searchedValue){
+	var toReturn = '';
+	for (var sv in w){
+		if (searchedValue.length < 3){
+			continue;
+		} else {
+			if (sv.toLowerCase().indexOf(searchedValue.toLowerCase()) == 0){
+				toReturn+=sv + ","; 
+			}
+		}
+	}
+	return toReturn.length > 0 ? toReturn : undefined;
+}
+
+
+function tokenize(wordsList){
+    var stemmedWordsList = new Array(); // Array with the words to look for after removing spaces
+    var cleanwordsList = new Array(); // Array with the words to look for
+    // -------------------------------------------------
+    // Thu's patch
+    for(var j=0;j<wordsList.length;++j){
+        var word = wordsList[j];
+        var originalWord=word;
+        if(typeof stemmer != "undefined" ){
+            var stemmedWord=stemmer(word);
+            if(w[stemmedWord]!=undefined){
+            stemQueryMap[stemmer(word)] = word;
+            }
+            else{
+                stemQueryMap[originalWord]=originalWord;
+            }
+        } else {
+            if(w[word]!=undefined){
+            stemQueryMap[word] = word;
+        }
+            else{
+                stemQueryMap[originalWord]=originalWord;
+            }
+        }
+    } 
+     //stemmedWordsList is the stemmed list of words separated by spaces.
+    for (var t=0;t<wordsList.length;++t) {
+        wordsList[t] = wordsList[t].replace(/(%22)|^-/g, "");
+        if (wordsList[t] != "%20") {
+            scriptLetterTab.add(wordsList[t].charAt(0));
+            cleanwordsList.push(wordsList[t]);
+        }
+    }
+
+    if(typeof stemmer != "undefined" ){
+        //Do the stemming using Porter's stemming algorithm
+        for (var i = 0; i < cleanwordsList.length; i++) {			
+            var stemWord = stemmer(cleanwordsList[i]);			
+            if(w[stemWord]!=undefined){
+            stemmedWordsList.push(stemWord);
+        }
+            else{
+                stemmedWordsList.push(cleanwordsList[i]);               
+            }
+        }
+    // End Thu's patch
+    // -------------------------------------------
+    } else {
+        stemmedWordsList = cleanwordsList;
+    }
+    return stemmedWordsList;
+}
+
+//Invoker of CJKTokenizer class methods.
+function cjkTokenize(wordsList){
+    var allTokens= new Array();
+    var notCJKTokens= new Array();
+    var j=0;
+    for(j=0;j<wordsList.length;j++){
+        var word = wordsList[j];
+        if(getAvgAsciiValue(word) < 127){
+            notCJKTokens.push(word);
+        } else { 
+            var tokenizer = new CJKTokenizer(word);
+            var tokensTmp = tokenizer.getAllTokens();
+            allTokens = allTokens.concat(tokensTmp);
+        }
+    }
+    allTokens = allTokens.concat(tokenize(notCJKTokens));
+    return allTokens;
+}
+
+//A simple way to determine whether the query is in english or not.
+function getAvgAsciiValue(word){
+    var tmp = 0;
+    var num = word.length < 5 ? word.length:5;
+    for(var i=0;i<num;i++){
+        if(i==5) break;
+        tmp += word.charCodeAt(i);
+    }
+    return tmp/num;
+}
+
+//CJKTokenizer
+function CJKTokenizer(input){
+    this.input = input;
+    this.offset=-1;
+    this.tokens = new Array(); 
+    this.incrementToken = incrementToken;
+    this.tokenize = tokenize;
+    this.getAllTokens = getAllTokens;
+    this.unique = unique;
+
+    function incrementToken(){
+		if(this.input.length - 2 <= this.offset){
+		//	console.log("false "+offset);
+			return false;
+		}
+		else {
+			this.offset+=1;
+			return true;
+		}
+	}
+
+	function tokenize(){
+		//document.getElementById("content").innerHTML += x.substring(offset,offset+2)+"<br>";
+		return this.input.substring(this.offset,this.offset+2);
+	}
+
+	function getAllTokens(){
+		while(this.incrementToken()){
+			var tmp = this.tokenize();
+			this.tokens.push(tmp);
+		}
+        return this.unique(this.tokens);
+//		document.getElementById("content").innerHTML += tokens+" ";
+//		document.getElementById("content").innerHTML += "<br>dada"+sortedTokens+" ";
+//		console.log(tokens.length+"dsdsds");
+		/*for(i=0;i<tokens.length;i++){
+			console.log(tokens[i]);
+			var ss = tokens[i] == sortedTokens[i];
+
+//			document.getElementById("content").innerHTML += "<br>dada"+un[i]+"- "+stems[i]+"&nbsp;&nbsp;&nbsp;"+ ss;
+			document.getElementById("content").innerHTML += "<br>"+sortedTokens[i];
+		}*/
+	}
+
+	function unique(a)
+	{
+	   var r = new Array();
+	   o:for(var i = 0, n = a.length; i < n; i++)
+	   {
+	      for(var x = 0, y = r.length; x < y; x++)
+	      {
+		 if(r[x]==a[i]) continue o;
+	      }
+	      r[r.length] = a[i];
+	   }
+	   return r;
+	} 
+}
+
+
+/* Scriptfirstchar: to gather the first letter of index js files to upload */
+function Scriptfirstchar() {
+    this.strLetters = "";
+    this.add = addLettre;
+}
+
+function addLettre(caract) {
+
+    if (this.strLetters == 'undefined') {
+        this.strLetters = caract;
+    } else if (this.strLetters.indexOf(caract) < 0) {
+        this.strLetters += caract;
+    }
+
+    return 0;
+}
+/* end of scriptfirstchar */
+
+/*main loader function*/
+/*tab contains the first letters of each word looked for*/
+function loadTheIndexScripts(tab) {
+
+    //alert (tab.strLetters);
+    var scriptsarray = new Array();
+
+    for (var i = 0; i < tab.strLetters.length; i++) {
+
+        scriptsarray[i] = "..\/search" + "\/" + tab.strLetters.charAt(i) + ".js";
+    }
+    // add the list of html files
+    i++;
+    scriptsarray[i] = "..\/search" + "\/" + htmlfileList;
+
+    //debug
+    for (var t in scriptsarray) {
+        //alert (scriptsarray[t]);
+    }
+
+    tab = new ScriptLoader();
+    for (t in scriptsarray) {
+        tab.add(scriptsarray[t]);
+    }
+    tab.load();
+    //alert ("scripts loaded");
+    return (scriptsarray);
+}
+
+/* ScriptLoader: to load the scripts and wait that it's finished */
+function ScriptLoader() {
+    this.cpt = 0;
+    this.scriptTab = new Array();
+    this.add = addAScriptInTheList;
+    this.load = loadTheScripts;
+    this.onScriptLoaded = onScriptLoadedFunc;
+}
+
+function addAScriptInTheList(scriptPath) {
+    this.scriptTab.push(scriptPath);
+}
+
+function loadTheScripts() {
+    var script;
+    var head;
+
+    head = document.getElementsByTagName('head').item(0);
+
+    //script = document.createElement('script');
+
+    for (var el in this.scriptTab) {
+        //alert (el+this.scriptTab[el]);
+        script = document.createElement('script');
+        script.src = this.scriptTab[el];
+        script.type = 'text/javascript';
+        script.defer = false;
+
+        head.appendChild(script);
+    }
+
+}
+
+function onScriptLoadedFunc(e) {
+    e = e || window.event;
+    var target = e.target || e.srcElement;
+    var isComplete = true;
+    if (typeof target.readyState != undefined) {
+
+        isComplete = (target.readyState == "complete" || target.readyState == "loaded");
+    }
+    if (isComplete) {
+        ScriptLoader.cpt++;
+        if (ScriptLoader.cpt == ScriptLoader.scripts.length) {
+            ScriptLoader.onLoadComplete();
+        }
+    }
+}
+
+/*
+function onLoadComplete() {
+    alert("loaded !!");
+} */
+
+/* End of scriptloader functions */
+ 
+// Array.unique( strict ) - Remove duplicate values
+function unique(tab) {
+    var a = new Array();
+    var i;
+    var l = tab.length;
+
+    if (tab[0] != undefined) {
+        a[0] = tab[0];
+    }
+    else {
+        return -1;
+    }
+
+    for (i = 1; i < l; i++) {
+        if (indexof(a, tab[i], 0) < 0) {
+            a.push(tab[i]);
+        }
+    }
+    return a;
+}
+function indexof(tab, element, begin) {
+    for (var i = begin; i < tab.length; i++) {
+        if (tab[i] == element) {
+            return i;
+        }
+    }
+    return -1;
+
+}
+/* end of Array functions */
+
+
+/*
+ Param: mots= list of words to look for.
+ This function creates an hashtable:
+ - The key is the index of a html file which contains a word to look for.
+ - The value is the list of all words contained in the html file.
+
+ Return value: the hashtable fileAndWordList
+ */
+function SortResults(mots) {
+
+    var fileAndWordList = new Object();
+    if (mots.length == 0 || mots[0].length == 0) {
+        return null;
+    }
+    
+    
+    // In generated js file we add scoring at the end of the word
+    // Example word1*scoringForWord1,word2*scoringForWord2 and so on
+    // Split after * to obtain the right values
+    var scoringArr = Array();
+    for (var t in mots) {
+        // get the list of the indices of the files.
+        var listNumerosDesFicStr = w[mots[t].toString()];
+
+        if (listNumerosDesFicStr != undefined) {
+
+            //alert ("listNumerosDesFicStr "+listNumerosDesFicStr);
+            var tab = listNumerosDesFicStr.split(",");
+            //for each file (file's index):
+            for (var t2 in tab) {
+                var tmp = '';
+                var idx = '';
+                var temp = tab[t2].toString();
+                if (temp.indexOf('*') != -1) {
+                    idx = temp.indexOf('*');
+                    tmp = temp.substring(idx + 3, temp.length);
+                    temp = temp.substring(0, idx);
+                }
+                scoringArr.push(tmp);
+                if (fileAndWordList[temp] == undefined) {
+                    fileAndWordList[temp] = "" + mots[t];
+                } else {
+                    fileAndWordList[temp] += "," + mots[t];
+                }
+                //console.info("fileAndWordList[" + temp + "]=" + fileAndWordList[temp] + " : " + tmp);
+            }
+
+        }
+    }
+    var fileAndWordListValuesOnly = new Array();
+    // sort results according to values
+    var temptab = new Array();
+    finalObj = new Array();
+    for (t in fileAndWordList) {    	
+    	finalObj.push(new newObj(t,fileAndWordList[t]));
+    }
+
+    if ( finalObj.length == 0 ) {   // None of the queried words are not in the index (stemmed or not)
+        return null;
+    }
+    finalObj = removeDerivates(finalObj);
+    for (t in finalObj) {
+        tab = finalObj[t].wordList.split(',');
+        var tempDisplay = new Array();
+        for (var x in tab) {        		
+            if(stemQueryMap[tab[x]] != undefined && doStem){
+                tempDisplay.push(stemQueryMap[tab[x]]); //get the original word from the stem word.                
+            } else {
+                tempDisplay.push(tab[x]); //no stem is available. (probably a CJK language)
+            }
+        }
+        var tempDispString = tempDisplay.join(", ");
+				var index;
+				for (x in fileAndWordList) {
+					if (x === finalObj[t].filesNo) {
+						index = x;
+						break;
+					}
+				}
+				var scoring = findRating(fileAndWordList[index], index);	
+        temptab.push(new resultPerFile(finalObj[t].filesNo, finalObj[t].wordList, tab.length, tempDispString, scoring));
+        fileAndWordListValuesOnly.push(finalObj[t].wordList);        
+    }
+    fileAndWordListValuesOnly = unique(fileAndWordListValuesOnly);
+    fileAndWordListValuesOnly = fileAndWordListValuesOnly.sort(compare_nbMots);
+
+    var listToOutput = new Array();
+    for (var fawlvoIdx in fileAndWordListValuesOnly) {
+        for (t in temptab) {
+            if (temptab[t].motsliste == fileAndWordListValuesOnly[fawlvoIdx]) {
+                if (listToOutput[fawlvoIdx] == undefined) {
+                    listToOutput[fawlvoIdx] = new Array(temptab[t]);
+                } else {
+                    listToOutput[fawlvoIdx].push(temptab[t]);
+                }
+            }
+        }
+    }		
+  // Sort results by scoring, descending on the same group
+	for (var ltoIdx in listToOutput) {
+	    listToOutput[ltoIdx].sort(function(a, b){
+			return b.scoring - a.scoring;
+		});
+	}
+	// If we have groups with same number of words, 
+	// will sort groups by higher scoring of each group
+	for (var i = 0; i < listToOutput.length - 1; i++) {
+		for (var j = i + 1; j < listToOutput.length; j++) {
+			if (listToOutput[i][0].motsnb < listToOutput[j][0].motsnb 
+				|| (listToOutput[i][0].motsnb == listToOutput[j][0].motsnb
+				&& listToOutput[i][0].scoring < listToOutput[j][0].scoring)
+				) {
+				var x = listToOutput[i];
+				listToOutput[i] = listToOutput[j];
+				listToOutput[j] = x;
+			}
+		}
+	}
+
+    return listToOutput;
+}
+
+// Remove derivates words from the list of words
+function removeDerivates(obj){
+	var toResultObject = new Array();	
+	for (i in obj){
+		var filesNo  = obj[i].filesNo;
+		var wordList = obj[i].wordList;
+		var wList = wordList.split(",");		
+		var searchedWords = searchTextField.toLowerCase().split(" ");
+		for (var k = 0 ; k < searchedWords.length ; k++){
+			for (var j = 0 ; j < wList.length ; j++){				
+				if (wList[j].startsWith(searchedWords[k])){
+					wList[j] = searchedWords[k];
+				}
+			}
+		}
+		wList = removeDuplicate(wList);
+		var recreateList = '';
+		for(var x in wList){
+			recreateList+=wList[x] + ",";
+		}
+		recreateList = recreateList.substr(0, recreateList.length - 1);
+		toResultObject.push(new newObj(filesNo, recreateList));
+	}
+	return toResultObject;
+}
+
+function newObj(filesNo, wordList){
+	this.filesNo = filesNo;
+	this.wordList = wordList;
+}
+
+// Add a new parameter. Scoring.
+function resultPerFile(filenb, motsliste, motsnb, motslisteDisplay, scoring, group) {
+	//10 - spring,time - 2 - spring, time - 55 - 3
+    this.filenb = filenb;
+    this.motsliste = motsliste;
+    this.motsnb = motsnb;
+    this.motslisteDisplay= motslisteDisplay;
+    
+    this.scoring = scoring;
+    
+}
+
+
+function findRating(words, nr){
+    var sum = 0;
+    var xx = words.split(',');
+    for (jj = 0 ; jj < xx.length ; jj++){
+        var wrd = w[xx[jj]].split(',');
+        for (var ii = 0 ; ii < wrd.length ; ii++){
+            var wrdno = wrd[ii].split('*');
+            if (wrdno[0] == nr){
+                sum+=parseInt(wrdno[1]);
+            }
+        }
+    }
+    return sum;
+}
+
+function compare_nbMots(s1, s2) {
+    var t1 = s1.split(',');
+    var t2 = s2.split(',');
+    //alert ("s1:"+t1.length + " " +t2.length)
+    if (t1.length == t2.length) {
+        return 0;
+    } else if (t1.length > t2.length) {
+        return 1;
+    } else {
+        return -1;
+    }
+    //return t1.length - t2.length);
+}
+
+// return false if browser is Google Chrome and WebHelp is used on a local machine, not a web server 
+function verifyBrowser(){
+    var returnedValue = true;    
+    var browser = BrowserDetect.browser;
+    var addressBar = window.location.href;
+    if (browser == 'Chrome' && addressBar.indexOf('file://') === 0){
+        returnedValue = false;
+    }
+    
+    return returnedValue;
+}
+
+// Remove duplicate values from an array
+function removeDuplicate(arr) {
+   var r = new Array();
+   o:for(var i = 0, n = arr.length; i < n; i++) {
+      for(var x = 0, y = r.length; x < y; x++) {
+         if(r[x]==arr[i]) continue o;
+      }
+      r[r.length] = arr[i];
+   }
+   return r;
+}
+
+// Create startsWith method
+String.prototype.startsWith = function(str) {
+	return (this.match("^"+str)==str);
+}
+
+function trim(str, chars) {
+	return ltrim(rtrim(str, chars), chars);
+}
+ 
+function ltrim(str, chars) {
+	chars = chars || "\\s";
+	return str.replace(new RegExp("^[" + chars + "]+", "g"), "");
+}
+ 
+function rtrim(str, chars) {
+	chars = chars || "\\s";
+	return str.replace(new RegExp("[" + chars + "]+$", "g"), "");
+}

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/nwSearchFnt.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/punctuation.props
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/punctuation.props?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/punctuation.props (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/punctuation.props Sun Oct  7 13:31:52 2012
@@ -0,0 +1,31 @@
+Punct01=\\u3002
+Punct02=\\u3003
+Punct03=\\u300C
+Punct04=\\u300D
+Punct05=\\u300E
+Punct06=\\u300F
+Punct07=\\u301D
+Punct08=\\u301E
+Punct09=\\u301F
+Punct10=\\u309B
+Punct11=\\u2018
+Punct12=\\u2019
+Punct13=\\u201A
+Punct14=\\u201C
+Punct15=\\u201D
+Punct16=\\u201E
+Punct17=\\u2032
+Punct18=\\u2033
+Punct19=\\u2035
+Punct20=\\u2039
+Punct21=\\u203A
+Punct22=\\u201E
+Punct23=\\u00BB
+Punct24=\\u00AB
+Punct25=©
+Punct26=’
+Punct27=\\u00A0
+Punct28=\\u2014
+
+
+

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js Sun Oct  7 13:31:52 2012
@@ -0,0 +1,247 @@
+/*
+ * Author: Joder Illi
+ *
+ * Copyright (c) 2010, FormBlitz AG
+ * All rights reserved.
+ * Implementation of the stemming algorithm from http://snowball.tartarus.org/algorithms/german/stemmer.html
+ * Copyright of the algorithm is: Copyright (c) 2001, Dr Martin Porter and can be found at http://snowball.tartarus.org/license.php
+ *
+ * Redistribution and use in source and binary forms, with or without modification, is covered by the standard BSD license.
+ *
+ */
+
+//var stemmer = function Stemmer() {
+    /*
+    German includes the following accented forms,
+    ä   ö   ü
+    and a special letter, ß, equivalent to double s.
+    The following letters are vowels:
+    a   e   i   o   u   y   ä   ö   ü
+    */
+
+    var stemmer = function(word) {
+        /*
+        Put u and y between vowels into upper case
+        */
+        word = word.replace(/([aeiouyäöü])u([aeiouyäöü])/g, '$1U$2');
+        word = word.replace(/([aeiouyäöü])y([aeiouyäöü])/g, '$1Y$2');
+
+        /*
+        and then do the following mappings,
+        (a) replace ß with ss,
+        (a) replace ae with ä,                          Not doing these, have trouble with diphtongs
+        (a) replace oe with ö,                          Not doing these, have trouble with diphtongs
+        (a) replace ue with ü unless preceded by q.     Not doing these, have trouble with diphtongs
+        So in quelle, ue is not mapped to ü because it follows q, and in feuer it is not mapped because the first part of the rule changes it to feUer, so the u is not found.
+        */
+        word = word.replace(/ß/g, 'ss');
+        //word = word.replace(/ae/g, 'ä');
+        //word = word.replace(/oe/g, 'ö');
+        //word = word.replace(/([^q])ue/g, '$1ü');
+
+        /*
+        R1 and R2 are first set up in the standard way (see the note on R1 and R2), but then R1 is adjusted so that the region before it contains at least 3 letters.
+        R1 is the region after the first non-vowel following a vowel, or is the null region at the end of the word if there is no such non-vowel.
+        R2 is the region after the first non-vowel following a vowel in R1, or is the null region at the end of the word if there is no such non-vowel.
+        */
+
+        var r1Index = word.search(/[aeiouyäöü][^aeiouyäöü]/);
+        var r1 = '';
+        if (r1Index != -1) {
+            r1Index += 2;
+            r1 = word.substring(r1Index);
+        }
+
+        var r2Index = -1;
+        var r2 = '';
+
+        if (r1Index != -1) {
+            var r2Index = r1.search(/[aeiouyäöü][^aeiouyäöü]/);
+            if (r2Index != -1) {
+                r2Index += 2;
+                r2 = r1.substring(r2Index);
+                r2Index += r1Index;
+            } else {
+                r2 = '';
+            }
+        }
+
+        if (r1Index != -1 && r1Index < 3) {
+            r1Index = 3;
+            r1 = word.substring(r1Index);
+        }
+
+        /*
+        Define a valid s-ending as one of b, d, f, g, h, k, l, m, n, r or t.
+        Define a valid st-ending as the same list, excluding letter r.
+        */
+
+        /*
+        Do each of steps 1, 2 and 3.
+        */
+
+        /*
+        Step 1:
+        Search for the longest among the following suffixes,
+        (a) em   ern   er
+        (b) e   en   es
+        (c) s (preceded by a valid s-ending)
+        */
+        var a1Index = word.search(/(em|ern|er)$/g);
+        var b1Index = word.search(/(e|en|es)$/g);
+        var c1Index = word.search(/([bdfghklmnrt]s)$/g);
+        if (c1Index != -1) {
+            c1Index++;
+        }
+        var index1 = 10000;
+        var optionUsed1 = '';
+        if (a1Index != -1 && a1Index < index1) {
+            optionUsed1 = 'a';
+            index1 = a1Index;
+        }
+        if (b1Index != -1 && b1Index < index1) {
+            optionUsed1 = 'b';
+            index1 = b1Index;
+        }
+        if (c1Index != -1 && c1Index < index1) {
+            optionUsed1 = 'c';
+            index1 = c1Index;
+        }
+
+        /*
+        and delete if in R1. (Of course the letter of the valid s-ending is not necessarily in R1.) If an ending of group (b) is deleted, and the ending is preceded by niss, delete the final s.
+        (For example, äckern -> äck, ackers -> acker, armes -> arm, bedürfnissen -> bedürfnis)
+        */
+
+        if (index1 != 10000 && r1Index != -1) {
+            if (index1 >= r1Index) {
+                word = word.substring(0, index1);
+                if (optionUsed1 == 'b') {
+                    if (word.search(/niss$/) != -1) {
+                        word = word.substring(0, word.length -1);
+                    }
+                }
+            }
+        }
+        /*
+        Step 2:
+        Search for the longest among the following suffixes,
+        (a) en   er   est
+        (b) st (preceded by a valid st-ending, itself preceded by at least 3 letters)
+        */
+
+        var a2Index = word.search(/(en|er|est)$/g);
+        var b2Index = word.search(/(.{3}[bdfghklmnt]st)$/g);
+        if (b2Index != -1) {
+            b2Index += 4;
+        }
+
+        var index2 = 10000;
+        var optionUsed2 = '';
+        if (a2Index != -1 && a2Index < index2) {
+            optionUsed2 = 'a';
+            index2 = a2Index;
+        }
+        if (b2Index != -1 && b2Index < index2) {
+            optionUsed2 = 'b';
+            index2 = b2Index;
+        }
+
+        /*
+        and delete if in R1.
+        (For example, derbsten -> derbst by step 1, and derbst -> derb by step 2, since b is a valid st-ending, and is preceded by just 3 letters)
+        */
+
+        if (index2 != 10000 && r1Index != -1) {
+            if (index2 >= r1Index) {
+                word = word.substring(0, index2);
+            }
+        }
+
+        /*
+        Step 3: d-suffixes (*)
+        Search for the longest among the following suffixes, and perform the action indicated.
+        end   ung
+            delete if in R2
+            if preceded by ig, delete if in R2 and not preceded by e
+        ig   ik   isch
+            delete if in R2 and not preceded by e
+        lich   heit
+            delete if in R2
+            if preceded by er or en, delete if in R1
+        keit
+            delete if in R2
+            if preceded by lich or ig, delete if in R2
+        */
+
+        var a3Index = word.search(/(end|ung)$/g);
+        var b3Index = word.search(/[^e](ig|ik|isch)$/g);
+        var c3Index = word.search(/(lich|heit)$/g);
+        var d3Index = word.search(/(keit)$/g);
+        if (b3Index != -1) {
+            b3Index ++;
+        }
+
+        var index3 = 10000;
+        var optionUsed3 = '';
+        if (a3Index != -1 && a3Index < index3) {
+            optionUsed3 = 'a';
+            index3 = a3Index;
+        }
+        if (b3Index != -1 && b3Index < index3) {
+            optionUsed3 = 'b';
+            index3 = b3Index;
+        }
+        if (c3Index != -1 && c3Index < index3) {
+            optionUsed3 = 'c';
+            index3 = c3Index;
+        }
+        if (d3Index != -1 && d3Index < index3) {
+            optionUsed3 = 'd';
+            index3 = d3Index;
+        }
+
+        if (index3 != 10000 && r2Index != -1) {
+            if (index3 >= r2Index) {
+                word = word.substring(0, index3);
+                var optionIndex = -1;
+                var optionSubsrt = '';
+                if (optionUsed3 == 'a') {
+                    optionIndex = word.search(/[^e](ig)$/);
+                    if (optionIndex != -1) {
+                        optionIndex++;
+                        if (optionIndex >= r2Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                } else if (optionUsed3 == 'c') {
+                    optionIndex = word.search(/(er|en)$/);
+                    if (optionIndex != -1) {
+                        if (optionIndex >= r1Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                } else if (optionUsed3 == 'd') {
+                    optionIndex = word.search(/(lich|ig)$/);
+                    if (optionIndex != -1) {
+                        if (optionIndex >= r2Index) {
+                            word = word.substring(0, optionIndex);
+                        }
+                    }
+                }
+            }
+        }
+
+        /*
+        Finally,
+        turn U and Y back into lower case, and remove the umlaut accent from a, o and u.
+        */
+        word = word.replace(/U/g, 'u');
+        word = word.replace(/Y/g, 'y');
+        word = word.replace(/ä/g, 'a');
+        word = word.replace(/ö/g, 'o');
+        word = word.replace(/ü/g, 'u');
+
+        return word;
+    };
+//}
\ No newline at end of file

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/de_stemmer.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js Sun Oct  7 13:31:52 2012
@@ -0,0 +1,234 @@
+// Porter stemmer in Javascript. Few comments, but it's easy to follow against the rules in the original
+// paper, in
+//
+//  Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
+//  no. 3, pp 130-137,
+//
+// see also http://www.tartarus.org/~martin/PorterStemmer
+
+// Release 1
+// Derived from (http://tartarus.org/~martin/PorterStemmer/js.txt) - cjm (iizuu) Aug 24, 2009
+
+var stemmer = (function(){
+	var step2list = {
+			"ational" : "ate",
+			"tional" : "tion",
+			"enci" : "ence",
+			"anci" : "ance",
+			"izer" : "ize",
+			"bli" : "ble",
+			"alli" : "al",
+			"entli" : "ent",
+			"eli" : "e",
+			"ousli" : "ous",
+			"ization" : "ize",
+			"ation" : "ate",
+			"ator" : "ate",
+			"alism" : "al",
+			"iveness" : "ive",
+			"fulness" : "ful",
+			"ousness" : "ous",
+			"aliti" : "al",
+			"iviti" : "ive",
+			"biliti" : "ble",
+			"logi" : "log"
+		},
+
+		step3list = {
+			"icate" : "ic",
+			"ative" : "",
+			"alize" : "al",
+			"iciti" : "ic",
+			"ical" : "ic",
+			"ful" : "",
+			"ness" : ""
+		},
+
+		c = "[^aeiou]",          // consonant
+		v = "[aeiouy]",          // vowel
+		C = c + "[^aeiouy]*",    // consonant sequence
+		V = v + "[aeiou]*",      // vowel sequence
+
+		mgr0 = "^(" + C + ")?" + V + C,               // [C]VC... is m>0
+		meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$",  // [C]VC[V] is m=1
+		mgr1 = "^(" + C + ")?" + V + C + V + C,       // [C]VCVC... is m>1
+		s_v = "^(" + C + ")?" + v;                   // vowel in stem
+
+	return function (w) {
+		var 	stem,
+			suffix,
+			firstch,
+			re,
+			re2,
+			re3,
+			re4,
+			origword = w;
+
+		if (w.length < 3) { return w; }
+
+		firstch = w.substr(0,1);
+		if (firstch == "y") {
+			w = firstch.toUpperCase() + w.substr(1);
+		}
+
+		// Step 1a
+		re = /^(.+?)(ss|i)es$/;
+		re2 = /^(.+?)([^s])s$/;
+
+		if (re.test(w)) { w = w.replace(re,"$1$2"); }
+		else if (re2.test(w)) {	w = w.replace(re2,"$1$2"); }
+
+		// Step 1b
+		re = /^(.+?)eed$/;
+		re2 = /^(.+?)(ed|ing)$/;
+		if (re.test(w)) {
+			var fp = re.exec(w);
+			re = new RegExp(mgr0);
+			if (re.test(fp[1])) {
+				re = /.$/;
+				w = w.replace(re,"");
+			}
+		} else if (re2.test(w)) {
+			var fp = re2.exec(w);
+			stem = fp[1];
+			re2 = new RegExp(s_v);
+			if (re2.test(stem)) {
+				w = stem;
+				re2 = /(at|bl|iz)$/;
+				re3 = new RegExp("([^aeiouylsz])\\1$");
+				re4 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+				if (re2.test(w)) { w = w + "e"; }
+				else if (re3.test(w)) { re = /.$/; w = w.replace(re,""); }
+				else if (re4.test(w)) { w = w + "e"; }
+			}
+		}
+
+		// Step 1c
+	        re = new RegExp("^(.+" + c + ")y$");
+		    if (re.test(w)) {
+			var fp = re.exec(w);
+			stem = fp[1];
+		    w = stem + "i";
+		}
+
+		// Step 2
+		re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;
+		if (re.test(w)) {
+			var fp = re.exec(w);
+			stem = fp[1];
+			suffix = fp[2];
+			re = new RegExp(mgr0);
+			if (re.test(stem)) {
+				w = stem + step2list[suffix];
+			}
+		}
+
+		// Step 3
+		re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;
+		if (re.test(w)) {
+			var fp = re.exec(w);
+			stem = fp[1];
+			suffix = fp[2];
+			re = new RegExp(mgr0);
+			if (re.test(stem)) {
+				w = stem + step3list[suffix];
+			}
+		}
+
+		// Step 4
+		re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;
+		re2 = /^(.+?)(s|t)(ion)$/;
+		if (re.test(w)) {
+			var fp = re.exec(w);
+			stem = fp[1];
+			re = new RegExp(mgr1);
+			if (re.test(stem)) {
+				w = stem;
+			}
+		} else if (re2.test(w)) {
+			var fp = re2.exec(w);
+			stem = fp[1] + fp[2];
+			re2 = new RegExp(mgr1);
+			if (re2.test(stem)) {
+				w = stem;
+			}
+		}
+
+		// Step 5
+		re = /^(.+?)e$/;
+		if (re.test(w)) {
+			var fp = re.exec(w);
+			stem = fp[1];
+			re = new RegExp(mgr1);
+			re2 = new RegExp(meq1);
+			re3 = new RegExp("^" + C + v + "[^aeiouwxy]$");
+			if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {
+				w = stem;
+			}
+		}
+
+		re = /ll$/;
+		re2 = new RegExp(mgr1);
+		if (re.test(w) && re2.test(w)) {
+			re = /.$/;
+			w = w.replace(re,"");
+		}
+
+		// and turn initial Y back to y
+
+		if (firstch == "y") {
+			w = firstch.toLowerCase() + w.substr(1);
+		}
+
+	    // See http://snowball.tartarus.org/algorithms/english/stemmer.html
+	    // "Exceptional forms in general"
+	    var specialWords = {
+	    	"skis" : "ski",
+	    	"skies" : "sky",
+	    	"dying" : "die",
+	    	"lying" : "lie",
+	    	"tying" : "tie",
+	    	"idly" : "idl",
+	    	"gently" : "gentl",
+	    	"ugly" : "ugli",
+	    	"early": "earli",
+	    	"only": "onli",
+	    	"singly": "singl"
+	    };
+
+	    if(specialWords[origword]){
+	    	w = specialWords[origword];
+	    }
+
+	    if( "sky news howe atlas cosmos bias \
+	    	 andes inning outing canning herring \
+	    	 earring proceed exceed succeed".indexOf(origword) !== -1 ){
+	    	w = origword;
+	    }
+
+	    // Address words overstemmed as gener-
+	    re = /.*generate?s?d?(ing)?$/;
+	    if( re.test(origword) ){
+		w = w + 'at';
+	    }
+	    re = /.*general(ly)?$/;
+	    if( re.test(origword) ){
+		w = w + 'al';
+	    }
+	    re = /.*generic(ally)?$/;
+	    if( re.test(origword) ){
+		w = w + 'ic';
+	    }
+	    re = /.*generous(ly)?$/;
+	    if( re.test(origword) ){
+		w = w + 'ous';
+	    }
+	    // Address words overstemmed as commun-
+	    re = /.*communit(ies)?y?/;
+	    if( re.test(origword) ){
+		w = w + 'iti';
+	    }
+
+	    return w;
+	}
+})();

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/en_stemmer.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js Sun Oct  7 13:31:52 2012
@@ -0,0 +1,299 @@
+/*
+ * Author: Kasun Gajasinghe
+ * E-Mail: kasunbg AT gmail DOT com
+ * Date: 09.08.2010
+ *
+ * usage: stemmer(word);
+ * ex: var stem = stemmer(foobar);
+ * Implementation of the stemming algorithm from http://snowball.tartarus.org/algorithms/french/stemmer.html
+ *
+ * LICENSE:
+ *
+ * Copyright (c) 2010, Kasun Gajasinghe. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
+ * are permitted provided that the following conditions are met:
+ *
+ *    1. Redistributions of source code must retain the above copyright notice,
+ *       this list of conditions and the following disclaimer.
+ *
+ *    2. Redistributions in binary form must reproduce the above copyright notice,
+ *       this list of conditions and the following disclaimer in the documentation
+ *       and/or other materials provided with the distribution.
+ *
+ *
+ * THIS SOFTWARE IS PROVIDED BY KASUN GAJASINGHE ''AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL KASUN GAJASINGHE BE LIABLE FOR ANY DIRECT,
+ * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+ * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+ * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ */
+
+var stemmer = function(word){
+//    Letters in French include the following accented forms,
+//        â   à   ç   ë   é   ê   è   ï   î   ô   û   ù
+//    The following letters are vowels:
+//        a   e   i   o   u   y   â   à   ë   é   ê   è   ï   î   ô   û   ù
+    
+    word = word.toLowerCase();
+    var oriWord = word;
+    word = word.replace(/qu/g, 'qU');   //have to perform first, as after the operation, capital U is not treated as a vowel
+    word = word.replace(/([aeiouyâàëéêèïîôûù])u([aeiouyâàëéêèïîôûù])/g, '$1U$2');
+    word = word.replace(/([aeiouyâàëéêèïîôûù])i([aeiouyâàëéêèïîôûù])/g, '$1I$2');
+    word = word.replace(/([aeiouyâàëéêèïîôûù])y/g, '$1Y');
+    word = word.replace(/y([aeiouyâàëéêèïîôûù])/g, 'Y$1');
+ 
+    var rv='';
+    var rvIndex = -1;
+    if(word.search(/^(par|col|tap)/) != -1 || word.search(/^[aeiouyâàëéêèïîôûù]{2}/) != -1){
+        rv = word.substring(3);
+        rvIndex = 3;
+    } else {
+        rvIndex = word.substring(1).search(/[aeiouyâàëéêèïîôûù]/);
+        if(rvIndex != -1){
+            rvIndex +=2;   //+2 is to supplement the substring(1) used to find rvIndex
+            rv = word.substring(rvIndex);
+        } else {
+            rvIndex = word.length;
+        }
+    }
+
+//    R1 is the region after the first non-vowel following a vowel, or the end of the word if there is no such non-vowel.
+//    R2 is the region after the first non-vowel following a vowel in R1, or the end of the word if there is no such non-vowel
+    var r1Index = word.search(/[aeiouyâàëéêèïîôûù][^aeiouyâàëéêèïîôûù]/);
+    var r1 = '';
+    if (r1Index != -1) {
+        r1Index += 2;
+        r1 = word.substring(r1Index);
+    } else {
+        r1Index = word.length;        
+    }
+
+    var r2Index = -1;
+    var r2 = '';
+    if (r1Index != -1) {
+        r2Index = r1.search(/[aeiouyâàëéêèïîôûù][^aeiouyâàëéêèïîôûù]/);
+        if (r2Index != -1) {
+            r2Index += 2;
+            r2 = r1.substring(r2Index);
+            r2Index += r1Index;
+        } else {
+            r2 = '';
+            r2Index = word.length;            
+        }
+    }
+    if (r1Index != -1 && r1Index < 3) {
+        r1Index = 3;
+        r1 = word.substring(r1Index);
+    }
+
+    /*
+    Step 1: Standard suffix removal
+    */
+    var a1Index = word.search(/(ance|iqUe|isme|able|iste|eux|ances|iqUes|ismes|ables|istes)$/);
+    var a2Index = word.search(/(atrice|ateur|ation|atrices|ateurs|ations)$/);
+    var a3Index = word.search(/(logie|logies)$/);
+    var a4Index = word.search(/(usion|ution|usions|utions)$/);
+    var a5Index = word.search(/(ence|ences)$/);
+    var a6Index = word.search(/(ement|ements)$/);
+    var a7Index = word.search(/(ité|ités)$/);
+    var a8Index = word.search(/(if|ive|ifs|ives)$/);
+    var a9Index = word.search(/(eaux)$/);
+    var a10Index = word.search(/(aux)$/);
+    var a11Index = word.search(/(euse|euses)$/);
+    var a12Index = word.search(/[^aeiouyâàëéêèïîôûù](issement|issements)$/);
+    var a13Index = word.search(/(amment)$/);
+    var a14Index = word.search(/(emment)$/);
+    var a15Index = word.search(/[aeiouyâàëéêèïîôûù](ment|ments)$/);
+
+    if(a1Index != -1 && a1Index >= r2Index){
+        word = word.substring(0,a1Index);
+    } else if(a2Index != -1 && a2Index >= r2Index){
+        word = word.substring(0,a2Index);
+        var a2Index2 = word.search(/(ic)$/);
+        if(a2Index2 != -1 && a2Index2 >= r2Index){
+            word = word.substring(0, a2Index2);        //if preceded by ic, delete if in R2,
+        } else {                                //else replace by iqU
+            word = word.replace(/(ic)$/,'iqU');
+        }
+    } else if(a3Index != -1 && a3Index >= r2Index){
+        word = word.replace(/(logie|logies)$/,'log');  //replace with log if in R2
+    } else if(a4Index != -1 && a4Index >= r2Index){
+        word = word.replace(/(usion|ution|usions|utions)$/,'u');  //replace with u if in R2
+    } else if(a5Index != -1 && a5Index >= r2Index){
+        word = word.replace(/(ence|ences)$/,'ent');  //replace with ent if in R2
+    } else if(a6Index != -1 && a6Index >= rvIndex){
+        word = word.substring(0,a6Index);
+        if(word.search(/(iv)$/) >= r2Index){
+            word = word.replace(/(iv)$/, '');
+            if(word.search(/(at)$/) >= r2Index){
+                word = word.replace(/(at)$/, '');
+            }
+        } else if(word.search(/(eus)$/) != -1){
+            var a6Index2 = word.search(/(eus)$/);
+            if(a6Index2 >=r2Index){
+                word = word.substring(0, a6Index2);    
+            } else if(a6Index2 >= r1Index){
+                word = word.substring(0,a6Index2)+"eux";
+            }
+        } else if(word.search(/(abl|iqU)$/) >= r2Index){
+            word = word.replace(/(abl|iqU)$/,'');   //if preceded by abl or iqU, delete if in R2,
+        } else if(word.search(/(ièr|Ièr)$/) >= rvIndex){
+            word = word.replace(/(ièr|Ièr)$/,'i');   //if preceded by abl or iqU, delete if in R2,
+        } 
+    } else if(a7Index != -1 && a7Index >= r2Index){
+        word = word.substring(0,a7Index);   //delete if in R2
+        if(word.search(/(abil)$/) != -1){   //if preceded by abil, delete if in R2, else replace by abl, otherwise,
+            var a7Index2 = word.search(/(abil)$/);
+            if(a7Index2 >=r2Index){
+                word = word.substring(0, a7Index2);
+            } else {
+                word = word.substring(0,a7Index2)+"abl";
+            }
+        } else if(word.search(/(ic)$/) != -1){
+            var a7Index3 = word.search(/(ic)$/);
+            if(a7Index3 != -1 && a7Index3 >= r2Index){
+                word = word.substring(0, a7Index3);        //if preceded by ic, delete if in R2,
+            } else {                                //else replace by iqU
+                word = word.replace(/(ic)$/,'iqU');
+            }
+        } else if(word.search(/(iv)$/) != r2Index){
+            word = word.replace(/(iv)$/,'');                        
+        }
+    } else if(a8Index != -1 && a8Index >= r2Index){
+        word = word.substring(0,a8Index);
+        if(word.search(/(at)$/) >= r2Index){
+            word = word.replace(/(at)$/, '');
+            if(word.search(/(ic)$/) >= r2Index){
+                word = word.replace(/(ic)$/, '');
+            } else { word = word.replace(/(ic)$/, 'iqU'); }
+        }
+    } else if(a9Index != -1){ word = word.replace(/(eaux)/,'eau')
+    } else if(a10Index >= r1Index){ word = word.replace(/(aux)/,'al')
+    } else if(a11Index != -1 ){
+        var a11Index2 = word.search(/(euse|euses)$/);
+        if(a11Index2 >=r2Index){
+            word = word.substring(0, a11Index2);
+        } else if(a11Index2 >= r1Index){
+            word = word.substring(0, a11Index2)+"eux";
+        }
+    } else if(a12Index!=-1 && a12Index>=r1Index){
+        word = word.substring(0,a12Index+1);    //+1- amendment to non-vowel
+    } else if(a13Index!=-1 && a13Index>=rvIndex){
+        word = word.replace(/(amment)$/,'ant');
+    } else if(a14Index!=-1 && a14Index>=rvIndex){
+        word = word.replace(/(emment)$/,'ent');
+    } else if(a15Index!=-1 && a15Index>=rvIndex){
+        word = word.substring(0,a15Index+1);
+    }
+
+    /* Step 2a: Verb suffixes beginning i*/
+    var wordStep1 = word;
+    var step2aDone = false;
+    if(oriWord == word.toLowerCase() || oriWord.search(/(amment|emment|ment|ments)$/) != -1){
+        step2aDone = true;
+        var b1Regex = /([^aeiouyâàëéêèïîôûù])(îmes|ît|îtes|i|ie|ies|ir|ira|irai|iraIent|irais|irait|iras|irent|irez|iriez|irions|irons|iront|is|issaIent|issais|issait|issant|issante|issantes|issants|isse|issent|isses|issez|issiez|issions|issons|it)$/i;
+        if(word.search(b1Regex) >= rvIndex){
+            word = word.replace(b1Regex,'$1');
+        }
+    }
+
+    /* Step 2b:  Other verb suffixes*/
+    if (step2aDone && wordStep1 == word) {
+        if (word.search(/(ions)$/) >= r2Index) {
+            word = word.replace(/(ions)$/, '');
+        } else {
+            var b2Regex = /(é|ée|ées|és|èrent|er|era|erai|eraIent|erais|erait|eras|erez|eriez|erions|erons|eront|ez|iez)$/i;
+            if (word.search(b2Regex) >= rvIndex) {
+                word = word.replace(b2Regex, '');
+            } else {
+                var b3Regex = /e(âmes|ât|âtes|a|ai|aIent|ais|ait|ant|ante|antes|ants|as|asse|assent|asses|assiez|assions)$/i;
+                if (word.search(b3Regex) >= rvIndex) {
+                    word = word.replace(b3Regex, '');
+                } else {
+                    var b3Regex2 = /(âmes|ât|âtes|a|ai|aIent|ais|ait|ant|ante|antes|ants|as|asse|assent|asses|assiez|assions)$/i;
+                    if (word.search(b3Regex2) >= rvIndex) {
+                        word = word.replace(b3Regex2, '');
+                    }
+                }
+            }
+        }
+    }
+    
+    if(oriWord != word.toLowerCase()){
+        /* Step 3 */
+        var rep = '';
+        if(word.search(/Y$/) != -1) {
+            word = word.replace(/Y$/, 'i');
+        } else if(word.search(/ç$/) != -1){
+            word = word.replace(/ç$/, 'c');
+        }
+    } else {
+        /* Step 4 */
+        //If the word ends s, not preceded by a, i, o, u, è or s, delete it.
+        if (word.search(/([^aiouès])s$/) >= rvIndex) {
+            word = word.replace(/([^aiouès])s$/, '$1');
+        }
+        var e1Index = word.search(/ion$/);
+        if (e1Index >= r2Index && word.search(/[st]ion$/) >= rvIndex) {
+            word = word.substring(0, e1Index);
+        } else {
+            var e2Index = word.search(/(ier|ière|Ier|Ière)$/);
+            if (e2Index != -1 && e2Index >= rvIndex) {
+                word = word.substring(0, e2Index) + "i";
+            } else {
+                if (word.search(/e$/) >= rvIndex) {
+                    word = word.replace(/e$/, '');   //delete last e
+                } else if (word.search(/guë$/) >= rvIndex) {
+                    word = word.replace(/guë$/, 'gu');
+                }
+            }
+        }
+    }
+    
+    /* Step 5: Undouble */
+    //word = word.replace(/(en|on|et|el|eil)(n|t|l)$/,'$1');
+    word = word.replace(/(en|on)(n)$/,'$1');
+    word = word.replace(/(ett)$/,'et');
+    word = word.replace(/(el|eil)(l)$/,'$1');
+
+    /* Step 6: Un-accent */
+    word = word.replace(/[éè]([^aeiouyâàëéêèïîôûù]+)$/,'e$1');
+    word = word.toLowerCase();
+    return word;
+};
+
+var eqOut = new Array();
+var noteqOut = new Array();
+var eqCount = 0;
+/*
+To test the stemming, create two arrays named "voc" and "COut" which are for vocabualary and the stemmed output.
+Then add the vocabulary strings and output strings. This method will generate the stemmed output for "voc" and will
+compare the output with COut.
+ (I used porter's voc and out files and did a regex to convert them to js objects. regex: /");\nvoc.push("/g . This
+  will add strings to voc array such that output would look like: voc.push("foobar"); ) drop me an email for any help.
+ */
+function testFr(){
+    var start = new Date().getTime(); //execution time
+    eqCount = 0;
+    eqOut = new Array();
+    noteqOut = new Array();
+    for(var k=0;k<voc.length;k++){
+        if(COut[k]==stemmer(voc[k])){
+            eqCount++;
+            eqOut.push("v: "+voc[k]+" c: "+COut[k]);    
+        } else {
+            noteqOut.push(voc[k]+", c: "+COut[k]+" s:"+stemmer(voc[k]));
+        }
+    }
+    var end = new Date().getTime(); //execution time
+    var time = end-start;
+    alert("equal count= "+eqCount+" out of "+voc.length+" words. time= "+time+" ms");
+    //console.log("equal count= "+eqCount+" out of "+voc.length+" words. time= "+time+" ms");
+}
+
+

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/content/search/stemmers/fr_stemmer.js
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/template/favicon.ico
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/template/favicon.ico?rev=1395298&view=auto
==============================================================================
Binary file - no diff available.

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/template/favicon.ico
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml?rev=1395298&view=auto
==============================================================================
--- ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml (added)
+++ ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml Sun Oct  7 13:31:52 2012
@@ -0,0 +1,738 @@
+<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0"
+             xmlns:param="http://nwalsh.com/docbook/xsl/template/1.0/param"
+             xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="article" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="set" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="book" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="part" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="division.title"
+           param:node="ancestor-or-self::part[1]"/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="partintro" t:wrapper="div">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="reference" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <hr/>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="refentry" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+<!-- uncomment this if you want refentry titlepages
+    <title t:force="1"
+           t:named-template="refentry.title"
+           param:node="ancestor-or-self::refentry[1]"/>
+-->
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator/>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+  <t:titlepage t:element="dedication" t:wrapper="div" class="titlepage">
+    <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::dedication[1]"/>
+    <subtitle/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="acknowledgements" t:wrapper="div" class="titlepage">
+    <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::acknowledgements[1]"/>
+    <subtitle/>
+    </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="preface" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="chapter" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="topic" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="appendix" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="section" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect1" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect2" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect3" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect4" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="sect5" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<t:titlepage t:element="simplesect" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title/>
+    <subtitle/>
+    <corpauthor/>
+    <authorgroup/>
+    <author/>
+    <othercredit/>
+    <releaseinfo/>
+    <copyright/>
+    <legalnotice/>
+    <pubdate/>
+    <revision/>
+    <revhistory/>
+    
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+    <xsl:if test="count(parent::*)='0'"><hr/></xsl:if>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="bibliography" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::bibliography[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="glossary" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::glossary[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="index" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::index[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+<t:titlepage t:element="setindex" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:force="1"
+           t:named-template="component.title"
+           param:node="ancestor-or-self::setindex[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+<t:titlepage t:element="sidebar" t:wrapper="div" class="titlepage">
+  <t:titlepage-content t:side="recto">
+    <title
+           t:named-template="formal.object.heading"
+           param:object="ancestor-or-self::sidebar[1]"/>
+    <subtitle/>
+  </t:titlepage-content>
+
+  <t:titlepage-content t:side="verso">
+  </t:titlepage-content>
+
+  <t:titlepage-separator>
+  </t:titlepage-separator>
+
+  <t:titlepage-before t:side="recto">
+  </t:titlepage-before>
+
+  <t:titlepage-before t:side="verso">
+  </t:titlepage-before>
+</t:titlepage>
+
+<!-- ==================================================================== -->
+
+</t:templates>

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml
------------------------------------------------------------------------------
    svn:keywords = Date Rev Author URL Id

Propchange: ofbiz/trunk/applications/content/template/docbook/webhelp/xsl/titlepage.templates.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml