To insert an conditional choose test against the content of the file, simply add an
xsl:choose, xsl:when and xsl:otherwise elements to your XSL document like this:
<xsl:choose>
<xsl:when match=".[ARTIST='Bob Dylan']">
... some code ...
</xsl:when>
<xsl:otherwise>
... some code ....
</xsl:otherwise>
</xsl:choose>
Now take a look at your slightly adjusted XSL stylesheet (or
open it with IE5):
Here is the simple source code needed transform the XML file to HTML on the
client (try it yourself):
<html>
<body>
<script language="javascript">
// Load XML
var xml = new ActiveXObject("Microsoft.XMLDOM")
xml.async = false
xml.load("cd_catalog.xml")
// Load the XSL
var xsl = new ActiveXObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load("cd_catalog_filter.xsl")
// Transform
document.write(xml.transformNode(xsl))
</script>
</body>
</html>