]> granicus.if.org Git - docbook-dsssl/commitdiff
Change name of exclude.search.from.webhelp param/property to webhelp.include.search.tab
authorDavid Cramer <david@thingbag.net>
Sun, 15 Aug 2010 15:38:46 +0000 (15:38 +0000)
committerDavid Cramer <david@thingbag.net>
Sun, 15 Aug 2010 15:38:46 +0000 (15:38 +0000)
xsl/webhelp/build.properties
xsl/webhelp/build.xml
xsl/webhelp/xsl/webhelp.xsl

index 34bd4b048e65220852ef148b9ba9bddf7d3e6a80..5529f638b928348426bb5c64b085bc6705281511 100755 (executable)
@@ -42,8 +42,8 @@ docbook-xsl-catalog=c:/gsoc2010/docbook-xsl-1.75.2/catalog.xml
 docbookx.dtd=c:/workhead/export/DocBookDTD/4.5/docbookx.dtd
 validate=true
 
-# Set this to true if you don't need a search tab.
-exclude.search.from.webhelp=false
+# Set this to false if you don't need a search tab.
+webhelp.include.search.tab=true
 
 # indexer-language is used to tell the search indexer which language
 # the docbook is written.  This will be used to identify the correct
index cd80ed55b42f6cd9f3c4f1f7a6df58417e7d6ade..c1ff5bc2315102257bd065b83ed4bed5fe609b1f 100755 (executable)
@@ -2,6 +2,7 @@
 
   <dirname property="ant.file.dir" file="${ant.file.mainbuild}"/>
   <loadproperties srcFile="${ant.file.dir}/build.properties"/>
+  <property name="webhelp.include.search.tab" value="true"/>
 
   <xmlcatalog id="catalog">
        <catalogpath>
@@ -23,8 +24,8 @@
   <condition property="perform-validation">
        <equals arg1="${validate}" arg2="true"/>
   </condition>
-  <condition property="skip-search-indexing">
-       <equals arg1="${exclude.search.from.webhelp}" arg2="true"/>
+  <condition property="do-search-indexing">
+       <equals arg1="${webhelp.include.search.tab}" arg2="true"/>
   </condition>
 
   <target name="validate" if="perform-validation">
@@ -44,8 +45,8 @@
          classpath="${xslt-processor-classpath}">
          <xmlcatalog refid="catalog"/>
          <param name="chunked.toc.all.open" expression="${chunked.toc.all.open}" if="chunked.toc.all.open"/>
-         <param name="exclude.search.from.webhelp" expression="${exclude.search.from.webhelp}"
-               if="exclude.search.from.webhelp"/>
+         <param name="webhelp.include.search.tab" expression="${webhelp.include.search.tab}"
+               if="webhelp.include.search.tab"/>
          <param name="output_file_name" expression="${output_file_name}"/>
          <param name="webhelp.base.dir" expression="${output-dir}" if="output-dir"/>
          <param name="webhelp.indexer.language" expression="${webhelp.indexer.language}" if="webhelp.indexer.language"/>
@@ -72,7 +73,7 @@
        </copy>
   </target>
 
-  <target name="index" unless="skip-search-indexing">
+  <target name="index" if="do-search-indexing">
 
        <copy todir="${output-dir}">
          <fileset dir="${ant.file.dir}/template">
   </target>
 
   <target name="zip" depends="build-indexer,webhelp">
+
+       <xslt
+         in="${ant.file.dir}/xsl/webhelp-common.xsl"
+         out="${ant.file.dir}/xsl/profile-webhelp-common.xsl"
+         force="yes"
+         style="${ant.file.dir}/../profiling/xsl2profile.xsl"
+         classpath="${xslt-processor-classpath}">
+         <xmlcatalog refid="catalog"/>
+       </xslt>
+
        <zip destfile="../webhelp-gsoc2010-beta.zip"
          basedir=".."
          includes="webhelp/**"/>
+
   </target>
 
   <target name="clean">
        <echo>Usage:</echo>
        <echo>webhelp: Generate the document in webhelp format.</echo>
        <echo>index: Index the content.</echo>
-       <echo>build-indexer: Rebuilds the indexer.</echo>
+       <echo>build-indexer: Rebuilds the indexer jar.</echo>
   </target>
 
-  <target name="create-ns-version">
+  <target name="create-ns-version" depends="zip">
 
        <!-- TODO: Prep for profiling, then run xslt over ../profiling/xsl2profile.xsl over webhelp-common.xsl -->
 
 
        <xslt
          in="${input-xml}"
-         out="${input-xml}.5x.xml"
+         out="../webhelp-ns/${input-xml}"
+         force="yes"
          style="${ant.file.dir}/../../docbook/relaxng/tools/db4-upgrade.xsl"
          classpath="${xslt-processor-classpath}">
          <xmlcatalog refid="catalog"/>
        </xslt>
 
-       <copy file="${input-xml}" tofile="${input-xml}.orig"/>
-       <move file="${input-xml}.5x.xml" tofile="${input-xml}"/>
-
        <replace 
          file="../webhelp-ns/build.properties" 
          token="validate=true" 
          basedir=".."
          includes="webhelp-ns/**"/>
 
-       <copy file="${input-xml}.orig" tofile="${input-xml}"/>
-
   </target>
 
 </project>
index 0eb4ce24c54da41dc0db5512a0f92197ce19de48..faaf2c10f9235ca92c2fcbf04169397165255a73 100755 (executable)
@@ -7,14 +7,13 @@
 
     <xsl:import href="http://docbook.sourceforge.net/release/xsl/current/xhtml/chunk.xsl"/>
 
-    <!--TODO check how html and xml behaves-->
     <xsl:output
             method="html"
             encoding="utf-8"
             cdata-section-elements=""/>
 
     <!-- Custom params! -->
-    <xsl:param name="exclude.search.from.webhelp">false</xsl:param>
+    <xsl:param name="webhelp.include.search.tab">true</xsl:param>
     <xsl:param name="webhelp.start.filename">index.html</xsl:param>
     <xsl:param name="webhelp.base.dir">doc</xsl:param>
     <xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"/>
                        text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
             <l:gentext key="txt_please_wait" text="Please wait. Search in progress..."/>
             <l:gentext key="txt_results_for" text="Results for: "/>
-            <l:gentext key="TableofContents" text="Contents"/>
+        </l10n>
+        <l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="de">
+            <l:gentext key="Search" text="Search"/>
+            <l:gentext key="Enter_a_term_and_click" text="Enter a term and click "/>
+            <l:gentext key="Go" text="Go"/>
+            <l:gentext key="to_perform_a_search" text=" to perform a search."/>
+            <l:gentext key="txt_filesfound" text="Results"/>
+            <l:gentext key="txt_enter_at_least_1_char" text="You must enter at least one character."/>
+            <l:gentext key="txt_browser_not_supported"
+                       text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
+            <l:gentext key="txt_please_wait" text="Please wait. Search in progress..."/>
+            <l:gentext key="txt_results_for" text="Results for: "/>
+        </l10n>
+        <l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="fr">
+            <l:gentext key="Search" text="Search"/>
+            <l:gentext key="Enter_a_term_and_click" text="Enter a term and click "/>
+            <l:gentext key="Go" text="Go"/>
+            <l:gentext key="to_perform_a_search" text=" to perform a search."/>
+            <l:gentext key="txt_filesfound" text="Results"/>
+            <l:gentext key="txt_enter_at_least_1_char" text="You must enter at least one character."/>
+            <l:gentext key="txt_browser_not_supported"
+                       text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
+            <l:gentext key="txt_please_wait" text="Please wait. Search in progress..."/>
+            <l:gentext key="txt_results_for" text="Results for: "/>
+        </l10n>
+        <l10n xmlns:l="http://docbook.sourceforge.net/xmlns/l10n/1.0" language="zh">
+            <l:gentext key="Search" text="Search"/>
+            <l:gentext key="Enter_a_term_and_click" text="Enter a term and click "/>
+            <l:gentext key="Go" text="Go"/>
+            <l:gentext key="to_perform_a_search" text=" to perform a search."/>
+            <l:gentext key="txt_filesfound" text="Results"/>
+            <l:gentext key="txt_enter_at_least_1_char" text="You must enter at least one character."/>
+            <l:gentext key="txt_browser_not_supported"
+                       text="Your browser is not supported. Use of Mozilla Firefox is recommended."/>
+            <l:gentext key="txt_please_wait" text="Please wait. Search in progress..."/>
+            <l:gentext key="txt_results_for" text="Results for: "/>
         </l10n>
 
     </i18n>
 
         <!--testing toc in the content page>
         <xsl:call-template name="webhelptoctoc"/>
-        <xsl:if test="$exclude.search.from.webhelp != 'true'">
+        <xsl:if test="$webhelp.include.search.tab != 'false'">
             <xsl:call-template name="search"/>
         </xsl:if-->
     </xsl:template>
                                         </em>
                                     </a>
                                 </li>
-                                <xsl:if test="$exclude.search.from.webhelp != 'true'">
+                                <xsl:if test="$webhelp.include.search.tab != 'false'">
                                     <li>
                                         <a href="#searchDiv">
                                             <em>
                                     </xsl:apply-templates>
                                 </ul>
                             </div>
-                            <xsl:if test="$exclude.search.from.webhelp != 'true'">
+                            <xsl:if test="$webhelp.include.search.tab != 'false'">
                                 <div id="searchDiv">
                                     <div id="search">
                                         <form onsubmit="Verifie(ditaSearch_Form);return false"