title: Change value of an XML attribute via xslt
body: <p>I have the following xml-file:</p>
  
  <pre><code>&lt;Book description="for beginners" name="IT Book"&gt;
      &lt;Available&gt;yes&lt;/Available&gt;
      &lt;Info pages="500.&lt;/Info&gt;
  &lt;/Book&gt;
  </code></pre>
  
  <p>I want it to look like this:</p>
  
  <pre><code>&lt;Book description="for pros" name="IT Book"&gt;
      &lt;Available&gt;yes&lt;/Available&gt;
      &lt;Info pages="500.&lt;/Info&gt;
  &lt;/Book&gt;
  </code></pre>
  
  <p>I looked up how to modify xml-documents properly on the internet. I found out that first of all I should declare a template for just copying everything:</p>
  
  <pre><code>&lt;xsl:template match="node() | @*"&gt;
      &lt;xsl:copy&gt;
          &lt;xsl:apply-templates select="node() | @*"/&gt;
      &lt;/xsl:copy&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>However, I dont know how to write the template for the actual modification. Thanks for helping out a beginner.</p>
  
  <p>EDIT: Here is my Stylesheet so far (as requested by uL1):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sig="http://www.w3.org/2000/09/xmldsig#"&gt;
      &lt;xsl:output indent="yes" method="xml" omit-xml-declaration="yes"/&gt;
  
      &lt;xsl:template match="node() | @*"&gt;
          &lt;xsl:copy&gt;
              &lt;xsl:apply-templates select="node() | @*"/&gt;
          &lt;/xsl:copy&gt;
      &lt;/xsl:template&gt;
  
      &lt;xsl:template match="@description='for beginners'"&gt;
          &lt;xsl:attribute name="{name()}"&gt;
              &lt;xsl:text&gt;for pros&lt;/xsl:text&gt;
          &lt;/xsl:attribute&gt;
      &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>