Excellent -- thank you Santhi! (This is an answer to a question I asked him elsewhere.)
That got me on the right track, here's my finished code which has some modifications to yours:
The XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet type="text/xsl" href="phone2.xsl"?>
<attributes>
<attribute>
<type>email</type>
<label>email address</label>
<value>
[email protected]</value>
</attribute>
<attribute>
<type>phone</type>
<label>phone number</label>
<phonenumber>613 555 1111</phonenumber>
<phonenumber>613 555 2222</phonenumber>
<phonenumber>613 555 3333</phonenumber>
</attribute>
</attributes>
The XSL:
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:template match="attributes">
<xsl:for-each select="attribute">
<xsl:if test="string(type)='email'">
<table>
<tr>
<td><b><xsl:value-of select="label"></xsl:value-of></b></td>
<td><xsl:value-of select="value"></xsl:value-of></td>
</tr>
</table>
</xsl:if>
<xsl:if test="string(type)='phone'">
<table>
<tr>
<td><b><xsl:value-of select="label"></xsl:value-of></b></td>
<td><xsl:apply-templates select="phonenumber"/></td>
</tr>
</table>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template match="phonenumber">
<xsl:value-of select="."/><br/>
</xsl:template>
</xsl:stylesheet>