]> git.stg.codes - stg.git/blob - doc/xslt/webhelp/docs/content/ch02s02.html
Implemented new command line options parser.
[stg.git] / doc / xslt / webhelp / docs / content / ch02s02.html
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:exsl="http://exslt.org/common" xmlns:ng="http://docbook.org/docbook-ng" xmlns:db="http://docbook.org/ns/docbook"><head>
4 <meta http-equiv="X-UA-Compatible" content="IE=7" />
5 <title>Using and customizing the output</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /><link rel="home" href="index.html" title="README: Web-based Help from DocBook XML" /><link rel="up" href="ch02.html" title="Chapter 2. Using the package" /><link rel="prev" href="ch02s01.html" title="Generating webhelp output" /><link rel="next" href="ch02s03.html" title="Building the indexer" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><script type="text/javascript">
6             //The id for tree cookie
7             var treeCookieId = "treeview-897";
8             var language = "en";
9             var w = new Object();
10             //Localization
11             txt_filesfound = 'Results';
12             txt_enter_at_least_1_char = "You must enter at least one character.";
13             txt_browser_not_supported = "Your browser is not supported. Use of Mozilla Firefox is recommended.";
14             txt_please_wait = "Please wait. Search in progress...";
15             txt_results_for = "Results for: ";
16         </script><style type="text/css">
17             input {
18             margin-bottom: 5px;
19             margin-top: 2px;
20             }
21
22             .folder {
23             display: block;
24             height: 22px;
25             padding-left: 20px;
26             background: transparent url(../common/jquery/treeview/images/folder.gif) 0 0px no-repeat;
27             }
28             </style><link rel="shortcut icon" href="../favicon.ico" type="image/x-icon" /><link rel="stylesheet" type="text/css" href="../common/css/positioning.css" /><link rel="stylesheet" type="text/css" href="../common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css" /><link rel="stylesheet" type="text/css" href="../common/jquery/treeview/jquery.treeview.css" /><script type="text/javascript" src="../common/jquery/jquery-1.4.2.min.js"></script><script type="text/javascript" src="../common/jquery/jquery-ui-1.8.2.custom.min.js"></script><script type="text/javascript" src="../common/jquery/jquery.cookie.js"></script><script type="text/javascript" src="../common/jquery/treeview/jquery.treeview.min.js"></script><script type="text/javascript" src="search/htmlFileList.js"></script><script type="text/javascript" src="search/htmlFileInfoList.js"></script><script type="text/javascript" src="search/nwSearchFnt.js"></script><script type="text/javascript" src="search/stemmers/en_stemmer.js"><!--//make this scalable to other languages as well.--></script><script type="text/javascript" src="search/index-1.js"></script><script type="text/javascript" src="search/index-2.js"></script><script type="text/javascript" src="search/index-3.js"></script></head><body><div id="header"><img style="margin-right: 2px; height: 59px; padding-right: 25px; padding-top: 8px" align="right" src="../common/images/logo.png" alt="Company Logo" /><h1 align="center">Using and customizing the output<br />Chapter 2. Using the package</h1><div id="navheader" align="right"><table><tr><td style="height: 28px; width: 16px;"><a id="showHideButton" onclick="showHideToc();" class="pointLeft" title="Hide TOC tree">.
29                             </a></td><td><img src="../common/images/highlight-blue.gif" alt="H" height="25px" onclick="toggleHighlight()" id="showHideHighlight" style="cursor:pointer" title="Toggle search result highlighting" /></td><td><a accesskey="p" href="ch02s01.html">Prev</a>
30                                         |
31                                         <a accesskey="u" href="ch02.html">Up</a>
32                                     |
33                                     <a accesskey="n" href="ch02s03.html">Next</a></td></tr></table></div></div><div id="content"><div class="section" title="Using and customizing the output"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="id36124011"></a>Using and customizing the output</h2></div></div></div><p>To deep link to a topic inside the help set, simply link directly
34       to the page. This help system uses no frameset, so nothing further is
35       necessary. </p><div class="tip" title="Tip" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Tip</h3><p>See <a class="ulink" href="http://www.sagehill.net/docbookxsl/Chunking.html" target="_top">Chunking into
36           multiple HTML files</a> in Bob Stayton's <a class="ulink" href="http://www.sagehill.net/docbookxsl/index.html" target="_top">DocBook XSL: The
37           Complete Guide</a> for information on controlling output file
38           names and which files are chunked in DocBook.</p></div><p>When you perform a search, the results can include brief
39       summaries. These are populated in one of two ways:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>By adding <code class="sgmltag-element">role="summary"</code> to a
40             <code class="sgmltag-element">para</code> or <code class="sgmltag-element">phrase</code> in the
41             <code class="sgmltag-element">chapter</code> or <code class="sgmltag-element">section</code>.</p></li><li class="listitem"><p>By adding an <code class="sgmltag-element">abstract</code> to the
42             <code class="sgmltag-element">chapterinfo</code> or <code class="sgmltag-element">sectioninfo</code>
43             element.</p></li></ul></div><p>To customize the look and feel of the help, study the following
44       css files:</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p><code class="filename">docs/common/css/positioning.css</code>: This
45             handles the Positioning of DIVs in appropriate positions. For
46             example, it causes the <code class="code">leftnavigation</code> div to appear
47             on the left, the header on top, and so on. Use this if you need to
48             change the relative positions or need to change the width/height
49             etc.</p></li><li class="listitem"><p><code class="filename">docs/common/jquery/theme-redmond/jquery-ui-1.8.2.custom.css</code>:
50             This is the theming part which adds colors and stuff. This is a
51             default theme comes with <a class="ulink" href="http://jqueryui.com/download" target="_top">jqueryui</a> unchanged. You
52             can get any theme based your interest from this. (Themes are on
53             right navigation bar.) Then replace the css theme folder
54             (theme-redmond) with it, and change the xsl to point to the new
55             css.</p></li><li class="listitem"><p><code class="filename">docs/common/jquery/treeview/jquery.treeview.css</code>:
56             This styles the toc Tree. Generally, you don't have to edit this
57             file.</p></li></ul></div><div class="section" title="Recommended Apache configurations"><div class="titlepage"><div><div><h3 class="title"><a id="id36124136"></a>Recommended Apache configurations</h3></div></div></div><p>If you are serving a long document from an Apache web server, we
58         recommend you make the following additions or changes to your
59         <code class="filename">httpd.conf</code> or <code class="filename">.htaccess</code>
60         file. <em><span class="remark">TODO: Explain what each thing
61         does.</span></em></p><pre class="programlisting">AddDefaultCharSet UTF-8 # <a id="AddDefaultCharSet"></a><img src="images/callouts/1.png" alt="1" border="0" />
62   
63       # 480 weeks
64       &lt;FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$"&gt; # <a id="CachingSettings"></a><img src="images/callouts/2.png" alt="2" border="0" />
65       Header set Cache-Control "max-age=290304000, public"
66       &lt;/FilesMatch&gt;
67       
68       # 2 DAYS
69       &lt;FilesMatch "\.(xml|txt)$"&gt;
70       Header set Cache-Control "max-age=172800, public, must-revalidate"
71       &lt;/FilesMatch&gt;
72       
73       # 2 HOURS
74       &lt;FilesMatch "\.(html|htm)$"&gt;
75       Header set Cache-Control "max-age=7200, must-revalidate"
76       &lt;/FilesMatch&gt;
77       
78       # compress text, html, javascript, css, xml:
79       AddOutputFilterByType DEFLATE text/plain # <a id="CompressSetting"></a><img src="images/callouts/3.png" alt="3" border="0" />
80       AddOutputFilterByType DEFLATE text/html
81       AddOutputFilterByType DEFLATE text/xml
82       AddOutputFilterByType DEFLATE text/css
83       AddOutputFilterByType DEFLATE application/xml
84       AddOutputFilterByType DEFLATE application/xhtml+xml
85       AddOutputFilterByType DEFLATE application/rss+xml
86       AddOutputFilterByType DEFLATE application/javascript
87       AddOutputFilterByType DEFLATE application/x-javascript
88       
89       # Or, compress certain file types by extension:
90       &lt;Files *.html&gt; 
91       SetOutputFilter DEFLATE
92       &lt;/Files&gt;
93       </pre><div class="calloutlist"><table border="0" summary="Callout list"><tr><td width="5%" valign="top" align="left"><p><a href="#AddDefaultCharSet"><img src="images/callouts/1.png" alt="1" border="0" /></a> </p></td><td valign="top" align="left"><p>See <a class="ulink" href="http://www.sagehill.net/docbookxsl/SpecialChars.html" target="_top">Odd
94               characters in HTML output</a> in Bob Stayton's book
95               <em class="citetitle">DocBook XSL: The Complete Guide</em> for more
96               information about this setting.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CachingSettings"><img src="images/callouts/2.png" alt="2" border="0" /></a> </p></td><td valign="top" align="left"><p>These lines and those that follow cause the browser to
97               cache various resources such as bitmaps and JavaScript files.
98               Note that caching JavaScript files could cause your users to
99               have stale search indexes if you update your document since the
100               search index is stored in JavaScript files.</p></td></tr><tr><td width="5%" valign="top" align="left"><p><a href="#CompressSetting"><img src="images/callouts/3.png" alt="3" border="0" /></a> </p></td><td valign="top" align="left"><p>These lines cause the the server to compress html, css,
101               and JavaScript files and the brower to uncompress them to
102               improve download performance.</p></td></tr></table></div></div></div><script type="text/javascript" src="../common/main.js"></script><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch02s01.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch02.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch02s03.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> </td></tr></table></div></div><div><div id="leftnavigation" style="padding-top:3px; background-color:white;"><div id="tabs"><ul><li><a href="#treeDiv"><em>Contents</em></a></li><li><a href="#searchDiv"><em>Search</em></a></li></ul><div id="treeDiv"><img src="../common/images/loading.gif" alt="loading table of contents..." id="tocLoading" style="display:block;" /><div id="ulTreeDiv" style="display:none"><ul id="tree" class="filetree"><li><span class="file"><a href="ch01.html">Introduction</a></span></li><li><span class="file"><a href="ch02.html">Using the package</a></span><ul><li><span class="file"><a href="ch02s01.html">Generating webhelp output</a></span></li><li id="webhelp-currentid"><span class="file"><a href="ch02s02.html">Using and customizing the output</a></span><ul><li><span class="file"><a href="ch02s02.html#id36124136">Recommended Apache configurations</a></span></li></ul></li><li><span class="file"><a href="ch02s03.html">Building the indexer</a></span></li><li><span class="file"><a href="ch02s04.html">Adding support for other (non-CJKV) languages</a></span></li></ul></li><li><span class="file"><a href="ch03.html">Developer Docs</a></span><ul><li><span class="file"><a href="ch03s01.html">Design</a></span></li><li><span class="file"><a href="ch03s02.html">Search</a></span><ul><li><span class="file"><a href="ch03s02.html#id36124646">New Stemmers</a></span></li></ul></li></ul></li></ul></div></div><div id="searchDiv"><div id="search"><form onsubmit="Verifie(ditaSearch_Form);return false" name="ditaSearch_Form" class="searchForm" id="ditaSearch_Form"><fieldset class="searchFieldSet"><legend>Search</legend><center><input id="textToSearch" name="textToSearch" type="text" class="searchText" /> &nbsp; <input onclick="Verifie(ditaSearch_Form)" type="button" class="searchButton" value="Go" id="doSearch" /></center></fieldset></form></div><div id="searchResults"><center></center></div></div></div></div></div></body></html>