Hot to get element value from element with attributes?

Hello,
I need to get element value from element with attributes. I know how to get value from ‘simple’ element, but I don’t know how to work with attributes.

For example, my xml is

<s>
  <s n="MyData">
    <c n="User"></c>
    <c n="ValidationErrors"></c>
    <c n="errorCode">0</c>
    <a n="responseDate">20100809104232</a>
    <a n="streamID">23747608</a>
    <a n="requestNumber">1</a>
  </s>
</s>

I need to get <a> (ie, 20100809104232, 23747608 and 1).

I wrote xsl:

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

<xsl:template match="/s/s">
 <table border="1" cellpadding="5" cellspacing="3">
 <tr>
  <td>Status:</td><td><xsl:apply-templates select="a" /></td>
 </tr>

 </table>
</xsl:template>
</xsl:stylesheet>

But I get 020100809104232237476081 in one string. Help!


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

<xsl:template match="/s/s">

<html>
<head>
</head>
<body>
 <table border="1" cellpadding="5" cellspacing="3">
 <tr>
  <td>Status:</td>
  <xsl:for-each select="a">
  	<td><xsl:value-of select="."/></td>
  </xsl:for-each>
 </tr>

 </table>
 </body>
 </html>
</xsl:template>
</xsl:stylesheet>

Not sure exactly what the intended output presentation is but there they are in separate cells.

If you want to get separate table rows you can wrap them in xsl:for-each
To get only specific attributes you can use XPATH where the syntax for the select is like
element[@attribute_name]
or for attributes with specific name/values
element[@attribute_name=‘desired_value’]