home *** CD-ROM | disk | FTP | other *** search
/ Cricao de Sites - 650 Layouts Prontos / WebMasters.iso / Servidores / apache_2.2.8-win32-x86-no_ssl.msi / Data1.cab / _229F0EBF8EA7A082EE3FF6C81B8EA0EB < prev    next >
Extensible Markup Language  |  2006-07-11  |  15KB  |  317 lines

  1. <?xml version="1.0"?>
  2.  
  3. <!--
  4.  Licensed to the Apache Software Foundation (ASF) under one or more
  5.  contributor license agreements.  See the NOTICE file distributed with
  6.  this work for additional information regarding copyright ownership.
  7.  The ASF licenses this file to You under the Apache License, Version 2.0
  8.  (the "License"); you may not use this file except in compliance with
  9.  the License.  You may obtain a copy of the License at
  10.  
  11.      http://www.apache.org/licenses/LICENSE-2.0
  12.  
  13.  Unless required by applicable law or agreed to in writing, software
  14.  distributed under the License is distributed on an "AS IS" BASIS,
  15.  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  16.  See the License for the specific language governing permissions and
  17.  limitations under the License.
  18. -->
  19.  
  20. <!DOCTYPE xsl:stylesheet [
  21.     <!ENTITY lf SYSTEM "../xsl/util/lf.xml">
  22. ]>
  23. <xsl:stylesheet version="1.0"
  24.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  25.                   xmlns="">
  26.  
  27. <!-- the accompanying server version -->
  28. <xsl:param name="httpd.version" select="'generic'" />
  29.  
  30. <!-- create nodeset for referencing later                                 -->
  31. <xsl:variable name="htmlhelp.def" select="document('')/xsl:stylesheet
  32.                                         /xsl:template[@name='htmlhelp.def']" />
  33.  
  34. <!-- ==================================================================== -->
  35. <!-- <sitemap>                                                            -->
  36. <!-- Create CHM project file from sitemap                                 -->
  37. <!-- The file is an *.ini format text file                                -->
  38. <!-- ==================================================================== -->
  39. <xsl:template match="/sitemap">
  40.  
  41. <!-- static information                                               -->
  42. <!-- **************************************************************** -->
  43. <xsl:text>[OPTIONS]</xsl:text>&lf;
  44. <xsl:text>Binary TOC=No</xsl:text>&lf;
  45. <xsl:text>Compatibility=1.0</xsl:text>&lf;
  46.  
  47. <!-- resulting filename -->
  48. <xsl:text>Compiled file=httpd-docs-</xsl:text>
  49. <xsl:value-of select="$httpd.version" />
  50. <xsl:text>.</xsl:text>
  51. <xsl:value-of select="$doclang" />
  52. <xsl:text>.chm</xsl:text>&lf;
  53.  
  54. <xsl:text>Contents file=toc.hhc</xsl:text>&lf;
  55. <xsl:text>Default Window=Main</xsl:text>&lf;
  56. <xsl:text>Default topic=index.html</xsl:text>&lf;
  57.  
  58. <!-- compiler related -->
  59. <xsl:text>Display compile progress=Yes</xsl:text>&lf;
  60. <xsl:text>Enhanced decompilation=Yes</xsl:text>&lf;
  61.  
  62. <!-- search related -->
  63. <xsl:text>Full-text search=Yes</xsl:text>&lf;
  64. <xsl:text>Language=</xsl:text>
  65. <xsl:value-of select="$hhp-lang" />&lf;
  66.  
  67. <!-- title of the help file -->
  68. <xsl:text>Title=</xsl:text>
  69. <xsl:value-of select="normalize-space($message[@id='apachehttpserver'])"/>&lf;&lf;
  70.  
  71. <!-- main window definition -->
  72. <xsl:text>[WINDOWS]</xsl:text>&lf;
  73. <xsl:text>Main=</xsl:text>
  74.  
  75. <!-- title -->
  76. <xsl:text>"</xsl:text>
  77. <xsl:value-of select="normalize-space($message[@id='apachehttpserver'])"/>
  78. <xsl:text>",</xsl:text>
  79.  
  80. <!-- toc file -->
  81. <xsl:text>"toc.hhc",</xsl:text>
  82.  
  83. <!-- index file (currently none) -->
  84. <xsl:text>,</xsl:text>
  85.  
  86. <!-- default file (startup) -->
  87. <xsl:text>"index.html",</xsl:text>
  88.  
  89. <!-- Home button file -->
  90. <xsl:text>"index.html",</xsl:text>
  91.  
  92. <!-- Jump 1 url, text -->
  93. <xsl:text>,,</xsl:text>
  94.  
  95. <!-- Jump 2 url, text -->
  96. <xsl:text>,,</xsl:text>
  97.  
  98. <!-- navigation pane style (0x1e357e) -->
  99. <xsl:call-template name="helper.number2hex">
  100.     <xsl:with-param name="number" select="sum($htmlhelp.def/navigation/style
  101.                                               [@selected='yes'])" />
  102. </xsl:call-template>
  103. <xsl:text>,</xsl:text>
  104.  
  105. <!-- navigation pane initial width (px) -->
  106. <xsl:text>180,</xsl:text>
  107.  
  108. <!-- button mask -->
  109. <xsl:call-template name="helper.number2hex">
  110.     <xsl:with-param name="number" select="sum($htmlhelp.def/buttons/button
  111.                                               [@visible='yes'])" />
  112. </xsl:call-template>
  113. <xsl:text>,</xsl:text>
  114.  
  115. <!-- Initial Position [Left, Top, Right, Bottom] -->
  116. <xsl:text>[0,0,600,380],</xsl:text>
  117.  
  118. <!-- window style -->
  119. <xsl:call-template name="helper.number2hex">
  120.     <xsl:with-param name="result" select="'0000'" /> <!-- << 16 -->
  121.     <xsl:with-param name="number" select="sum($htmlhelp.def/windowstyle/style
  122.                                               [@selected='yes'])" />
  123. </xsl:call-template>
  124. <xsl:text>,</xsl:text>
  125.  
  126. <!-- extended style -->
  127. <xsl:text>,</xsl:text>
  128.  
  129. <!-- flag: navigation pane initial closed (=1) -->
  130. <xsl:text>,</xsl:text>
  131.  
  132. <!-- unknown, default pane, unknown, unknown -->
  133. <xsl:text>,,,0</xsl:text>&lf;&lf;
  134.  
  135. <!-- file list                                                        -->
  136. <!-- **************************************************************** -->
  137. <xsl:text>[FILES]</xsl:text>&lf;
  138.  
  139. <!-- not automatically sucked in. (because only @import()ed) -->
  140. <xsl:text>style\css\manual.css</xsl:text>&lf;
  141. <xsl:text>style\css\manual-loose-100pc.css</xsl:text>&lf;
  142.  
  143. <!-- include project file itself for easier recompiling -->
  144. <xsl:text>manual.hhp</xsl:text>&lf;
  145.  
  146. <!-- and now all sitemap-listed files -->
  147. <xsl:for-each select="category">
  148.     <xsl:apply-templates select="page[@href]" />
  149.     <xsl:if test="@id = 'modules'">
  150.         <xsl:apply-templates select="document($allmodules)/modulefilelist
  151.                                      /modulefile" />
  152.     </xsl:if>
  153. </xsl:for-each>&lf;
  154. </xsl:template>
  155. <!-- /sitemap -->
  156.  
  157.  
  158. <!-- ==================================================================== -->
  159. <!-- files referenced in sitemap                                          -->
  160. <!-- ==================================================================== -->
  161. <xsl:template match="category/page">
  162. <xsl:variable name="filename">
  163.     <xsl:choose>
  164.     <xsl:when test="contains(@href, '#') and substring(@href,
  165.                     string-length(substring-before(@href, '#')), 1) = '/'">
  166.         <xsl:value-of select="substring-before(@href, '#')" />
  167.         <xsl:text>index.html</xsl:text>
  168.     </xsl:when>
  169.     <xsl:when test="substring(@href, string-length(@href), 1) = '/'">
  170.         <xsl:value-of select="@href"/>
  171.         <xsl:text>index.html</xsl:text>
  172.     </xsl:when>
  173.     <xsl:otherwise>
  174.         <xsl:value-of select="@href"/>
  175.     </xsl:otherwise>
  176.     </xsl:choose>
  177. </xsl:variable>
  178.  
  179. <xsl:value-of select="translate($filename, '/', '\')" />&lf;
  180. </xsl:template>
  181. <!-- /page[@href] -->
  182.  
  183.  
  184. <!-- ==================================================================== -->
  185. <!-- list module files                                                    -->
  186. <!-- ==================================================================== -->
  187. <xsl:template match="modulefilelist/modulefile">
  188. <xsl:text>mod\</xsl:text>
  189. <xsl:value-of select="substring-before(normalize-space(.), '.xml')" />
  190. <xsl:text>.html</xsl:text>&lf;
  191. </xsl:template>
  192. <!-- /modulefilelist/modulefile -->
  193.  
  194.  
  195. <!-- ==================================================================== -->
  196. <!-- convert number to its hexadecimal representation.                    -->
  197. <!-- I could not find a built-in function, so write our own ... *sigh*    -->
  198. <!-- ==================================================================== -->
  199. <xsl:template name="helper.number2hex">
  200. <xsl:param name="number" />
  201. <xsl:param name="result" />
  202.  
  203. <xsl:choose>
  204. <xsl:when test="number($number) > 0">
  205.     <xsl:call-template name="helper.number2hex">
  206.         <xsl:with-param name="number" select="floor(number($number) div 16)" />
  207.         <xsl:with-param name="result"
  208.             select="concat(substring('0123456789abcdef',
  209.                                      (number($number) mod 16) + 1, 1),
  210.                            $result)" />
  211.     </xsl:call-template>
  212. </xsl:when>
  213. <xsl:otherwise>
  214.     <!-- if zero, don't print anything. hh.exe (the viewer) seems to -->
  215.     <!-- prefer an empty value -->
  216.     <xsl:if test="string-length(translate($result, '0', '')) > 0">
  217.         <xsl:text>0x</xsl:text>
  218.         <xsl:value-of select="$result" />
  219.     </xsl:if>
  220. </xsl:otherwise>
  221. </xsl:choose>
  222. </xsl:template>
  223. <!-- /helper.number2hex -->
  224.  
  225.  
  226. <!-- ==================================================================== -->
  227. <!-- some of the values are derived from htmlhelp.h                       -->
  228. <!-- do NOT call this template, it's referenced automagically via         -->
  229. <!-- document() function and acts as simple data container.               -->
  230. <!--                                                                      -->
  231. <!-- Hints: 'ni' means 'not implemented' (by the help viewer)             -->
  232. <!--        'ns' means 'not useful for standalone help file'              -->
  233. <!-- ==================================================================== -->
  234. <xsl:template name="htmlhelp.def">
  235. <navigation>
  236.     <style               >        1</style> <!-- auto hide nav. pane   <<  0 -->
  237.     <style               >        2</style> <!-- ns: topmost window    <<  1 -->
  238.     <style               >        4</style> <!-- ns: no title bar      <<  2 -->
  239.     <style               >        8</style> <!-- ns: no win. style     <<  3 -->
  240.     <style               >       16</style> <!-- ns: no ext. style     <<  4 -->
  241.     <style selected="yes">       32</style> <!-- use tri-pane win.     <<  5 -->
  242.     <style               >       64</style> <!-- no toolbar text       <<  6 -->
  243.     <style               >      128</style> <!-- ns: send WM_QUIT      <<  7 -->
  244.     <style selected="yes">      256</style> <!-- toc auto sync         <<  8 -->
  245.     <style               >      512</style> <!-- ns: send track. not.  <<  9 -->
  246.     <style selected="yes">     1024</style> <!-- search tab            << 10 -->
  247.     <style               >     2048</style> <!-- ni(?): history tab    << 11 -->
  248.     <style selected="yes">     4096</style> <!-- favorites tab         << 12 -->
  249.     <style               >     8192</style> <!-- ni(?): title sync     << 13 -->
  250.     <style               >    16384</style> <!-- nav. only             << 14 -->
  251.     <style               >    32768</style> <!-- no toolbar            << 15 -->
  252.     <style selected="yes">    65536</style> <!-- show menu             << 16 -->
  253.     <style selected="yes">   131072</style> <!-- advanced search       << 17 -->
  254.     <style selected="yes">   262144</style> <!-- safe user's win. size << 18 -->
  255.     <style               >   524288</style> <!-- custom tab 1          << 19 -->
  256.     <style               >  1048576</style> <!-- custom tab 2          << 20 -->
  257.     <style               >  2097152</style> <!-- custom tab 3          << 21 -->
  258.     <style               >  4194304</style> <!-- custom tab 4          << 22 -->
  259.     <style               >  8388608</style> <!-- custom tab 5          << 23 -->
  260.     <style               > 16777216</style> <!-- custom tab 6          << 24 -->
  261.     <style               > 33554432</style> <!-- custom tab 7          << 25 -->
  262.     <style               > 67108864</style> <!-- custom tab 8          << 26 -->
  263.     <style               >134217728</style> <!-- custom tab 9          << 27 -->
  264.     <style               >268435456</style> <!-- window has margin (?) << 28 -->
  265. </navigation>
  266.  
  267. <buttons>
  268.     <button visible="yes">      2</button> <!-- expand/contract   <<  1 -->
  269.     <button visible="yes">      4</button> <!-- back              <<  2 -->
  270.     <button visible="yes">      8</button> <!-- forward           <<  3 -->
  271.     <button visible="yes">     16</button> <!-- Stop              <<  4 -->
  272.     <button              >     32</button> <!-- Refresh           <<  5 -->
  273.     <button visible="yes">     64</button> <!-- Home              <<  6 -->
  274.     <button              >    128</button> <!-- ni: browse fwd    <<  7 -->
  275.     <button              >    256</button> <!-- ni: browse back   <<  8 -->
  276.     <button              >    512</button> <!-- ni: notes         <<  9 -->
  277.     <button              >   1024</button> <!-- ni: contents      << 10 -->
  278.     <button visible="yes">   2048</button> <!-- Sync TOC          << 11 -->
  279.     <button visible="yes">   4096</button> <!-- Options           << 12 -->
  280.     <button visible="yes">   8192</button> <!-- Print             << 13 -->
  281.     <button              >  16384</button> <!-- ni: index         << 14 -->
  282.     <button              >  32768</button> <!-- ni: search        << 15 -->
  283.     <button              >  65536</button> <!-- ni: history       << 16 -->
  284.     <button              > 131072</button> <!-- ni: favorites     << 17 -->
  285.     <button              > 262144</button> <!-- Jump 1            << 18 -->
  286.     <button              > 524288</button> <!-- Jump 2            << 19 -->
  287.     <button visible="yes">1048576</button> <!-- (Font) Zoom       << 20 -->
  288.     <!-- the following work only with binary toc, which unfortunately   -->
  289.     <!-- seems to eat the different icons ...                           -->
  290.     <button              >2097152</button> <!-- TOC next          << 21 -->
  291.     <button              >4194304</button> <!-- TOC prev          << 22 -->
  292. </buttons>
  293.  
  294. <windowstyle>
  295.     <!-- all the stuff is additionally shifted << 16 (by the caller) -->
  296.     <style selected="yes">    1</style> <!-- maximize box     <<  0 -->
  297.     <style selected="yes">    2</style> <!-- minimize box     <<  1 -->
  298.     <style selected="yes">    4</style> <!-- thick frame      <<  2 -->
  299.     <style selected="yes">    8</style> <!-- system menu      <<  3 -->
  300.     <style               >   16</style> <!-- horiz. scroll    <<  4 -->
  301.     <style               >   32</style> <!-- vertic. scroll   <<  5 -->
  302.     <style selected="yes">   64</style> <!-- dialog frame     <<  6 -->
  303.     <style selected="yes">  128</style> <!-- border           <<  7 -->
  304.     <style selected="yes">  256</style> <!-- maximize         <<  8 -->
  305.     <style               >  512</style> <!-- clip child win.  <<  9 -->
  306.     <style               > 1024</style> <!-- clip sibl. win.  << 10 -->
  307.     <style               > 2048</style> <!-- disabled         << 11 -->
  308.     <style selected="yes"> 4096</style> <!-- visible          << 12 -->
  309.     <style selected="yes"> 8192</style> <!-- minimize         << 13 -->
  310.     <style               >16384</style> <!-- child window     << 14 -->
  311.     <style               >32768</style> <!-- pop-up           << 15 -->
  312. </windowstyle>
  313. </xsl:template>
  314. <!-- /htmlhelp.def -->
  315.  
  316. </xsl:stylesheet>
  317.