<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:param name="interest"/>

<xsl:output
    method="xml"
    version="1.0"
    encoding="ISO-8859-1"
    omit-xml-declaration="no"
    doctype-public="-//W3C//DTD VOICEXML 2.1//EN"
    doctype-system="http://www.w3.org/TR/voicexml21/vxml.dtd"
    indent="yes"
/>
	
<xsl:template match="/">
    <vxml version="2.1" xmlns="http://www.w3.org/2001/vxml">
        <form>
            <block>
            
            You selected <xsl:value-of select="$interest"/>. Here are some events you might like to attend:
            
            <xsl:for-each select="/events/event[contains(category, $interest)]">
            	<xsl:variable name="when"><xsl:value-of select="when"/></xsl:variable>
            	<xsl:variable name="category"><xsl:value-of select="category"/></xsl:variable>
            	<xsl:variable name="what"><xsl:value-of select="what"/></xsl:variable>
            	On <xsl:value-of select="$when"/>, <xsl:value-of select="$what"/>. 
            </xsl:for-each>
            Good bye!
            
            </block>
        </form>
    </vxml>
</xsl:template>
</xsl:stylesheet>
