2:<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 3: xmlns:redirect="http://xml.apache.org/xalan/redirect" 4: extension-element-prefixes="redirect" 5: version="1.0" 6:> 7:<xsl:output method="xml"/> 8: 9:<xsl:template match="/"> 10: <xsl:apply-templates /> 11:</xsl:template> 12: 13:<xsl:template match="student_list"> 14: <xsl:apply-templates /> 15:</xsl:template> 16: 17:<xsl:template match="student"> 18: <xsl:variable name="filename" select="concat(@id,'.xml')" /> 19: <redirect:write select="$filename"> 20: <student id="{@id}"> 21: <xsl:apply-templates /> 22: </student> 23: </redirect:write> 24:</xsl:template> 25: 26:<xsl:template match="name | major | phone | email"> 27: <xsl:copy-of select="." /> 28:</xsl:template> 29: 30:</xsl:stylesheet>