M
Mark Constant
I have a xslt page that looks like this
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lc="http://mark/DevelopmentWebsite">
<xsl:template match="/">
<h2>My Game Collection</h2>
<table border="1">
<xsl:for-each select="lc:Entertainment/lc:GameList">
<tr>
<th colspan="2"><xsl:value-of select="lc:Title"/></th>
</tr>
<tr>
<td>
<xsl:element name="IMG">
<xsl:attribute name="SRC">
<xsl:value-of select="lc:Image"/>
</xsl:attribute>
</xsl:element>
</td>
<td><xsl:value-of select="lcescription"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
All I would have to do to get it to display all games that are in the
Horror genre is put
<xsl:for-each select="lc:Entertainment/lc:GameList[lc:Genre =
'Horror']">
instead of
<xsl:for-each select="lc:Entertainment/lc:GameList">
Now how could I get it so there is a drop down list on my page with a
list of different genres. If the person selects a certain genre it
passes the argument to the XSLT so it only displays the genre the user
picked? Can I even pass arguments to a XSLT page?
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:lc="http://mark/DevelopmentWebsite">
<xsl:template match="/">
<h2>My Game Collection</h2>
<table border="1">
<xsl:for-each select="lc:Entertainment/lc:GameList">
<tr>
<th colspan="2"><xsl:value-of select="lc:Title"/></th>
</tr>
<tr>
<td>
<xsl:element name="IMG">
<xsl:attribute name="SRC">
<xsl:value-of select="lc:Image"/>
</xsl:attribute>
</xsl:element>
</td>
<td><xsl:value-of select="lcescription"/></td>
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
All I would have to do to get it to display all games that are in the
Horror genre is put
<xsl:for-each select="lc:Entertainment/lc:GameList[lc:Genre =
'Horror']">
instead of
<xsl:for-each select="lc:Entertainment/lc:GameList">
Now how could I get it so there is a drop down list on my page with a
list of different genres. If the person selects a certain genre it
passes the argument to the XSLT so it only displays the genre the user
picked? Can I even pass arguments to a XSLT page?