alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

What this is

This file is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Other links

The source code

<?xml version="1.0"?>
<!-- $Id: sample.xsl,v 1.12 2001/04/15 15:24:03 agarcia3 Exp $ -->

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="html"/>

<xsl:template match="*|/">

<xsl:template match="text()|@*">

<xsl:template match="general">
<!-- Template global variables -->
<xsl:variable name="URL" select="configuration/general/category[@name='HTTP Headers']/data[@code='requestURI']" />
	<xsl:variable name="version">0.3
   <html>
    <head>
    <title>
    webEditor configuration
    </title>
    <style type="text/css">
A:hover {
	COLOR: #ff3333
}

.bluelink {
font-family: Arial, Helvetica, sans-serif; font-size: 14px;font-weight: bold; COLOR: #006699
}

.category {
font-family: Arial, Helvetica, sans-serif; font-size: 16px;font-weight: bold; COLOR: #000000
}

    </style>
    </head>
    <body bgcolor="#ffffff">
    <center>
    	
	[<a href="{$URL}" class="bluelink">
		Editor Home
	</a>]

	[<a href="{$URL}?mode=config&code=edit" class="bluelink">
		Edit Configuration
	</a>]
	
	
	[<a href="http://webEditor.sourceforge.net" class="bluelink">
		webEditor version <xsl:value-of select="$version"/> 
	</a>]
	<p/>
	<table border="0" cellspacing="0" cellpadding="0" width="605">
	  <tr>
	   <td valign="top">
     		<xsl:apply-templates select="category"/>
     		<!-- 
	   </td>
	  </tr>
     	</table>
    </center>
    </body>
   </html>
  </xsl:template>

<xsl:template match="data" name="data">#6699cc
<xsl:variable name="color2">#FFFFFF

<xsl:choose>
<xsl:when test="(position() mod 2) != 0">

<xsl:call-template name="row">
	<xsl:with-param name="color" select="$color1"/>
</xsl:call-template>

</xsl:when>
<xsl:when test="(position() mod 2) = 0">

<xsl:call-template name="row">
	<xsl:with-param name="color" select="$color2"/>
</xsl:call-template>

</xsl:when>
</xsl:choose>
</xsl:template>

<xsl:template match="row" name="row">#FFFFFF

<tr bgcolor="{$color}">
      <td width="30%">
      	<font face="arial" size="2"> 
    		<b>
	</font>
      </td>
      <td>
      	<font face="arial" size="2"> 
    		<xsl:apply-templates/>
	</font>
      </td>
</tr>

<xsl:template match="category" name="category">
<p>

<table BORDER="0" CELLPADDING="0" CELLSPACING="0" WIDTH="600">
<tr>
<td valign="top" bgcolor="#336699">

<table BORDER="0" CELLPADDING="1" CELLSPACING="1" WIDTH="600">
<tr>
      <td width="30%" bgColor="#eeeeee" colspan="2" align="center">
      	<font class="category"> 
    		<xsl:value-of select="@name"/>
	</font>
      </td>
</tr>
<tr>
      <td>
      	<font face="arial" size="2"> 
    		<xsl:apply-templates/>
	</font>
      </td>
</tr>
</table>

</td>
</tr>
</table>

</p>
</xsl:template>

</xsl:stylesheet>
... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.