misterpunch
Technical User
I have a dilemma that has brought many late (and fruitless) nights in the past week.
My goal is pretty simple in my opinion: I want to have a standard XSL template (to sort a list of photos and information in a menu frame) and call another template to override it and filter the menu by category. Calling from a button most likely JavaScript.
Now I'm new to XML, but I understand it pretty well. XSL seems pretty straight forward but I only know basic JavaScript.
WHAT IS THE MOST PAINLESS WAY TO DO THIS??
that's my stylesheet for the following page (very simplified version of the final product)
My goal is pretty simple in my opinion: I want to have a standard XSL template (to sort a list of photos and information in a menu frame) and call another template to override it and filter the menu by category. Calling from a button most likely JavaScript.
Now I'm new to XML, but I understand it pretty well. XSL seems pretty straight forward but I only know basic JavaScript.
WHAT IS THE MOST PAINLESS WAY TO DO THIS??
Code:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="[URL unfurl="true"]http://www.w3.org/1999/XSL/Transform">[/URL]
<xsl:output method = "html" encoding="Windows-1252" />
<xsl:template match="/" >
<xsl:param name="navigation" />
<html>
<head>
<link rel="stylesheet" href="klm.css" type="text/css" />
</head>
<body>
<table border="0" bordercolor="#eeeeee" bgcolor="#eeeeee" padding="0" cellpadding="0">
<tr><td colspan="2" align="center"><h2><xsl:value-of select="$active" /></h2></td></tr>
<xsl:for-each select="gallery/photo">
<tr>
<td colspan="2" align="center">
<a href="{photoInfo/Image/@LARGE}" target="view"><img src="{photoInfo/Image/@THUMB}" border="0"/></a></td></tr>
<tr>
<td margin="8">
<span class="info">   Model:</span>
</td>
<td align="center">
<span class="info"><xsl:value-of select="photoInfo/model" /></span>
</td>
</tr>
<tr>
<td>
<span class="info">   Makeup:</span>
</td>
<td align="center">
<span class="info"><xsl:value-of select="photoInfo/makeup" /></span>
</td>
</tr>
<tr>
<td margin="8">
<span class="info">   Hair:</span>
</td>
<td align="center">
<span class="info"><xsl:value-of select="photoInfo/hair" /></span>
</td>
</tr>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template >
<xsl:template name="product">
<xsl:for-each select="gallery/photo[category='Product']">
</xsl:for-each>
</xsl:template>
<xsl:template name="portrait">
<xsl:for-each select="gallery/photo[category='Portrait']">
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
that's my stylesheet for the following page (very simplified version of the final product)