Trong XSLT có
<xsl:value-of select="expression"/>
để nhận giá trị của một phần tử, nhưng có điều gì đó để chọn tên thẻ của phần tử không?
Trong tình huống như thế này:
<person>
  <!-- required stuff -->
  <name>Robert</name>
  <!-- optional stuff, free form for future extension. 
       Using XMLSchema's xsd:any -->
  <profession>programmer</profession>
  <hobby>photography</hobby>
</person>
<xsl:for-each select="person">
   <xsl:tag-of select="."/> : <xsl:value-of select="."/>
</xsl:for-each>
Để có đầu ra như thế này:
name : Robert profession : programmer hobby : photography
Tất nhiên XSLT ở trên sẽ không biên dịch vì
 <xsl:tag-of select="expression"/>
không tồn tại. Nhưng làm thế nào điều này có thể được thực hiện?