Solution!
Cracked it...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="user_name">****</xsl:param>
<xsl:param name="faculty">ITS</xsl:param>
<xsl:param name="action_url">action not set</xsl:param>
<xsl:param name="photo_server">not found</xsl:param>
<xsl:param name="page_number">0</xsl:param>
<xsl:param name="group_name">Not been set yet...</xsl:param>
<xsl:param name="startingPhoto">21</xsl:param>
<xsl:param name="howMany">5</xsl:param>
<xsl:template match="/">
<head>
<link type="text/css" rel="stylesheet" href="css/myuwe.css"/>
</head>
<table width="640">
<tr>
<td colspan="2">
<h2>View Photos</h2>
</td>
</tr>
<tr>
<td width="420">Name: <xsl:value-of select="$user_name"/><br/>Your Faculty: <xsl:value-of
select="$faculty"/></td>
<td valign="top" align="right">
<xsl:apply-templates select="/PhotosData/groups"/>
</td>
</tr>
<tr>
<td colspan="2">
<xsl:apply-templates select="/PhotosData/photos"/>
</td>
</tr>
</table>
</xsl:template>
<xsl:template match="groups">
<form method="post" action="{$action_url}">
<select name="selected-group">
<xsl:apply-templates select="group"/>
</select>
<input type="submit" value="select group"/>
</form>
</xsl:template>
<xsl:template match="group">
<xsl:variable name="groupName">
<xsl:value-of select="."/>
</xsl:variable>
<option value="{$groupName}">
<xsl:value-of select="$groupName"/>
</option>
</xsl:template>
<xsl:template match="photos">
<xsl:variable name="count" select="count(record)"/>
<xsl:variable name="previous" select="number($startingPhoto - $howMany)"/>
<xsl:variable name="next" select="number($startingPhoto + $howMany)"/>
<table cellpadding="5" border="4" width="640" align="left">
<tr>
<td>
<h3>Photos for <em>
<xsl:value-of select="$group_name"/>
</em></h3>
</td>
</tr>
<tr>
<td>
viewing page number <xsl:value-of select="$page_number"/>
</td>
</tr>
<tr>
<td>
<xsl:call-template name="displayPhotos">
<xsl:with-param name="currentNodes" select="//record[position() >= $startingPhoto and position() <($startingPhoto +
$howMany)]"></xsl:with-param>
</xsl:call-template>
</td>
</tr>
<tr>
<td>
<xsl:choose>
<xsl:when test="$startingPhoto = 1">
<xsl:text>None</xsl:text>
</xsl:when>
<xsl:otherwise>
<a href="{$action_url}?startingPhoto={$previous}">pre vious<xsl:value-of select="$howMany"/></a>
</xsl:otherwise>
</xsl:choose>
<xsl:choose>
<xsl:when test="($startingPhoto + $howMany) >= $count">
<xsl:text>None</xsl:text>
</xsl:when>
<xsl:otherwise>
<a href="{$action_url}?startingPhoto={$next}">next<xs l:value-of select="$howMany"/></a>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</table>
</xsl:template>
<xsl:template name="displayPhotos">
<xsl:param name="currentNodes"/>
<xsl:for-each select="$currentNodes">
Name: <xsl:value-of select="name"/>
<xsl:if test="position() mod 5 =0">
<br/>
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
:)
|