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 / _868E4B7B3E79A61B7F9A466D56F9CE29 < prev    next >
Extensible Markup Language  |  2006-07-11  |  8KB  |  200 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 "util/lf.xml">
  22. ]>
  23. <xsl:stylesheet version="1.0"
  24.               xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  25.                   xmlns="http://www.w3.org/1999/xhtml">
  26.  
  27. <!-- ==================================================================== -->
  28. <!-- <faq>                                                                -->
  29. <!-- Process an entire document into an HTML page                         -->
  30. <!-- ==================================================================== -->
  31. <xsl:template match="faq">
  32. <html xml:lang="{$doclang}" lang="{$doclang}">
  33.     <xsl:call-template name="head"/>&lf;
  34.  
  35.     <body id="manual-page">
  36.         <!-- unsqueeze if there's no sidebar -->
  37.         <xsl:if test="   not(count(section) > 1
  38.                       or (/faq/@all-in-one = 'yes')
  39.                       or seealso)">
  40.             <xsl:attribute name="class">no-sidebar</xsl:attribute>
  41.         </xsl:if>
  42.  
  43.         <xsl:call-template name="top" />          
  44.  
  45.         <div id="page-content">
  46.             <div id="preamble">        
  47.                 <h1>
  48.                     <xsl:value-of select="title" />
  49.                 </h1>&lf;
  50.  
  51.                 <xsl:call-template name="langavail" />&lf;
  52.  
  53.                 <xsl:apply-templates select="summary"/>
  54.             </div>&lf; <!-- /#preamble -->
  55.  
  56.             <xsl:if
  57.                 test="(    not($is-chm)
  58.                        and (count(section) > 1 or (/faq/@all-in-one = 'yes')))
  59.                       or seealso">
  60.                 <div id="quickview">
  61.                     <xsl:if test="not($is-chm)">
  62.                         <xsl:if test="count(section) > 1">
  63.                             <ul id="toc">
  64.                                 <xsl:apply-templates
  65.                                     select="section" mode="index" />
  66.                             </ul>
  67.                         </xsl:if>
  68.  
  69.                         <xsl:if test="/faq/@all-in-one = 'yes'">
  70.                             <ul id="toc">
  71.                             <li>
  72.                                 <img src="{$path}/images/down.gif" alt="" />
  73.                                 <xsl:text> </xsl:text>
  74.                                 <a href="#topics">
  75.                                     <xsl:value-of select="$message
  76.                                                           [@id='topics']" />
  77.                                 </a>
  78.                             </li>&lf;
  79.  
  80.                             <xsl:apply-templates
  81.                                 select="categories/categoryfile" mode="toc" />
  82.                             </ul>
  83.                         </xsl:if>
  84.                     </xsl:if> <!-- !$is-chm -->
  85.  
  86.                     <xsl:if test="seealso">
  87.                         <h3>
  88.                             <xsl:value-of
  89.                                 select="$message[@id='seealso']" />
  90.                         </h3>
  91.  
  92.                         <ul class="seealso">
  93.                         <xsl:for-each select="seealso">
  94.                             <li>
  95.                                 <xsl:apply-templates />
  96.                             </li>
  97.                         </xsl:for-each>
  98.                         </ul>
  99.                     </xsl:if>
  100.                 </div>&lf; <!-- /#quickview -->
  101.             </xsl:if> <!-- /have sidebar -->
  102.  
  103.             <!-- either one ... -->
  104.             <xsl:apply-templates select="section" />
  105.             <!-- ... or the other is allowed -->
  106.             <xsl:apply-templates select="categories" />
  107.         </div>&lf; <!-- /#page-content -->
  108.  
  109.         <xsl:call-template name="bottom" />&lf;
  110.     </body>
  111. </html>
  112. </xsl:template>
  113. <!-- /faq -->
  114.  
  115. <!-- ==================================================================== -->
  116. <!-- <categories> (see categories.xml)                                    -->
  117. <!-- ==================================================================== -->
  118. <xsl:template match="categories">
  119. <xsl:call-template name="toplink" />&lf;
  120.  
  121. <div class="section">&lf;
  122.  
  123.     <!-- Section heading -->
  124.     <h2>
  125.         <a name="topics" id="topics">
  126.             <xsl:value-of select="$message[@id='topics']" />
  127.         </a>
  128.     </h2>&lf;
  129.  
  130.     <dl>
  131.         <xsl:apply-templates select="categoryfile" mode="index"/>
  132.     </dl>
  133. </div> <!-- /.section -->
  134.  
  135. <xsl:if test="/faq/@all-in-one = 'yes'">
  136.     <xsl:apply-templates select="categoryfile" mode="suckin" />
  137. </xsl:if>
  138. </xsl:template>
  139. <!-- /categories -->
  140.  
  141. <!-- ==================================================================== -->
  142. <!-- <categoryfile> mode="index"                                          -->
  143. <!-- just write the short description with a link to the resource         -->
  144. <!-- ==================================================================== -->
  145. <xsl:template match="categories/categoryfile" mode="index">
  146. <xsl:variable name="current" select="document(.)/faq" />
  147.  
  148. <dt>
  149.     <a>
  150.         <xsl:attribute name="href">
  151.             <xsl:choose>
  152.             <xsl:when test="/faq/@all-in-one = 'yes'">
  153.                 <xsl:value-of select="concat('#', $current/section/@id)" />
  154.             </xsl:when>
  155.             <xsl:otherwise>
  156.                 <xsl:value-of select="concat(document($current/@metafile)
  157.                                              /metafile/basename, '.html')" />
  158.             </xsl:otherwise>
  159.             </xsl:choose>
  160.         </xsl:attribute>
  161.  
  162.         <xsl:value-of select="$current/section/title" />
  163.     </a>
  164. </dt>
  165. <dd>
  166.     <xsl:apply-templates select="$current/description" />
  167. </dd>&lf;
  168. </xsl:template>
  169. <!-- /categoryfile, "index" -->
  170.  
  171.  
  172. <!-- ==================================================================== -->
  173. <!-- <categoryfile> mode="toc"                                            -->
  174. <!-- create sidebar links                                                 -->
  175. <!-- ==================================================================== -->
  176. <xsl:template match="categories/categoryfile" mode="toc">
  177. <xsl:variable name="current" select="document(.)/faq" />
  178.  
  179. <li>
  180.     <img src="{$path}/images/down.gif" alt="" />
  181.     <xsl:text> </xsl:text>
  182.     <a href="#{$current/section/@id}">
  183.         <xsl:value-of select="$current/section/title" />
  184.     </a>
  185. </li>&lf;
  186. </xsl:template>
  187. <!-- /categoryfile, "toc" -->
  188.  
  189.  
  190. <!-- ==================================================================== -->
  191. <!-- <categoryfile> mode="suckin"                                         -->
  192. <!-- load whole file contents (for all-in-one page)                       -->
  193. <!-- ==================================================================== -->
  194. <xsl:template match="categories/categoryfile" mode="suckin">
  195. <xsl:apply-templates select="document(.)/faq/section" />
  196. </xsl:template>
  197. <!-- /categoryfile, "suckin" -->
  198.  
  199. </xsl:stylesheet>
  200.