alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  
<td> <input type="file" name="art_image" value="" /> </td> <td rowspan="6" bgcolor="#FFFFFF" align="center"> <xsl:choose> <xsl:when test="$image_src=' '"> <b>No Image </xsl:when> <xsl:otherwise> <img src="{$image_src}" border="1" /> </xsl:otherwise> </xsl:choose> </td> </tr> </xsl:template> <xsl:template match="art_image_footer"> <tr bgColor="#6699cc"> <td>Image footer <td> </tr> </xsl:template> <xsl:template match="art_image_link"> <tr bgColor="#6699cc"> <td>Link <td> </tr> </xsl:template> <xsl:template name="option-element"> <xsl:param name="name">/ <xsl:param name="value">/ <xsl:param name="selected">/ <xsl:choose> <xsl:when test="$selected=$value"> <option value="{$value}" selected="selected"> </xsl:when> <xsl:otherwise> <option value="{$value}"> </xsl:otherwise> </xsl:choose> </xsl:template> <xsl:template match="art_image_position"> <tr bgColor="#6699cc"> <td>Position <td> <option value="">Image Align <xsl:call-template name="option-element"> <xsl:with-param name="name">RIGHT <xsl:with-param name="value">right <xsl:with-param name="selected" select="self::node()"/> </xsl:call-template> <xsl:call-template name="option-element"> <xsl:with-param name="name">LEFT <xsl:with-param name="value">left <xsl:with-param name="selected" select="self::node()"/> </xsl:call-template> <xsl:call-template name="option-element"> <xsl:with-param name="name">NONE <xsl:with-param name="value">none <xsl:with-param name="selected" select="self::node()"/> </xsl:call-template> </select> </td> </tr> </xsl:template> <xsl:template match="art_image_alt"> <tr bgColor="#6699cc"> <td>ALT <td> </tr> </xsl:template> <xsl:template match="content-menu" name="content-menu">0 <xsl:param name="URL">/ <xsl:param name="BASE_URL">/ <xsl:variable name="myPosition" select="/image/image_content/art_image_position"/> <p align="center"/> <table border="0" celpadding="3" celspacing="3" width="100%"> <tr bgcolor="#336699"> <td align="center" valign="top" > <input name="Write" type="image" alt="Write" src="{$BASE_URL}/images/save.jpg" border="0"/> </td> <td align="center" > <a href="{$URL}?mode=images&code=delete&docID={$docID}&position={$myPosition}">Delete Image </td> <td align="center" > <a onclick="window.close()" href="#">Close Window </td> </tr> </table> </xsl:template> <xsl:template match="docID"> <xsl:template match="title"> </xsl:stylesheet>

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: image.xsl,v 1.9 2001/04/15 15:24:25 agarcia3 Exp $ -->
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="html"/>

<!-- Written by Alfredo Garcia "agarcia@mundofree.com" -->

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

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

<xsl:template match="image">
	<!-- Template global variables -->
<xsl:variable name="URL" select="configuration/general/category[@name='HTTP Headers']/data[@code='requestURI']" />
	<xsl:variable name="BASE_URL">/webEditor/editor_1/docs
	<xsl:variable name="docID" select="docID"/>
   <html>
    <head>
     <title>
      <xsl:value-of select="title"/>
     </title>
    </head>
<body bgcolor="white" link="#003366" vlink="#003366">
<script languaje="JAVASCRIPT">

function openWindowNew (theURL,winName,features) {
  window.open(theURL,winName,features);
}

</script>  
<center>
<form method="POST" ENCTYPE="multipart/form-data" action="{$URL}">

<table border="0" cellspacing="5" cellpadding="0" width="600">
<tr>
<td valign="top" bgcolor="#336699">

<table WIDTH="100%" BORDER="0" CELLSPACING="3" CELLPADDING="3">
<tr bgcolor="#6699cc">
<td WIDTH="21%">
<xsl:text disable-output-escaping="yes">&nbsp;Images
</td>
<td WIDTH="54%">
<xsl:text disable-output-escaping="yes">&nbsp;
</td>
<td WIDTH="24%">
<xsl:text disable-output-escaping="yes">&nbsp;
</td>
</tr>
<xsl:apply-templates select="image_content"/>



</table>

</td>
</tr>

<tr>
<td bgcolor="000000" valign="top" align="center"> 
     <xsl:call-template name="content-menu">
	  		<xsl:with-param name="docID" select="docID"/>
			<xsl:with-param name="URL" select="$URL"/>
			<xsl:with-param name="BASE_URL" select="$BASE_URL"/>
	  </xsl:call-template>
     
</td>
</tr> 
</table>

<!--
<input type="hidden" name="mode" value="config"/>
-->
<xsl:variable name="myPosition" select="/image/image_content/art_image_position"/>
<input type="hidden" name="mode" value="images"/>
<input type="hidden" name="docID" value="{$docID}"/>
<input type="hidden" name="position" value="{$myPosition}"/>
</form>
</center>

    </body>
   </html>
  </xsl:template>


<xsl:template match="art_image">
<xsl:variable name="image_src" select="." />
<tr bgcolor="#6699cc">
<td>Photo
... 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.