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 / simple-page2html.xsp < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  2.1 KB  |  74 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.  
  18. <!-- CVS $Id: simple-page2html.xsp,v 1.2 2004/03/06 02:25:49 antonio Exp $ -->
  19.  
  20. <xsp:page language="java"
  21.           xmlns:xsp="http://apache.org/xsp"
  22.           xmlns:xsp-request="http://apache.org/xsp/request/2.0"
  23.           xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  24.  
  25. <xsl:stylesheet version="1.0">
  26.  
  27.   <xsl:template match="page">
  28.    <html>
  29.     <head>
  30.      <title>
  31.       <xsl:value-of select="title"/>
  32.      </title>
  33.     </head>
  34.     <body bgcolor="white" alink="red" link="blue" vlink="blue">
  35.      <xsl:apply-templates/>
  36.     </body>
  37.    </html>
  38.   </xsl:template>
  39.  
  40.   <xsl:template match="title">
  41.    <h2 style="color: navy; text-align: center">
  42.     <xsl:apply-templates/>
  43.    </h2>
  44.   </xsl:template>
  45.  
  46.   <xsl:template match="para">
  47.    <p align="left">
  48.     <i>
  49.      <xsl:apply-templates/>
  50.     </i>
  51.    </p>
  52.    <xsl:if test="not(following-sibling::para)">
  53.      <p align="left">
  54.        <i>Note from the stylesheet:<br/>
  55.        Page above was processed by dynamic XSL stylesheet
  56.        generated by XSP (eXtensible Server Pages).<br/>
  57.        My source could be found in the file
  58.        <b>cocoon/sub/stylesheets/simple-page2html.xsp</b>.<br/>
  59.        I know that I was executed at <b><xsp:expr>new Date()</xsp:expr></b>
  60.        by <b><xsp:expr>Constants.COMPLETE_NAME</xsp:expr></b>.
  61.        </i>
  62.      </p>
  63.    </xsl:if>
  64.   </xsl:template>
  65.  
  66.   <xsl:template match="@*|node()" priority="-1">
  67.     <xsl:copy>
  68.       <xsl:apply-templates select="@*|node()"/>
  69.     </xsl:copy>
  70.   </xsl:template>
  71. </xsl:stylesheet>
  72.  
  73. </xsp:page>
  74.