select value from attribute : select « XSLT stylesheet « XML Tutorial

File: Data.xml
<?xml version="1.0" encoding="UTF-8"?>
  <state founding="yes">Belgium</state>

File: Transform.xslt

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
  <xsl:output method="xml" indent="yes" />

  <xsl:template match="eu">
    <xsl:apply-templates select="member" />

  <xsl:template match="member">
      <xsl:apply-templates select="state[@founding]" />

  <xsl:template match="state">
      <xsl:apply-templates />



<?xml version="1.0" encoding="UTF-8"?>
</eu-members> element by index value from attribute"@*|node()""state[not(@founding)]" element by attribute value
5.66.7.Reference text after selecting tags and attributes element and attribute
5.66.9.match parent and select children
5.66.10.Match parent and select grand-children
5.66.11.Match a certain element attribute
5.66.13.Get value from an element with value-of and select
5.66.14.Select element out"operand[(. < 50) and (. > 30)]"
5.66.16.Selecting elements based on values of other ones.