home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / docraw.xsl < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  1.8 KB  |  64 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <xsl:stylesheet version="1.0" 
  18.                 xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  19.  
  20. <!-- doc.xsl - text line wrapping
  21.   This stylesheet does not do any line wrapping.
  22. -->
  23.  
  24.   <xsl:template match="document">
  25.     <html>
  26.       <head>
  27.         <title><xsl:value-of select="header/title"/></title>
  28.       </head>
  29.       <xsl:apply-templates/>
  30.       </html>
  31.   </xsl:template>
  32.  
  33.   <xsl:template match="body">
  34.     <body>
  35.       <h1><xsl:value-of select="header/title"/></h1>
  36.       <p>Comment from stylesheet: No special handling was done for the
  37.         <source> elements. Note the long right-left scrollbar.
  38.       </p>
  39.       <xsl:apply-templates/>
  40.     </body>
  41.   </xsl:template>
  42.  
  43.   <xsl:template match="section">
  44.     <xsl:apply-templates/>
  45.   </xsl:template>
  46.  
  47.   <xsl:template match="source">
  48.     <div style="padding:4pt; margin-bottom:8pt; border-width:1px; border-style:solid; border-color:#0086b2;">
  49.       <pre class="code">
  50.         <xsl:apply-templates/>
  51.       </pre>
  52.     </div>
  53.   </xsl:template>
  54.  
  55.   <xsl:template match="title">
  56.     <h2><xsl:apply-templates/></h2>
  57.   </xsl:template>
  58.  
  59.   <xsl:template match="p">
  60.     <p><xsl:apply-templates/></p>
  61.   </xsl:template>
  62.  
  63. </xsl:stylesheet>
  64.