For your input to be well-formed XML it must have some wrapper element, let's assume it is:
<Phone>
<Type>Office</Type>
<PhoneNbr>123456789</PhoneNbr>
</Phone>
Then you simply write:
<xsl:template match="Phone">
<Contact Type="{Type}"><xsl:value-of select="PhoneNbr"/></Contact>
</xsl:template>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference