click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r749107 - in /incubator/click/trunk/tools/docbook: ./ src/css/html/ src/docbook/click/ src/styles/html/ src/styles/pdf/
Date Sun, 01 Mar 2009 21:09:37 GMT
Author: sabob
Date: Sun Mar  1 21:09:36 2009
New Revision: 749107

URL: http://svn.apache.org/viewvc?rev=749107&view=rev
Log:
added syntax highlighting

Removed:
    incubator/click/trunk/tools/docbook/src/css/html/syntax-highlighter.css
    incubator/click/trunk/tools/docbook/src/css/html/syntax-highlighter.js
Modified:
    incubator/click/trunk/tools/docbook/README.txt
    incubator/click/trunk/tools/docbook/build.xml
    incubator/click/trunk/tools/docbook/src/css/html/stylesheet.css
    incubator/click/trunk/tools/docbook/src/docbook/click/chapter-best-practices.xml
    incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml
    incubator/click/trunk/tools/docbook/src/docbook/click/chapter-controls.xml
    incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml
    incubator/click/trunk/tools/docbook/src/docbook/click/chapter-pages.xml
    incubator/click/trunk/tools/docbook/src/styles/html/   (props changed)
    incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
    incubator/click/trunk/tools/docbook/src/styles/html/titlepage.xml
    incubator/click/trunk/tools/docbook/src/styles/pdf/   (props changed)
    incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl

Modified: incubator/click/trunk/tools/docbook/README.txt
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/README.txt?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/README.txt (original)
+++ incubator/click/trunk/tools/docbook/README.txt Sun Mar  1 21:09:36 2009
@@ -27,20 +27,39 @@
 
 This project has the following dependencies:
 
-Ant version 1.7.1: http://ant.apache.org/
-Velocity Docbook Framework (DBF) version 1.0: http://velocity.apache.org/docbook/
-Apache FOP (at least version 0.95): http://xmlgraphics.apache.org/fop/0.95/index.html
-
-Note DBF also ships with Apache FOP, but its an old version which doesn't support
-'soft pagebreaks' (see below) which Click Docs uses extensively.
-
-Download and unzip both the Docbook Framework (DBF) 1.0 and Apache FOP 0.95 somewhere
-on your computer. Once done set the following properties in the file
-project.properties:
+# Ant version 1.7.1: http://ant.apache.org/
+# Velocity Docbook Framework (DBF) version 1.0: http://velocity.apache.org/docbook/
+# Apache FOP (at least version 0.95): http://xmlgraphics.apache.org/fop/0.95/index.html
+# Docbook XLS project version 1.75.0: http://docbook.sourceforge.net/snapshots/
+
+* Note DBF also ships with Apache FOP, but its an old version which does not
+  support 'soft pagebreaks' (see below).
+
+* As of this writing, Docbook-XLS 1.75.0 was not yet available. Instead download
+  the latest snapshot release from: http://docbook.sourceforge.net/snapshots/.
+  The reason for using 1.75.0 is it includes a syntax highlighter package.
+
+Download and unzip both the Docbook Framework (DBF) 1.0, Apache FOP 0.95 and
+Docbook XLS 1.75 (or latest snapshot) somewhere on your computer. Once done set
+the following properties in the file project.properties:
 
   dbf.basedir = directory-where-DBF-is-installed
   fop.basedir = directory-where-FOP-is-installed
 
+The following changes must also be made to DBF:
+
+# Replace the existing docbook-xsl version of DBF with 1.75.0. You can do that
+  by copying docbook-xsl-1.75.0.zip to the DBF folder '<dbf-install>/src/zip/'.
+  You can leave docbook-xsl-1.70.0.zip in the folder or remove it if you wish.
+
+# Now we need to update DBF to the new Docbook XSL version. To do this open the
+  file '<dbf-install>/docbook.properties' and search for the property
+  "dbf.xsl.version". Change its value from '1.70.0' to '1.75.0'. If you are using
+  a snapshot release change the value from '1.70.0' to 'snapshot':
+
+  dbf.xsl.version = snapshot
+
+That's it for setting up the project.
 
 Build Click Docs
 ================
@@ -138,6 +157,20 @@
 
 --------------------------------------------------------------------------------
 
+Added custom syntax highlighting for both HTML and PDF:
+
+Changes made to src/styles/html/custom.xml
+Changes made to src/styles/pdf/custom.xml
+
+--------------------------------------------------------------------------------
+
+Replaced JavaScript Syntax Highlighter with XSLTHL[1] which handles both HTML
+and PDF.
+
+[1]: http://sourceforge.net/projects/xslthl
+
+--------------------------------------------------------------------------------
+
 Added a Code Syntax Highlighter for the HTML generator.
 
 Changes made to src/styles/html/titlepage.xml

Modified: incubator/click/trunk/tools/docbook/build.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/build.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/build.xml (original)
+++ incubator/click/trunk/tools/docbook/build.xml Sun Mar  1 21:09:36 2009
@@ -58,12 +58,41 @@
     <property name="docbook.dir" value="click"/>
     <property name="docbook.file" value="click-book"/>
 
+    <target name="init">
+        <!-- Hack Alert!!!
+            We need to set the property "highlight.xslthl.config" of
+            src/styles/html/custom.xsl and src/styles/pdf/custom.xsl
+            to the location of xslthl-config.xml file.
+        -->
+
+        <!-- Make backup of custom.xsl files -->
+        <available file="${styles.src.dir}/html/custom.xsl.tmp" property="html.config.present"/>
+        <available file="${styles.src.dir}/pdf/custom.xsl.tmp" property="pdf.config.present"/>
+        <antcall target="make-html-backup"/>
+        <antcall target="make-pdf-backup"/>
+
+    </target>
+
+    <target name="make-html-backup" unless="html.config.present">
+        <echo>Making backup of ${styles.src.dir}/html/custom.xsl and</echo>
+        <copy file="${styles.src.dir}/html/custom.xsl"
+            tofile="${styles.src.dir}/html/custom.xsl.tmp"/>
+        <replace file="${styles.src.dir}/html/custom.xsl" token="&gt;PATH_TO_XSLTHL_CONFIG&lt;" value="&gt;file:///${dbf.xsl.dir}/highlighting/xslthl-config.xml&lt;"/>
+    </target>
+
+     <target name="make-pdf-backup" unless="html.config.present">
+        <echo>Making backup of ${styles.src.dir}/pdf/custom.xsl</echo>
+        <copy file="${styles.src.dir}/pdf/custom.xsl"
+            tofile="${styles.src.dir}/pdf/custom.xsl.tmp"/>
+        <replace file="${styles.src.dir}/pdf/custom.xsl" token="&gt;PATH_TO_XSLTHL_CONFIG&lt;" value="&gt;file:///${dbf.xsl.dir}/highlighting/xslthl-config.xml&lt;"/>
+    </target>
+
   <!-- ======================================================================== -->
   <!-- ==                                                                    == -->
   <!-- == Build all the Velocity Docbook Documentation                       == -->
   <!-- ==                                                                    == -->
   <!-- ======================================================================== -->
-    <target name="all" description="--> Build all documentation">
+    <target name="all" description="--> Build all documentation" depends="init">
 
     <!-- Build the Users Guide -->
         <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
@@ -102,7 +131,7 @@
         </classpath>
     </taskdef>
 
-    <target name="pdf" description="Generates a single PDF file" depends="prepare">
+    <target name="pdf" description="Generates a single PDF file" depends="init, prepare">
 
         <transform type="pdf" target="tmp" title="pdf" xsl="fo" dir="${docbook.dir}" file="${docbook.file}"/>
 
@@ -117,7 +146,7 @@
     </target>
 
     <target name="html"
-            description="--> Generate HTML docs in multiple files">
+            description="--> Generate HTML docs in multiple files" depends="init">
 
         <ant antfile="${dbf.basedir}/build-docbook.xml" target="html">
             <property name="docbook.dir" value="${docbook.dir}"/>
@@ -140,7 +169,7 @@
     </target>
 
     <target name="htmlsingle"
-            description="--> Generate HTML docs in a single, big file">
+            description="--> Generate HTML docs in a single, big file" depends="init">
 
         <ant antfile="${dbf.basedir}/build-docbook.xml" target="htmlsingle">
             <property name="docbook.dir" value="${docbook.dir}"/>
@@ -165,6 +194,15 @@
         <copy todir="${target.dir}/resources">
             <fileset dir="${src.dir}/resources/"/>
         </copy>
+
+        <!-- Hack alert!!! Restore the files that was copied in the "init" target -->
+        <copy file="${styles.src.dir}/html/custom.xsl.tmp"
+            tofile="${styles.src.dir}/html/custom.xsl" overwrite="true"/>
+        <delete file="${styles.src.dir}/html/custom.xsl.tmp"/>
+
+        <copy file="${styles.src.dir}/pdf/custom.xsl.tmp"
+            tofile="${styles.src.dir}/pdf/custom.xsl" overwrite="true"/>
+        <delete file="${styles.src.dir}/pdf/custom.xsl.tmp"/>
     </target>
 
   <!-- ======================================================================== -->

Modified: incubator/click/trunk/tools/docbook/src/css/html/stylesheet.css
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/css/html/stylesheet.css?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/css/html/stylesheet.css (original)
+++ incubator/click/trunk/tools/docbook/src/css/html/stylesheet.css Sun Mar  1 21:09:36 2009
@@ -169,7 +169,11 @@
     padding:        0px;
 }
 
-div.note, div.important, div.example, div.informalexample, div.tip, div.caution {
+div.example {
+
+}
+
+div.note, div.important, div.informalexample, div.tip, div.caution {
     margin:         1em;
     padding:        0.5em;
     border:         1px solid gray;
@@ -189,7 +193,6 @@
 div.navfooter, div.navfooter table {
     font-family:    sans-serif;
     font-size:      12px;
-    clear:          both;
 }
 
 div.figure {
@@ -205,15 +208,9 @@
 }
 
 div.example p.title {
-    margin-top:     0em;
-    margin-bottom:  0.6em;
-    text-align:     left;
-    padding-bottom: 0.4em;
-    border-bottom:  solid 1px gray;
 }
 
 div.figure img {
-    /*border:         1px solid gray;*/
     padding:        0.5em;
     margin:         0.5em;
 }
@@ -305,9 +302,56 @@
 }
 
 div.screenshot {
+  /* Clear the float using overflow: hidden*/
+	overflow: hidden;
+  /* IE6 doesn't clear float unless we set width*/
+	width: 100%;
+}
+
+div.screenshot div {
   border: 1px solid gray;
   padding: 1em;
   margin-top: 1em;
   margin-bottom: 1em;
   float: left;
-}
\ No newline at end of file
+}
+
+/* Syntax highlighting styles start */
+.str{color:#2A00FF;}
+.kwd{color:#7F0055;
+    font-weight:bold;}
+.com{color:#3F7F5F;}
+.typ{color:#000;}
+.lit{color:#066;}
+.pun{color:#660;}
+.pln{color:#000;}
+.tag{color:#000099;
+    font-weight:bold;}
+.atn{color:#009900;}
+.atv{color:#000;}
+.dec{color:#606;}
+
+pre.programlisting{
+    padding:1em;
+    border:1px solid #888;
+    text-align: left;
+    line-height: normal;
+}
+
+@media print{
+    .str{color:#2A00FF;}
+    .kwd{color:#7F0055;
+        font-weight:bold;}
+    .com{color:#3F7F5F;
+        font-style:italic;}
+    .typ{color:#000;
+        font-weight:bold;}
+    .lit{color:#044;}
+    .pun{color:#440;}
+    .pln{color:#000;}
+    .tag{color:#000099;
+        font-weight:bold;}
+    .atn{color:#009900;}
+    .atv{color:#000;}
+}
+/* Syntax highlighting styles end */

Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-best-practices.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-best-practices.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-best-practices.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-best-practices.xml Sun Mar  1 21:09:36 2009
@@ -140,7 +140,7 @@
       resources under the <symbol>admin</symbol> directory:
       </para>
 
-      <programlisting>&lt;security-constraint&gt;
+      <programlisting language="xml">&lt;security-constraint&gt;
    &lt;web-resource-collection&gt;
       &lt;web-resource-name&gt;admin&lt;/web-resource-name&gt;
       &lt;url-pattern&gt;<symbol>/admin/*</symbol>&lt;/url-pattern&gt;
@@ -154,7 +154,7 @@
       file as <literal>security-role</literal> elements:
       </para>
 
-      <programlisting>&lt;security-role&gt;
+      <programlisting language="xml">&lt;security-role&gt;
    &lt;role-name&gt;<varname>admin</varname>&lt;/role-name&gt;
 &lt;/security-role&gt;</programlisting>
 
@@ -195,7 +195,7 @@
       For example to use the BASIC authentication method you would specify:
       </para>
 
-      <programlisting>&lt;login-config&gt;
+      <programlisting language="xml">&lt;login-config&gt;
    &lt;auth-method&gt;<varname>BASIC</varname>&lt;/auth-method&gt;
    &lt;realm-name&gt;Admin Realm&lt;/realm-name&gt;
 &lt;/login-config&gt;</programlisting>
@@ -204,7 +204,7 @@
       page and the login error page:
       </para>
 
-      <programlisting>&lt;login-config&gt;
+      <programlisting language="xml">&lt;login-config&gt;
    &lt;auth-method&gt;<varname>FORM</varname>&lt;/auth-method&gt;
    &lt;realm-name&gt;Secure Realm&lt;/realm-name&gt;
    &lt;form-login-config&gt;
@@ -219,8 +219,7 @@
       For example:
       </para>
 
-      <programlisting>&lt;!-- login.htm --&gt;
-<command>#if</command> ($request.getParameter("<symbol>auth-error</symbol>"))
+      <programlisting language="xml"><command>#if</command> ($request.getParameter("<symbol>auth-error</symbol>"))
 &lt;div style="margin-bottom:1em;margin-top:1em;color:red;"&gt;
   Invalid User Name or Password, please try again.&lt;br/&gt;
   Please ensure Caps Lock is off.
@@ -260,7 +259,7 @@
       <filename>/not-authorized.htm</filename> page.
       </para>
 
-      <programlisting>&lt;web-app&gt;
+      <programlisting language="xml">&lt;web-app&gt;
 
     ..
 
@@ -440,7 +439,7 @@
       service objects and a Log4J logger object:
       </para>
 
-      <programlisting>public class BasePage extends Page implements ApplicationContextAware {
+      <programlisting language="java">public class BasePage extends Page implements ApplicationContextAware {
 
     /** The Spring application context. */
     protected ApplicationContext applicationContext;
@@ -502,7 +501,7 @@
       and defines the template. For example:
       </para>
 
-      <programlisting>public class BorderPage extends BasePage {
+      <programlisting language="java">public class BorderPage extends BasePage {
 
     /** The root Menu item. */
     public Menu rootMenu = new Menu();
@@ -554,7 +553,7 @@
     provided below (automapping is enabled by default):
     </para>
 
-    <programlisting>&lt;click-app&gt;
+    <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="com.mycorp.dashboard.page"/&gt;
 &lt;/click-app&gt;</programlisting>
 
@@ -564,10 +563,10 @@
     example Click startup listing is provided below:
     </para>
 
-    <programlisting>[Click] [debug] automapped pages:
+    <literallayout>[Click] [debug] automapped pages:
 [Click] [debug] /category-tree.htm -&gt; com.mycorp.dashboard.page.CategoryTree
 [Click] [debug] /process-list.htm -&gt; com.mycorp.dashboard.page.ProcessList
-[Click] [debug] /user-list.htm -&gt; com.mycorp.dashboard.page.UserList</programlisting>
+[Click] [debug] /user-list.htm -&gt; com.mycorp.dashboard.page.UserList</literallayout>
   </sect1>
 
   <sect1 id="navigation" remap="h2">
@@ -582,7 +581,7 @@
     <para>To forward to another page using the Page class:
     </para>
 
-    <programlisting>public class CustomerListPage extends Page {
+    <programlisting language="java">public class CustomerListPage extends Page {
 
     public ActionLink customerLink = new ActionLink(this,"onCustomerClick");
 
@@ -607,7 +606,7 @@
     through the customer id as a request parameter to the target page.
     </para>
 
-    <programlisting>public class CustomerListPage extends Page {
+    <programlisting language="java">public class CustomerListPage extends Page {
 
     public ActionLink customerLink = new ActionLink(this, "onCustomerClick");
 
@@ -628,7 +627,7 @@
     then redirects them to the application home page.
     </para>
 
-    <programlisting>public boolean onLogoutClick() {
+    <programlisting language="java">public boolean onLogoutClick() {
     getContext().getSession().invalidate();
 
     setRedirect(HomePage.class);
@@ -718,7 +717,7 @@
     <para>The best place to define your logger is in a common base page, for example:
     </para>
 
-    <programlisting>public class BasePage extends Page {
+    <programlisting language="java">public class BasePage extends Page {
 
     protected Logger logger;
 
@@ -735,7 +734,7 @@
     <methodname>getLogger()</methodname> method.
     </para>
 
-    <programlisting>public class CustomerListPage extends BasePage {
+    <programlisting language="java">public class CustomerListPage extends BasePage {
 
     public void onGet() {
         try {
@@ -751,7 +750,7 @@
     not required.
     </para>
 
-    <programlisting>public class CustomerListPage extends BasePage {
+    <programlisting language="java">public class CustomerListPage extends BasePage {
 
     public void onGet() {
         if (getLogger().isDebugEnabled()) {
@@ -781,7 +780,7 @@
     For example:
     </para>
 
-    <programlisting>&lt;pages package="com.mycorp.page" automapping="true"/&gt;
+    <programlisting language="xml">&lt;pages package="com.mycorp.page" automapping="true"/&gt;
   &lt;page path="click/error.htm" classname="ErrorPage"/&gt;
 &lt;/pages&gt;</programlisting>
 
@@ -799,7 +798,7 @@
     page is provided below:
     </para>
 
-    <programlisting>package com.mycorp.page.ErrorPage;
+    <programlisting language="java">package com.mycorp.page.ErrorPage;
 ..
 
 public class ErrorPage extends org.apache.click.util.ErrorPage {
@@ -914,7 +913,7 @@
 
     <para>Here is an example:</para>
 
-    <programlisting>public class HomePage extends Page {
+    <programlisting language="java">public class HomePage extends Page {
 
     private Form form = new Form("form");
 
@@ -943,7 +942,7 @@
     <para>Using the following <filename>border-template.htm</filename>:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Click Examples&lt;/title&gt;
     ${cssImports}
@@ -958,7 +957,7 @@
 
     <para>the rendered HTML will include one CSS and one JavaScript import:</para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Click Examples&lt;/title&gt;
     &lt;link type="text/css" rel="stylesheet"

Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-configuration.xml Sun Mar  1 21:09:36 2009
@@ -94,7 +94,7 @@
     to a ClickServlet is provided below.
     </para>
 
-    <programlisting>&lt;web-app&gt;
+    <programlisting language="xml">&lt;web-app&gt;
 
   &lt;servlet&gt;
     &lt;servlet-name&gt;ClickServlet&lt;/servlet-name&gt;
@@ -166,7 +166,7 @@
     <para>A basic Click app config file is provided below:
     </para>
 
-    <programlisting>&lt;click-app&gt;
+    <programlisting language="xml">&lt;click-app&gt;
 
   &lt;pages package="com.mycorp.page"/&gt;
 
@@ -177,7 +177,7 @@
     <para>An advanced config file would look like this:
     </para>
 
-    <programlisting>&lt;click-app charset="UTF-8" locale="de"&gt;
+    <programlisting language="xml">&lt;click-app charset="UTF-8" locale="de"&gt;
 
   &lt;pages package="com.mycorp.banking.page"&gt;
     &lt;page path="index.htm" classname="com.mycorp.page.Home"/&gt;
@@ -235,7 +235,7 @@
       character set to UTF-8 and the default Locale as German (de):
       </para>
 
-      <programlisting>&lt;click-app charset=" UTF-8" locale="de"&gt;
+      <programlisting language="xml">&lt;click-app charset=" UTF-8" locale="de"&gt;
   ..
 &lt;/click-app&gt;</programlisting>
     </sect2>
@@ -270,7 +270,7 @@
         of multiple packages.
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
 
   &lt;pages package="com.mycorp.banking.page"/&gt;
 
@@ -353,7 +353,7 @@
         prefix, for example:
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="<token>com.mycorp.page</token>" <symbol>automapping</symbol>="false"&gt;
     &lt;page path="index.htm"                    classname="<token>Home</token>"/&gt;
     &lt;page path="search.htm"                   classname="<token>Search</token>"/&gt;
@@ -369,7 +369,7 @@
         to index.html)
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="<token>com.mycorp.page</token>" <symbol>automapping</symbol>="true"&gt;
     &lt;page path="index.htm" classname="Home"/&gt;
   &lt;/pages&gt;
@@ -414,9 +414,9 @@
         files under the <literal>/tiny_mce</literal> directory.
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="com.mycorp.page"&gt;
-    &lt;<symbol>excludes</symbol> pattern="<varname>/tiny_mce/*</varname>"/&gt;
+    <symbol>&lt;excludes</symbol> pattern="<varname>/tiny_mce/*</varname>"/&gt;
   &lt;/pages&gt;
 &lt;/click-app&gt;</programlisting>
 
@@ -424,9 +424,9 @@
           comma separated notation. For example:
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="com.mycorp.page"&gt;
-    &lt;<symbol>excludes</symbol> pattern="<varname>/dhtml/*, /tiny_mce/*, banner.htm, about.htm</varname>"/&gt;
+    <symbol>&lt;excludes</symbol> pattern="<varname>/dhtml/*, /tiny_mce/*, banner.htm, about.htm</varname>"/&gt;
   &lt;/pages&gt;
 &lt;/click-app&gt;</programlisting>
 
@@ -469,7 +469,7 @@
         <para>For example:
         </para>
 
-        <programlisting>public class EmployeePage extends Page {
+        <programlisting language="java">public class EmployeePage extends Page {
 
     public Form employeeForm = new Form();
 
@@ -499,7 +499,7 @@
         <para>The above example is thus a shorthand way of writing the following:
         </para>
 
-        <programlisting>public class EmployeePage extends Page {
+        <programlisting language="java">public class EmployeePage extends Page {
 
     private Form employeeForm = new Form();
 
@@ -518,7 +518,7 @@
         attribute to false, for example:
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="com.mycorp.page" <symbol>autobinding</symbol>="<varname>false</varname>"/&gt;
 &lt;/click-app&gt;</programlisting>
 
@@ -560,7 +560,7 @@
         define a <literal>headers</literal> element in your application:
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages&gt;
      ..
   &lt;/pages&gt;
@@ -578,7 +578,7 @@
         be a long number value:
         </para>
 
-        <programlisting>&lt;page path="login.htm" classname="com.mycorp.page.Login"&gt;
+        <programlisting language="xml">&lt;page path="login.htm" classname="com.mycorp.page.Login"&gt;
   &lt;header name="Pragma" value="no-cache"/&gt;
   &lt;header name="Expires" value="1" type="Date"/&gt;
 &lt;/page&gt;</programlisting>
@@ -588,7 +588,7 @@
         for a period of 1 hour after which it should be reloaded.
         </para>
 
-        <programlisting>&lt;page path="home.htm" classname="com.mycorp.page.Home"&gt;
+        <programlisting language="xml">&lt;page path="home.htm" classname="com.mycorp.page.Home"&gt;
   &lt;header name="Cache-Control" value="max-age=3600, public, must-revalidate"/&gt;
 &lt;/page&gt;</programlisting>
 
@@ -596,7 +596,7 @@
         element. For example:
         </para>
 
-        <programlisting>&lt;click-app&gt;
+        <programlisting language="xml">&lt;click-app&gt;
   &lt;pages&gt;
      ..
   &lt;/pages&gt;
@@ -631,9 +631,9 @@
       element in the click-app descriptor. For example:
       </para>
 
-      <programlisting>&lt;click-app&gt;
+      <programlisting language="xml">&lt;click-app&gt;
   ..
-  &lt;<symbol>format</symbol> classname="<varname>com.mycorp.util.CustomFormat</varname>"/&gt;
+  <symbol>&lt;format</symbol> classname="<varname>com.mycorp.util.CustomFormat</varname>"/&gt;
 &lt;/click-app&gt;</programlisting>
 
     </sect2>
@@ -658,9 +658,9 @@
       mode you would add the following mode element:
       </para>
 
-      <programlisting>&lt;click-app&gt;
+      <programlisting language="xml">&lt;click-app&gt;
   ..
-  &lt;<symbol>mode</symbol> value="<varname>production</varname>"&gt;
+  <symbol>&lt;mode</symbol> value="<varname>production</varname>"&gt;
 &lt;/click-app&gt;</programlisting>
 
       <para>The application mode configuration can be overridden by setting the
@@ -670,7 +670,7 @@
       restarting the application.
       </para>
 
-      <programlisting>-Dclick.mode=trace</programlisting>
+      <literallayout>-Dclick.mode=trace</literallayout>
 
       <para>The Click Application modes and their settings for Page auto loading,
       template caching and logging levels are:
@@ -892,11 +892,11 @@
       elements to your <filename>click.xml</filename> file:
       </para>
 
-      <programlisting>&lt;click-app&gt;
+      <programlisting language="xml">&lt;click-app&gt;
    ..
 
    &lt;controls&gt;
-     &lt;<symbol>control</symbol> classname="<varname>com.mycorp.control.CustomField</varname>"/&gt;
+     <symbol>&lt;control</symbol> classname="<varname>com.mycorp.control.CustomField</varname>"/&gt;
    &lt;/controls&gt;
 &lt;/click-app&gt;</programlisting>
 

Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-controls.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-controls.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-controls.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-controls.xml Sun Mar  1 21:09:36 2009
@@ -197,7 +197,7 @@
     <para>Examples of these two action listener styles are provided below:
     </para>
 
-    <programlisting>public class ActionDemo extends BorderPage {
+    <programlisting language="java">public class ActionDemo extends BorderPage {
 
     // Uses listener style 1
     public ActionLink link = new ActionLink();
@@ -595,7 +595,7 @@
       <emphasis>div</emphasis> or <emphasis>span</emphasis> element:
       </para>
 
-      <programlisting>public class Div extends AbstractContainer {
+      <programlisting language="java">public class Div extends AbstractContainer {
 
     public Div(String name) {
         super(name);
@@ -613,7 +613,7 @@
       documentation)
       </para>
 
-      <programlisting>public class Test {
+      <programlisting language="java">public class Test {
     public static void main (String args[]) {
         // Create mock context in which to test the container.
         MockContext.initContext();
@@ -632,7 +632,7 @@
       <para>Executing the above example results in the following output:
       </para>
 
-      <programlisting>&lt;div name="mydiv" id="mydiv"&gt;
+      <programlisting language="xml">&lt;div name="mydiv" id="mydiv"&gt;
     &lt;input type="text" name="myfield" id="myfield" value="" size="20" /&gt;
 &lt;/div&gt;</programlisting>
 
@@ -649,7 +649,7 @@
       <para>Below is an example of how AbstractContainerField might be used:
       </para>
 
-      <programlisting>public class FieldAndContainer extends AbstractContainerField {
+      <programlisting language="java">public class FieldAndContainer extends AbstractContainerField {
 
     public FieldAndContainer(String name) {
         super(name);
@@ -664,7 +664,7 @@
       <para>To test the new class we use the following snippet:
       </para>
 
-      <programlisting>public class Test {
+      <programlisting language="java">public class Test {
     public static void main (String args[]) {
         // Create mock context in which to test the container.
         MockContext.initContext();
@@ -684,7 +684,7 @@
       <para>Executing the snippet produces the output:
       </para>
 
-      <programlisting>&lt;div name="field_container" id="field_container"&gt;
+      <programlisting language="xml">&lt;div name="field_container" id="field_container"&gt;
     &lt;input type="text" name="myfield" id="myfield" value="" size="20"/&gt;
     &lt;textarea name="myarea" id="myarea" rows="3" cols="20"&gt;&lt;/textarea&gt;
 &lt;/div&gt;</programlisting>
@@ -732,7 +732,7 @@
       and submit button.
       </para>
 
-      <programlisting>// EmployeePage.java
+      <programlisting language="java">// EmployeePage.java
 public EmployeePage extends Page {
 
     private Form form;
@@ -763,7 +763,7 @@
       template as shown below, using a template engine such as Velocity:
       </para>
 
-      <programlisting>&lt;!-- employee.htm --&gt;
+      <programlisting language="xml">&lt;!-- employee.htm --&gt;
 ${form.startTag()}
     &lt;div style="margin: 1em;"&gt;
         &lt;ol&gt;
@@ -844,7 +844,7 @@
       which list item elements &lt;li&gt; can be added:
       </para>
 
-      <programlisting>// HtmlList.java
+      <programlisting language="java">// HtmlList.java
 public class HtmlList extends AbstractContainer {
 
     public String getTag() {
@@ -863,7 +863,7 @@
       <para>Next we create the HTML list item element &lt;li&gt;:
       </para>
 
-      <programlisting>// ListItem.java
+      <programlisting language="java">// ListItem.java
 public class ListItem extends AbstractContainer {
 
     public String getTag() {
@@ -875,7 +875,7 @@
       which renders an HTML label element for a target Field.
       </para>
 
-      <programlisting>// FieldLabel.java
+      <programlisting language="java">// FieldLabel.java
 public class FieldLabel extends AbstractControl {
 
     private Field target;
@@ -921,7 +921,7 @@
       to create the custom layout:
       </para>
 
-      <programlisting>// EmployeePage.java
+      <programlisting language="java">// EmployeePage.java
 public class EmployeePage extends Page {
     // A form instance variable
     private HtmlForm form;
@@ -978,13 +978,13 @@
       <varname>form</varname>.
       </para>
 
-      <programlisting>&lt;!--employee.htm--&gt;
-${<varname>form</varname>}</programlisting>
+      <programlisting language="xml">&lt;!--employee.htm--&gt;
+<varname>${form}</varname></programlisting>
 
       <para>which produces the following markup:
       </para>
 
-      <programlisting>&lt;form method="post" id="form" action="/myapp/employee.htm"&gt;
+      <programlisting language="xml">&lt;form method="post" id="form" action="/myapp/employee.htm"&gt;
 &lt;input type="hidden" name="form_name" id="form_form_name" value="form"/&gt;
     &lt;ol&gt;
         &lt;li&gt;

Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-introduction.xml Sun Mar  1 21:09:36 2009
@@ -109,7 +109,7 @@
     <para>First we create a <classname>HelloWorld</classname> page class:
     </para>
 
-    <programlisting>package <symbol>examples.page</symbol>;
+    <programlisting language="java">package <symbol>examples.page</symbol>;
 
 import java.util.Date;
 import org.apache.click.Page;
@@ -138,11 +138,12 @@
     </calloutlist>
 
     <para>Next we have a page template <varname>hello-world.htm</varname>,
+    <indexterm><primary>Big Cats</primary><secondary>Tigers</secondary></indexterm>
     where we can access the Page's <literal>time</literal> variable using the
     reference <varname>$time</varname>:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;body&gt;
 
     &lt;h2&gt;Hello World&lt;/h2&gt;
@@ -161,7 +162,7 @@
     to the <classname>examples.page.HelloWorld</classname> page class.
     </para>
 
-    <programlisting>&lt;click-app&gt;
+    <programlisting language="xml">&lt;click-app&gt;
   &lt;pages package="<symbol>examples.page</symbol>"/&gt;
 &lt;/click-app&gt;</programlisting>
 
@@ -177,11 +178,6 @@
     object. Velocity then renders the merged template which looks something like:
     </para>
 
-    <screenshot>
-      <graphic fileref="images/introduction/hello-world-screenshot.png" scale="85">Hello</graphic>
-    </screenshot>
-
-    <!--
     <figure id="hello-world-screenshot">
       <title>Hello World Screenshot</title>
       <inlinemediaobject>
@@ -189,7 +185,7 @@
           <imagedata fileref="images/introduction/hello-world-screenshot.png" format="PNG" scale="85"/>
         </imageobject>
       </inlinemediaobject>
-    </figure>-->
+    </figure>
 
   </sect1>
 
@@ -206,7 +202,7 @@
     For example:
     </para>
 
-    <programlisting>public class ControlListenerPage extends Page {
+    <programlisting language="java">public class ControlListenerPage extends Page {
 
     public ActionLink myLink = new ActionLink();
 
@@ -252,7 +248,7 @@
     have the <varname>myLink</varname> control render the link's href attribute:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     &lt;link type="text/css" rel="stylesheet" href="style.css"&gt;&lt;/link&gt;
   &lt;/head&gt;
@@ -294,7 +290,7 @@
     below:
     </para>
 
-    <programlisting>public class SimpleTablePage extends Page {
+    <programlisting language="java">public class SimpleTablePage extends Page {
 
     public Table table = new Table();
 
@@ -338,7 +334,7 @@
     is called.
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     <varname>$cssImports</varname>
   &lt;/head&gt;
@@ -397,7 +393,7 @@
 
     <para>A more advanced Table example is provided below:</para>
 
-    <programlisting>public class CustomerPage extends Page {
+    <programlisting language="java">public class CustomerPage extends Page {
 
     public Table table = new Table();
     public PageLink editLink = new PageLink("Edit", EditCustomer.class);
@@ -474,7 +470,7 @@
     is called.
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     <varname>$cssImports</varname>
   &lt;/head&gt;
@@ -525,7 +521,7 @@
     field is automatically added to its list of controls.
     </para>
 
-    <programlisting>public class SimpleForm extends Page {
+    <programlisting language="java">public class SimpleForm extends Page {
 
     public Form form = new Form();
     public String msg;
@@ -558,7 +554,7 @@
     <classname>SimpleForm</classname> class.
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     <varname>$cssImports</varname>
   &lt;/head&gt;
@@ -649,7 +645,7 @@
     field is added to the page's model.
     </para>
 
-    <programlisting>public class AdvancedForm extends Page {
+    <programlisting language="java">public class AdvancedForm extends Page {
 
     public Form form = new Form();
     public String msg;
@@ -725,7 +721,7 @@
     <classname>AdvancedForm</classname> class.
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     <varname>$cssImports</varname>
   &lt;/head&gt;
@@ -793,4 +789,4 @@
     </sect2>
 
   </sect1>
-</chapter>
\ No newline at end of file
+</chapter>

Modified: incubator/click/trunk/tools/docbook/src/docbook/click/chapter-pages.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/docbook/click/chapter-pages.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/docbook/click/chapter-pages.xml (original)
+++ incubator/click/trunk/tools/docbook/src/docbook/click/chapter-pages.xml Sun Mar  1 21:09:36 2009
@@ -375,7 +375,7 @@
     <classname>CustomerDetails</classname> page:
     </para>
 
-    <programlisting>package com.mycorp.page;
+    <programlisting language="java">package com.mycorp.page;
 
 public class CustomerDetails extends Page {
 
@@ -398,7 +398,7 @@
     <para>Our customer-details.htm page template contains:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
 &lt;body&gt;
 
   Customer ID: <symbol>$</symbol><varname>customerId</varname>
@@ -435,7 +435,7 @@
       id request parameter is specified, you could write your own type converter:
       </para>
 
-      <programlisting>public class CustomTypeConverter extends RequestTypeConverter {
+      <programlisting language="java">public class CustomTypeConverter extends RequestTypeConverter {
 
     private CustomerService customerService = new CustomerService();
 
@@ -463,7 +463,7 @@
       the matching page field:
       </para>
 
-      <programlisting>package com.mycorp.page;
+      <programlisting language="java">package com.mycorp.page;
 
 public class CustomerDetails extends Page {
 
@@ -476,7 +476,7 @@
       <methodname>getTypeConverter()</methodname> method. For example:
       </para>
 
-      <programlisting>public class CustomClickServlet extends ClickServlet {
+      <programlisting language="java">public class CustomClickServlet extends ClickServlet {
 
     /**
      * @see ClickServlet#getTypeConverter()
@@ -519,7 +519,7 @@
       the login page.
       </para>
 
-      <programlisting>public class Secure extends Page {
+      <programlisting language="java">public class Secure extends Page {
 
     /**
      * @see Page#onSecurityCheck()
@@ -545,7 +545,7 @@
       authenticated by the Serlvet Container you could use a Secure page of:
       </para>
 
-      <programlisting>public class Secure extends Page {
+      <programlisting language="java">public class Secure extends Page {
 
     /**
      * @see Page#onSecurityCheck()
@@ -574,7 +574,7 @@
       extend this secure page to provide their functionality.
       </para>
 
-      <programlisting>public class AdminPage extends Page {
+      <programlisting language="java">public class AdminPage extends Page {
 
     /**
      * @see Page#onSecurityCheck()
@@ -600,7 +600,7 @@
       you would simply invalidate the session.
       </para>
 
-      <programlisting>public class Logout extends Page {
+      <programlisting language="java">public class Logout extends Page {
 
     /**
      * @see Page#onInit()
@@ -629,7 +629,7 @@
       path <varname>index.htm</varname>:
       </para>
 
-      <programlisting>/**
+      <programlisting language="java">/**
  * @see Page#onPost()
  */
 public void onPost() {
@@ -659,7 +659,7 @@
         page.
         </para>
 
-        <programlisting>public boolean onViewClick() {
+        <programlisting language="java">public boolean onViewClick() {
     Long id = viewLink.getValueLong();
     Customer customer = CustomerDAO.findByPK(id);
 
@@ -674,7 +674,7 @@
         <varname>view-customer.htm</varname>:
         </para>
 
-        <programlisting>&lt;html&gt;
+        <programlisting language="xml">&lt;html&gt;
  &lt;head&gt;
    &lt;title&gt;Customer Details&lt;/title&gt;
  &lt;/head&gt;
@@ -703,7 +703,7 @@
         page as the page to forward the request to. For example:
         </para>
 
-        <programlisting>public boolean onEditClick() {
+        <programlisting language="java">public boolean onEditClick() {
     Long id = viewLink.getValueLong();
     Customer customer = CustomerDAO.findByPK(id);
 
@@ -724,7 +724,7 @@
         the Page has a unique path. Using this technique the above code becomes:
         </para>
 
-        <programlisting>public boolean onEditClick() {
+        <programlisting language="java">public boolean onEditClick() {
     Long id = viewLink.getValueLong();
     Customer customer = CustomerDAO.findByPK(id);
 
@@ -762,7 +762,7 @@
       would be:
       </para>
 
-      <programlisting>public boolean onViewClick() {
+      <programlisting language="java">public boolean onViewClick() {
     Long id = viewLink.getValueLong();
     Customer customer = CustomerDAO.findByPK(id);
 
@@ -803,7 +803,7 @@
       provided below:
       </para>
 
-      <programlisting>public boolean onLogoutClick() {
+      <programlisting language="java">public boolean onLogoutClick() {
     setRedirect("/logout.htm");
     return false;
 }</programlisting>
@@ -820,7 +820,7 @@
       For example:
       </para>
 
-      <programlisting>public boolean onLogoutClick() {
+      <programlisting language="java">public boolean onLogoutClick() {
     String path = getContext().getPagePath(Logout.class);
     setRedirect(path);
     return false;
@@ -834,7 +834,7 @@
       class in the redirect method. For example:
       </para>
 
-      <programlisting>public boolean onLogoutClick() {
+      <programlisting language="java">public boolean onLogoutClick() {
     setRedirect(Logout.class);
     return false;
 }</programlisting>
@@ -855,7 +855,7 @@
         transaction id encoded in the URL.
         </para>
 
-        <programlisting>public class Payment extends Page {
+        <programlisting language="java">public class Payment extends Page {
     ..
 
     public boolean onOkClick() {
@@ -878,7 +878,7 @@
         transaction id through the request parameter <varname>"transId"</varname>:
         </para>
 
-        <programlisting>public class TransComplete extends Page {
+        <programlisting language="java">public class TransComplete extends Page {
     /**
      * @see Page#onInit()
      */
@@ -925,7 +925,7 @@
     method, returning the path of the border template to render. For example:
     </para>
 
-    <programlisting>public class BorderedPage extends Page {
+    <programlisting language="java">public class BorderedPage extends Page {
 
     /**
      * @see Page#getTemplate()
@@ -938,7 +938,7 @@
     <para>The BorderedPage template <varname>border.htm</varname>:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;<varname>$title</varname>&lt;/title&gt;
     &lt;link rel="stylesheet" type="text/css" href="style.css" title="Style"/&gt;
@@ -966,7 +966,7 @@
 
     <literallayout>&lt;page path="<varname>home.htm</varname>" classname="<token>Home</token>"/&gt;</literallayout>
 
-    <programlisting>public class Home extends BorderedPage {
+    <programlisting language="java">public class Home extends BorderedPage {
 
     public String title = "Home";
 
@@ -984,7 +984,7 @@
     page together returning:
     </para>
 
-    <programlisting>&lt;html&gt;
+    <programlisting language="xml">&lt;html&gt;
   &lt;head&gt;
     &lt;title&gt;Home&lt;/title&gt;
     &lt;link rel="stylesheet" type="text/css" href="style.css" title="Style"/&gt;
@@ -1058,7 +1058,7 @@
     <para>A direct rendering example is provided below.
     </para>
 
-    <programlisting>/**
+    <programlisting language="java">/**
  * Render the Java source file as "text/plain".
  *
  * @see Page#onGet()
@@ -1134,7 +1134,7 @@
     For example:
     </para>
 
-    <programlisting>package com.mycorp.page;
+    <programlisting language="java">package com.mycorp.page;
 
 import java.io.Serializable;
 

Propchange: incubator/click/trunk/tools/docbook/src/styles/html/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Mar  1 21:09:36 2009
@@ -0,0 +1 @@
+custom.xsl.tmp

Modified: incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/html/custom.xsl Sun Mar  1 21:09:36 2009
@@ -27,7 +27,7 @@
 
   <xsl:param name="ulink.target">_blank</xsl:param>
 
-<!-- Activate Graphics -->
+  <!-- Activate Graphics -->
   <xsl:param name="admon.graphics" select="1"/>
   <xsl:param name="admon.graphics.path">images/</xsl:param>
   <xsl:param name="admon.graphics.extension">.gif</xsl:param>
@@ -38,7 +38,7 @@
 
   <xsl:param name="table.borders.with.css" select="1"/>
   <xsl:param name="html.stylesheet">css/stylesheet.css</xsl:param>
-  <xsl:param name="html.stylesheet.type">text/css</xsl:param>         
+  <xsl:param name="html.stylesheet.type">text/css</xsl:param>
   <xsl:param name="generate.toc">
   book      toc,title
   chapter   toc
@@ -147,5 +147,92 @@
     <xsl:copy-of select="$link"/>
   </xsl:template>
 
+  <!--
+  This section enables source highlighting and custom colors
+  -->
+  <xsl:param name="highlight.source" select="1"/>
+  <xsl:output indent="no"/>
+  <xsl:param name="highlight.default.language">java</xsl:param>
+
+  <!--
+  Ant will automatically replace PATH_TO_XSLTHL_CONFIG with the path to
+  the config at runtime
+  -->
+  <xsl:param name="highlight.xslthl.config">file:///C:\dev\os\apache\click\docbook\click/target/docbook-xsl-snapshot/highlighting/xslthl-config.xml</xsl:param>
+
+  <xsl:template match='xslthl:keyword' mode="xslthl">
+    <span class="kwd">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:string' mode="xslthl">
+    <span class="str">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:comment' mode="xslthl">
+    <span class="com">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:directive' mode="xslthl">
+    <span class="dec">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:tag' mode="xslthl">
+    <span class="tag">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:attribute' mode="xslthl">
+    <span class="atn">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:value' mode="xslthl">
+    <span class="pln">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:number' mode="xslthl">
+    <span class="lit">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:annotation' mode="xslthl">
+    <span class="pun">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <!-- Not sure which element will be in final XSLTHL 2.0 -->
+  <xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl">
+    <span class="com">
+      <xsl:apply-templates mode="xslthl"/>
+    </span>
+  </xsl:template>
+
+  <xsl:template match='xslthl:html' mode="xslthl">
+    <b>
+      <i style="color: red">
+        <xsl:apply-templates mode="xslthl"/>
+      </i>
+    </b>
+  </xsl:template>
+
+  <xsl:template match='xslthl:xslt' mode="xslthl">
+    <b style="color: #0066FF">
+      <xsl:apply-templates mode="xslthl"/>
+    </b>
+  </xsl:template>
 
 </xsl:stylesheet>

Modified: incubator/click/trunk/tools/docbook/src/styles/html/titlepage.xml
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/html/titlepage.xml?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/html/titlepage.xml (original)
+++ incubator/click/trunk/tools/docbook/src/styles/html/titlepage.xml Sun Mar  1 21:09:36 2009
@@ -25,20 +25,6 @@
 
 <!-- ==================================================================== -->
 
-<!-- CLICK HIGHLIGHTER CHANGES START -->
-<xsl:template name="system.head.content">
-  <xsl:comment> MARK_OF_THE_WEB </xsl:comment>
-</xsl:template>
-
-<xsl:template name="user.head.content">
-  <link rel="stylesheet" href="css/syntax-highlighter.css" type="text/css"/>
-  <script src="css/syntax-highlighter.js" type="text/javascript"></script>
-  <script type="text/javascript">
-      window.onload=function() {prettyPrint();};
-  </script>
-</xsl:template>
-<!-- CLICK HIGHLIGHTER CHANGES END-->
-
 <t:titlepage t:element="book" t:wrapper="div" class="titlepage">
   <t:titlepage-content t:side="recto">
     <title/>

Propchange: incubator/click/trunk/tools/docbook/src/styles/pdf/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Mar  1 21:09:36 2009
@@ -0,0 +1 @@
+custom.xsl.tmp

Modified: incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl
URL: http://svn.apache.org/viewvc/incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl?rev=749107&r1=749106&r2=749107&view=diff
==============================================================================
--- incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl (original)
+++ incubator/click/trunk/tools/docbook/src/styles/pdf/custom.xsl Sun Mar  1 21:09:36 2009
@@ -377,4 +377,89 @@
     </fo:inline>
   </xsl:template>
 
+  <!--
+  This section covers source highlighting customisation
+  -->
+  
+  <xsl:param name="highlight.source" select="1"/>
+  <xsl:output indent="no"/>
+  <xsl:param name="highlight.default.language">java</xsl:param>
+
+ <!--
+  Ant will automatically replace PATH_TO_XSLTHL_CONFIG with the path to
+  the config at runtime
+  -->
+  <xsl:param name="highlight.xslthl.config">PATH_TO_XSLTHL_CONFIG</xsl:param>
+
+  <xsl:template match='xslthl:keyword' mode="xslthl">
+    <fo:inline font-weight="bold" color="#7F0055">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:string' mode="xslthl">
+    <fo:inline color="#2A00FF">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:comment' mode="xslthl">
+    <fo:inline color="#3F7F5F">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:value' mode="xslthl">
+    <fo:inline color="black">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:tag' mode="xslthl">
+    <fo:inline font-weight="bold" color="#000099">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:attribute' mode="xslthl">
+    <fo:inline color="#009900">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:char' mode="xslthl">
+    <fo:inline font-style="italic" color="yellow">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:number' mode="xslthl">
+    <fo:inline color="#006666">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:annotation' mode="xslthl">
+    <fo:inline color="gray">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:directive' mode="xslthl">
+    <xsl:apply-templates mode="xslthl"/>
+  </xsl:template>
+
+<!-- Not sure which element will be in final XSLTHL 2.0 -->
+  <xsl:template match='xslthl:doccomment|xslthl:doctype' mode="xslthl">
+    <fo:inline color="#3F7F5F">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
+  <xsl:template match='xslthl:html' mode="xslthl">
+    <fo:inline color="green">
+      <xsl:apply-templates mode="xslthl"/>
+    </fo:inline>
+  </xsl:template>
+
 </xsl:stylesheet>



Mime
View raw message