forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nicola...@apache.org
Subject cvs commit: xml-forrest/src/resources/conf sitemap.xmap
Date Fri, 14 Feb 2003 15:21:20 GMT
nicolaken    2003/02/14 07:21:19

  Modified:    src/resources/skins/common/xslt/html document2html.xsl
               src/resources/skins/krysalis-site/xslt/html
                        document2html.xsl
               src/resources/conf sitemap.xmap
  Log:
        <action dev="NKB" type="add" context="webapp">
          Added the printer-friendly and xml-source links to the page.
          Included new icons for it in the process.
        </action>
  
  Revision  Changes    Path
  1.13      +32 -6     xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/common/xslt/html/document2html.xsl,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- document2html.xsl	11 Feb 2003 21:54:42 -0000	1.12
  +++ document2html.xsl	14 Feb 2003 15:21:18 -0000	1.13
  @@ -19,6 +19,10 @@
   
     <!-- If non-blank, a PDF link for this page will not be generated -->
     <xsl:param name="nopdf"/>
  +  <!-- If non-blank, a "printer-friendly" link for this page will not be generated -->
  +  <xsl:param name="noprinterfriendly"/>
  +  <!-- If non-blank, an XML link for this page will not be generated -->
  +  <xsl:param name="noxml"/>  
     <xsl:param name="notoc"/>
     <xsl:param name="path"/>
     <!-- <xsl:include href="split.xsl"/> -->
  @@ -50,7 +54,9 @@
                   <xsl:value-of select="header/title"/>
                 </h1>
               </td>
  +            <xsl:call-template name="printerfriendlylink"/>
               <xsl:call-template name="pdflink"/>
  +            <xsl:call-template name="xmllink"/>
             </tr>
           </table>
         </xsl:if>
  @@ -76,18 +82,38 @@
       </div>
     </xsl:template>
   
  -  <!-- Generates the "printer friendly version" PDF link -->
  +  <!-- Generates the "printer friendly version" link -->
  +  <xsl:template name="printerfriendlylink">
  +    <xsl:if test="$noprinterfriendly = ''"> <!-- noprinterfriendly flag unset
-->
  +      <td align="center" width="40" nowrap="nowrap"><a href="printer-friendly/{$filename-noext}.html"
class="dida">
  +          <img border="0" src="{$skin-img-dir}/printer.gif" alt="printer friendly"/><br/>
  +          printer<br/>
  +          friendly</a>
  +      </td>
  +    </xsl:if>
  +  </xsl:template>
  +
  +  <!-- Generates the PDF link -->
     <xsl:template name="pdflink">
       <xsl:if test="$nopdf = ''"> <!-- nopdf flag unset -->
  -      <td align="center" width="80" nowrap="nowrap"><a href="{$filename-noext}.pdf"
class="dida">
  -          <img border="0" src="{$skin-img-dir}/printer.gif" alt="printer"/><br/>
  -          print-friendly<br/>
  +      <td align="center" width="40" nowrap="nowrap"><a href="{$filename-noext}.pdf"
class="dida">
  +          <img border="0" src="{$skin-img-dir}/pdfdoc.gif" alt="PDF"/><br/>
             PDF</a>
         </td>
       </xsl:if>
     </xsl:template>
  +  
   
  -
  +  <!-- Generates the XML link -->
  +  <xsl:template name="xmllink">
  +    <xsl:if test="$noxml = ''"> <!-- noxml flag unset -->
  +      <td align="center" width="40" nowrap="nowrap"><a href="doc-source/{$filename-noext}.html"
class="dida">
  +          <img border="0" src="{$skin-img-dir}/xmldoc.gif" alt="xml"/><br/>
  +          xml</a>
  +      </td>
  +    </xsl:if>
  +  </xsl:template>
  +  
     <xsl:template match="body">
       <xsl:if test="section and not($notoc='true')">
         <ul class="minitoc">
  
  
  
  1.9       +4 -11     xml-forrest/src/resources/skins/krysalis-site/xslt/html/document2html.xsl
  
  Index: document2html.xsl
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/skins/krysalis-site/xslt/html/document2html.xsl,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- document2html.xsl	11 Feb 2003 21:54:42 -0000	1.8
  +++ document2html.xsl	14 Feb 2003 15:21:18 -0000	1.9
  @@ -27,16 +27,9 @@
                   <xsl:value-of select="header/title"/>
                 </h1>
               </td>
  -            <!--td align="center" width="80" nowrap><a href="" class="dida"><img
src="images/singlepage.gif"><br>
  -                  single page<br>
  -                    version</a></td-->
  -            <xsl:if test="$nopdf = ''"> <!-- nopdf flag unset -->
  -              <td align="center" width="80" nowrap="nowrap"><a href="{$filename-noext}.pdf"
class="dida">
  -                  <img border="0" src="{$skin-img-dir}/printer.png" alt="print-friendly
version"/><br/>
  -                  print-friendly<br/>
  -                  PDF</a>
  -              </td>
  -            </xsl:if>
  +            <xsl:call-template name="printerfriendlylink"/>
  +            <xsl:call-template name="pdflink"/>
  +            <xsl:call-template name="xmllink"/>
             </tr>
           </table>
         </xsl:if>
  
  
  
  1.69      +30 -0     xml-forrest/src/resources/conf/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-forrest/src/resources/conf/sitemap.xmap,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- sitemap.xmap	14 Feb 2003 11:29:10 -0000	1.68
  +++ sitemap.xmap	14 Feb 2003 15:21:19 -0000	1.69
  @@ -387,6 +387,8 @@
               </map:call>
            </map:match>
   
  +
  +       
   <!-- Generates body HTML for files in subdirs -->
            <map:match pattern="body-**/*.xml">
   <!-- if the file is present as ihtml, convert to doc-v11... -->
  @@ -457,6 +459,8 @@
                  </map:call>
               </map:act>
   
  +
  +          
   <!-- if the file is present as html, give that to the user... -->
               <map:act type="resource-exists">
                  <map:parameter name="url" value="content/xdocs/{1}.ehtml" />
  @@ -544,7 +548,32 @@
               <map:redirect-to uri="{request:contextPath}/index.html" />
            </map:match>
   
  +              
            <map:match pattern="**">
  +         
  +<!-- Generates printerfriendly HTML from the body (link rewriting) -->
  +         <map:match pattern="printer-friendly/**.html">
  +            <map:generate src="cocoon://body-{1}.xml"/>
  +            <map:serialize/>
  +         </map:match>
  +         
  +         <map:match pattern="**/printer-friendly/*.html">
  +            <map:generate src="cocoon://body-{1}/{2}.xml"/>
  +            <map:serialize/>
  +         </map:match>
  +         
  +<!-- Generates source HTML from the body (link rewriting) -->
  +         <map:match pattern="doc-source/**.html">
  +            <map:generate src="content/xdocs/{1}.xml"/>
  +            <map:serialize type="xml"/>
  +         </map:match>
  +         
  +         <map:match pattern="**/doc-source/*.html">
  +            <map:generate src="content/xdocs/{1}/{2}.xml"/>
  +            <map:serialize type="xml"/>
  +         </map:match>
  +         
  +             
   <!-- if the file is present verbatim as content, give that to the user... -->
               <map:act type="resource-exists">
                  <map:parameter name="url" value="content/{1}" />
  @@ -599,6 +628,7 @@
                  </map:match>
               </map:act>
   
  +           
   <!-- ... otherwise try to generate it using these rules.  -->
               <map:match pattern="apachestats">
                  <map:generate type="html" src="http://www.apache.org/~rubys/stats/xml.apache.org/">
  
  
  

Mime
View raw message