ドロップダウンリストで選択した月の値を含むテーブルを表示したいのですが、最初にテーブルを非表示にし、javascriptの関数を使用してテーブルを表示しますが、今月に関連する情報だけを表示する方法がわかりません。xslコードにif文を含めることができますか?Thnks。
books.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="tabla.xsl"?>
<TotalBooks>
<books month= "January">
<book>
<isbn> 1 </isbn>
<tittle>The tittle</tittleo>
<author>Me</author>
</book>
<book>
<isbn> 2 </isbn>
<tittle>The tittle two</tittleo>
<author>Me</author>
</book>
</books>
</TotalBooks>
books.xsl
<html>
<head>
<script>
function TryOption()
{
tabla.style.visibility="visible";
}
</script>
</head>
<body>
<h1>My books</h1>
<div>
<label> Sales/ month: </label>
<select>
<option> </option>
<xsl:for-each select="TotalBooks/books">
<option onclick="TryOption();">
<xsl:value-of select="@month"/>
</option>
</xsl:for-each>
</select>
</div>
<div>
<table id="tabla">
<tr bgcolor="skyblue">
<th align="left">Tittle</th>
<th align="left">Author</th>
</tr>
<xsl:for-each select="TotalBooks/books/book">
<tr>
<td>
<xsl:value-of select="tittle"/>
</td>
<td>
<xsl:value-of select="author"/>
</td>
</tr>
</xsl:for-each>
</table>
</div>
</body>
</html>