Return-Path: Delivered-To: apmail-incubator-click-commits-archive@minotaur.apache.org Received: (qmail 56585 invoked from network); 1 Mar 2009 21:10:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Mar 2009 21:10:05 -0000 Received: (qmail 44504 invoked by uid 500); 1 Mar 2009 21:10:05 -0000 Delivered-To: apmail-incubator-click-commits-archive@incubator.apache.org Received: (qmail 44491 invoked by uid 500); 1 Mar 2009 21:10:05 -0000 Mailing-List: contact click-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: click-dev@incubator.apache.org Delivered-To: mailing list click-commits@incubator.apache.org Received: (qmail 44475 invoked by uid 99); 1 Mar 2009 21:10:05 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 13:10:05 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Mar 2009 21:10:00 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1FEDC2388975; Sun, 1 Mar 2009 21:09:38 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: click-commits@incubator.apache.org From: sabob@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090301210938.1FEDC2388975@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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 '/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 '/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 @@ + + + + + + + + + + + + + Making backup of ${styles.src.dir}/html/custom.xsl and + + + + + + Making backup of ${styles.src.dir}/pdf/custom.xsl + + + + - + @@ -102,7 +131,7 @@ - + @@ -117,7 +146,7 @@ + description="--> Generate HTML docs in multiple files" depends="init"> @@ -140,7 +169,7 @@ + description="--> Generate HTML docs in a single, big file" depends="init"> @@ -165,6 +194,15 @@ + + + + + + + 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 admin directory: - <security-constraint> + <security-constraint> <web-resource-collection> <web-resource-name>admin</web-resource-name> <url-pattern>/admin/*</url-pattern> @@ -154,7 +154,7 @@ file as security-role elements: - <security-role> + <security-role> <role-name>admin</role-name> </security-role> @@ -195,7 +195,7 @@ For example to use the BASIC authentication method you would specify: - <login-config> + <login-config> <auth-method>BASIC</auth-method> <realm-name>Admin Realm</realm-name> </login-config> @@ -204,7 +204,7 @@ page and the login error page: - <login-config> + <login-config> <auth-method>FORM</auth-method> <realm-name>Secure Realm</realm-name> <form-login-config> @@ -219,8 +219,7 @@ For example: - <!-- login.htm --> -#if ($request.getParameter("auth-error")) + #if ($request.getParameter("auth-error")) <div style="margin-bottom:1em;margin-top:1em;color:red;"> Invalid User Name or Password, please try again.<br/> Please ensure Caps Lock is off. @@ -260,7 +259,7 @@ /not-authorized.htm page. - <web-app> + <web-app> .. @@ -440,7 +439,7 @@ service objects and a Log4J logger object: - public class BasePage extends Page implements ApplicationContextAware { + public class BasePage extends Page implements ApplicationContextAware { /** The Spring application context. */ protected ApplicationContext applicationContext; @@ -502,7 +501,7 @@ and defines the template. For example: - public class BorderPage extends BasePage { + 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): - <click-app> + <click-app> <pages package="com.mycorp.dashboard.page"/> </click-app> @@ -564,10 +563,10 @@ example Click startup listing is provided below: - [Click] [debug] automapped pages: + [Click] [debug] automapped pages: [Click] [debug] /category-tree.htm -> com.mycorp.dashboard.page.CategoryTree [Click] [debug] /process-list.htm -> com.mycorp.dashboard.page.ProcessList -[Click] [debug] /user-list.htm -> com.mycorp.dashboard.page.UserList +[Click] [debug] /user-list.htm -> com.mycorp.dashboard.page.UserList @@ -582,7 +581,7 @@ To forward to another page using the Page class: - public class CustomerListPage extends Page { + 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. - public class CustomerListPage extends Page { + public class CustomerListPage extends Page { public ActionLink customerLink = new ActionLink(this, "onCustomerClick"); @@ -628,7 +627,7 @@ then redirects them to the application home page. - public boolean onLogoutClick() { + public boolean onLogoutClick() { getContext().getSession().invalidate(); setRedirect(HomePage.class); @@ -718,7 +717,7 @@ The best place to define your logger is in a common base page, for example: - public class BasePage extends Page { + public class BasePage extends Page { protected Logger logger; @@ -735,7 +734,7 @@ getLogger() method. - public class CustomerListPage extends BasePage { + public class CustomerListPage extends BasePage { public void onGet() { try { @@ -751,7 +750,7 @@ not required. - public class CustomerListPage extends BasePage { + public class CustomerListPage extends BasePage { public void onGet() { if (getLogger().isDebugEnabled()) { @@ -781,7 +780,7 @@ For example: - <pages package="com.mycorp.page" automapping="true"/> + <pages package="com.mycorp.page" automapping="true"/> <page path="click/error.htm" classname="ErrorPage"/> </pages> @@ -799,7 +798,7 @@ page is provided below: - package com.mycorp.page.ErrorPage; + package com.mycorp.page.ErrorPage; .. public class ErrorPage extends org.apache.click.util.ErrorPage { @@ -914,7 +913,7 @@ Here is an example: - public class HomePage extends Page { + public class HomePage extends Page { private Form form = new Form("form"); @@ -943,7 +942,7 @@ Using the following border-template.htm: - <html> + <html> <head> <title>Click Examples</title> ${cssImports} @@ -958,7 +957,7 @@ the rendered HTML will include one CSS and one JavaScript import: - <html> + <html> <head> <title>Click Examples</title> <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. - <web-app> + <web-app> <servlet> <servlet-name>ClickServlet</servlet-name> @@ -166,7 +166,7 @@ A basic Click app config file is provided below: - <click-app> + <click-app> <pages package="com.mycorp.page"/> @@ -177,7 +177,7 @@ An advanced config file would look like this: - <click-app charset="UTF-8" locale="de"> + <click-app charset="UTF-8" locale="de"> <pages package="com.mycorp.banking.page"> <page path="index.htm" classname="com.mycorp.page.Home"/> @@ -235,7 +235,7 @@ character set to UTF-8 and the default Locale as German (de): - <click-app charset=" UTF-8" locale="de"> + <click-app charset=" UTF-8" locale="de"> .. </click-app> @@ -270,7 +270,7 @@ of multiple packages. - <click-app> + <click-app> <pages package="com.mycorp.banking.page"/> @@ -353,7 +353,7 @@ prefix, for example: - <click-app> + <click-app> <pages package="com.mycorp.page" automapping="false"> <page path="index.htm" classname="Home"/> <page path="search.htm" classname="Search"/> @@ -369,7 +369,7 @@ to index.html) - <click-app> + <click-app> <pages package="com.mycorp.page" automapping="true"> <page path="index.htm" classname="Home"/> </pages> @@ -414,9 +414,9 @@ files under the /tiny_mce directory. - <click-app> + <click-app> <pages package="com.mycorp.page"> - <excludes pattern="/tiny_mce/*"/> + <excludes pattern="/tiny_mce/*"/> </pages> </click-app> @@ -424,9 +424,9 @@ comma separated notation. For example: - <click-app> + <click-app> <pages package="com.mycorp.page"> - <excludes pattern="/dhtml/*, /tiny_mce/*, banner.htm, about.htm"/> + <excludes pattern="/dhtml/*, /tiny_mce/*, banner.htm, about.htm"/> </pages> </click-app> @@ -469,7 +469,7 @@ For example: - public class EmployeePage extends Page { + public class EmployeePage extends Page { public Form employeeForm = new Form(); @@ -499,7 +499,7 @@ The above example is thus a shorthand way of writing the following: - public class EmployeePage extends Page { + public class EmployeePage extends Page { private Form employeeForm = new Form(); @@ -518,7 +518,7 @@ attribute to false, for example: - <click-app> + <click-app> <pages package="com.mycorp.page" autobinding="false"/> </click-app> @@ -560,7 +560,7 @@ define a headers element in your application: - <click-app> + <click-app> <pages> .. </pages> @@ -578,7 +578,7 @@ be a long number value: - <page path="login.htm" classname="com.mycorp.page.Login"> + <page path="login.htm" classname="com.mycorp.page.Login"> <header name="Pragma" value="no-cache"/> <header name="Expires" value="1" type="Date"/> </page> @@ -588,7 +588,7 @@ for a period of 1 hour after which it should be reloaded. - <page path="home.htm" classname="com.mycorp.page.Home"> + <page path="home.htm" classname="com.mycorp.page.Home"> <header name="Cache-Control" value="max-age=3600, public, must-revalidate"/> </page> @@ -596,7 +596,7 @@ element. For example: - <click-app> + <click-app> <pages> .. </pages> @@ -631,9 +631,9 @@ element in the click-app descriptor. For example: - <click-app> + <click-app> .. - <format classname="com.mycorp.util.CustomFormat"/> + <format classname="com.mycorp.util.CustomFormat"/> </click-app> @@ -658,9 +658,9 @@ mode you would add the following mode element: - <click-app> + <click-app> .. - <mode value="production"> + <mode value="production"> </click-app> The application mode configuration can be overridden by setting the @@ -670,7 +670,7 @@ restarting the application. - -Dclick.mode=trace + -Dclick.mode=trace The Click Application modes and their settings for Page auto loading, template caching and logging levels are: @@ -892,11 +892,11 @@ elements to your click.xml file: - <click-app> + <click-app> .. <controls> - <control classname="com.mycorp.control.CustomField"/> + <control classname="com.mycorp.control.CustomField"/> </controls> </click-app> 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 @@ Examples of these two action listener styles are provided below: - public class ActionDemo extends BorderPage { + public class ActionDemo extends BorderPage { // Uses listener style 1 public ActionLink link = new ActionLink(); @@ -595,7 +595,7 @@ div or span element: - public class Div extends AbstractContainer { + public class Div extends AbstractContainer { public Div(String name) { super(name); @@ -613,7 +613,7 @@ documentation) - public class Test { + public class Test { public static void main (String args[]) { // Create mock context in which to test the container. MockContext.initContext(); @@ -632,7 +632,7 @@ Executing the above example results in the following output: - <div name="mydiv" id="mydiv"> + <div name="mydiv" id="mydiv"> <input type="text" name="myfield" id="myfield" value="" size="20" /> </div> @@ -649,7 +649,7 @@ Below is an example of how AbstractContainerField might be used: - public class FieldAndContainer extends AbstractContainerField { + public class FieldAndContainer extends AbstractContainerField { public FieldAndContainer(String name) { super(name); @@ -664,7 +664,7 @@ To test the new class we use the following snippet: - public class Test { + public class Test { public static void main (String args[]) { // Create mock context in which to test the container. MockContext.initContext(); @@ -684,7 +684,7 @@ Executing the snippet produces the output: - <div name="field_container" id="field_container"> + <div name="field_container" id="field_container"> <input type="text" name="myfield" id="myfield" value="" size="20"/> <textarea name="myarea" id="myarea" rows="3" cols="20"></textarea> </div> @@ -732,7 +732,7 @@ and submit button. - // EmployeePage.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: - <!-- employee.htm --> + <!-- employee.htm --> ${form.startTag()} <div style="margin: 1em;"> <ol> @@ -844,7 +844,7 @@ which list item elements <li> can be added: - // HtmlList.java + // HtmlList.java public class HtmlList extends AbstractContainer { public String getTag() { @@ -863,7 +863,7 @@ Next we create the HTML list item element <li>: - // ListItem.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. - // FieldLabel.java + // FieldLabel.java public class FieldLabel extends AbstractControl { private Field target; @@ -921,7 +921,7 @@ to create the custom layout: - // EmployeePage.java + // EmployeePage.java public class EmployeePage extends Page { // A form instance variable private HtmlForm form; @@ -978,13 +978,13 @@ form. - <!--employee.htm--> -${form} + <!--employee.htm--> +${form} which produces the following markup: - <form method="post" id="form" action="/myapp/employee.htm"> + <form method="post" id="form" action="/myapp/employee.htm"> <input type="hidden" name="form_name" id="form_form_name" value="form"/> <ol> <li> 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 @@ First we create a HelloWorld page class: - package examples.page; + package examples.page; import java.util.Date; import org.apache.click.Page; @@ -138,11 +138,12 @@ Next we have a page template hello-world.htm, + Big CatsTigers where we can access the Page's time variable using the reference $time: - <html> + <html> <body> <h2>Hello World</h2> @@ -161,7 +162,7 @@ to the examples.page.HelloWorld page class. - <click-app> + <click-app> <pages package="examples.page"/> </click-app> @@ -177,11 +178,6 @@ object. Velocity then renders the merged template which looks something like: - - Hello - - - + @@ -206,7 +202,7 @@ For example: - public class ControlListenerPage extends Page { + public class ControlListenerPage extends Page { public ActionLink myLink = new ActionLink(); @@ -252,7 +248,7 @@ have the myLink control render the link's href attribute: - <html> + <html> <head> <link type="text/css" rel="stylesheet" href="style.css"></link> </head> @@ -294,7 +290,7 @@ below: - public class SimpleTablePage extends Page { + public class SimpleTablePage extends Page { public Table table = new Table(); @@ -338,7 +334,7 @@ is called. - <html> + <html> <head> $cssImports </head> @@ -397,7 +393,7 @@ A more advanced Table example is provided below: - public class CustomerPage extends Page { + public class CustomerPage extends Page { public Table table = new Table(); public PageLink editLink = new PageLink("Edit", EditCustomer.class); @@ -474,7 +470,7 @@ is called. - <html> + <html> <head> $cssImports </head> @@ -525,7 +521,7 @@ field is automatically added to its list of controls. - public class SimpleForm extends Page { + public class SimpleForm extends Page { public Form form = new Form(); public String msg; @@ -558,7 +554,7 @@ SimpleForm class. - <html> + <html> <head> $cssImports </head> @@ -649,7 +645,7 @@ field is added to the page's model. - public class AdvancedForm extends Page { + public class AdvancedForm extends Page { public Form form = new Form(); public String msg; @@ -725,7 +721,7 @@ AdvancedForm class. - <html> + <html> <head> $cssImports </head> @@ -793,4 +789,4 @@ - \ No newline at end of file + 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 @@ CustomerDetails page: - package com.mycorp.page; + package com.mycorp.page; public class CustomerDetails extends Page { @@ -398,7 +398,7 @@ Our customer-details.htm page template contains: - <html> + <html> <body> Customer ID: $customerId @@ -435,7 +435,7 @@ id request parameter is specified, you could write your own type converter: - public class CustomTypeConverter extends RequestTypeConverter { + public class CustomTypeConverter extends RequestTypeConverter { private CustomerService customerService = new CustomerService(); @@ -463,7 +463,7 @@ the matching page field: - package com.mycorp.page; + package com.mycorp.page; public class CustomerDetails extends Page { @@ -476,7 +476,7 @@ getTypeConverter() method. For example: - public class CustomClickServlet extends ClickServlet { + public class CustomClickServlet extends ClickServlet { /** * @see ClickServlet#getTypeConverter() @@ -519,7 +519,7 @@ the login page. - public class Secure extends Page { + public class Secure extends Page { /** * @see Page#onSecurityCheck() @@ -545,7 +545,7 @@ authenticated by the Serlvet Container you could use a Secure page of: - public class Secure extends Page { + public class Secure extends Page { /** * @see Page#onSecurityCheck() @@ -574,7 +574,7 @@ extend this secure page to provide their functionality. - public class AdminPage extends Page { + public class AdminPage extends Page { /** * @see Page#onSecurityCheck() @@ -600,7 +600,7 @@ you would simply invalidate the session. - public class Logout extends Page { + public class Logout extends Page { /** * @see Page#onInit() @@ -629,7 +629,7 @@ path index.htm: - /** + /** * @see Page#onPost() */ public void onPost() { @@ -659,7 +659,7 @@ page. - public boolean onViewClick() { + public boolean onViewClick() { Long id = viewLink.getValueLong(); Customer customer = CustomerDAO.findByPK(id); @@ -674,7 +674,7 @@ view-customer.htm: - <html> + <html> <head> <title>Customer Details</title> </head> @@ -703,7 +703,7 @@ page as the page to forward the request to. For example: - public boolean onEditClick() { + 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: - public boolean onEditClick() { + public boolean onEditClick() { Long id = viewLink.getValueLong(); Customer customer = CustomerDAO.findByPK(id); @@ -762,7 +762,7 @@ would be: - public boolean onViewClick() { + public boolean onViewClick() { Long id = viewLink.getValueLong(); Customer customer = CustomerDAO.findByPK(id); @@ -803,7 +803,7 @@ provided below: - public boolean onLogoutClick() { + public boolean onLogoutClick() { setRedirect("/logout.htm"); return false; } @@ -820,7 +820,7 @@ For example: - public boolean onLogoutClick() { + public boolean onLogoutClick() { String path = getContext().getPagePath(Logout.class); setRedirect(path); return false; @@ -834,7 +834,7 @@ class in the redirect method. For example: - public boolean onLogoutClick() { + public boolean onLogoutClick() { setRedirect(Logout.class); return false; } @@ -855,7 +855,7 @@ transaction id encoded in the URL. - public class Payment extends Page { + public class Payment extends Page { .. public boolean onOkClick() { @@ -878,7 +878,7 @@ transaction id through the request parameter "transId": - public class TransComplete extends Page { + public class TransComplete extends Page { /** * @see Page#onInit() */ @@ -925,7 +925,7 @@ method, returning the path of the border template to render. For example: - public class BorderedPage extends Page { + public class BorderedPage extends Page { /** * @see Page#getTemplate() @@ -938,7 +938,7 @@ The BorderedPage template border.htm: - <html> + <html> <head> <title>$title</title> <link rel="stylesheet" type="text/css" href="style.css" title="Style"/> @@ -966,7 +966,7 @@ <page path="home.htm" classname="Home"/> - public class Home extends BorderedPage { + public class Home extends BorderedPage { public String title = "Home"; @@ -984,7 +984,7 @@ page together returning: - <html> + <html> <head> <title>Home</title> <link rel="stylesheet" type="text/css" href="style.css" title="Style"/> @@ -1058,7 +1058,7 @@ A direct rendering example is provided below. - /** + /** * Render the Java source file as "text/plain". * * @see Page#onGet() @@ -1134,7 +1134,7 @@ For example: - package com.mycorp.page; + 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 @@ _blank - + images/ .gif @@ -38,7 +38,7 @@ css/stylesheet.css - text/css + text/css book toc,title chapter toc @@ -147,5 +147,92 @@ + + + + java + + + file:///C:\dev\os\apache\click\docbook\click/target/docbook-xsl-snapshot/highlighting/xslthl-config.xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 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 @@ - - - MARK_OF_THE_WEB - - - - - - - - - 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>