Attributes are referenced using the '@' symbol, so @name refers to the name attribute.
To do a condition based on that attribute value you would do "attribute[@name='listprice']"
I'm not sure what you mean by 'update' as you are essentially producing a brand new XML document every time you run an XSLT process, so you do not update the original, but output a modified version.
The following would match on a listprice attribute and output a new element with a increased price:
Code:
<xsl:template match="attribute[@name='listprice']">
<attribute name="listprice"></xsl:value-of select="number(text()) + 50"/></attribute>
</xsl:template>