title: Get xml value with xslt for-each nested in multiple identical tags (python)
body: <pre><code>&lt;keywords&gt;
    &lt;theme&gt;
      &lt;themekt&gt;THEME_KEY&lt;/themekt&gt;
      &lt;key&gt;ONE&lt;/key&gt;
      &lt;key&gt;TWO&lt;/key&gt;
      &lt;key&gt;THREE&lt;/key&gt;
      &lt;key&gt;FOUR&lt;/key&gt;
      &lt;key&gt;FIVE&lt;/key&gt;
    &lt;/theme&gt;
    &lt;theme&gt;
      &lt;themekt&gt;KEY_TWO&lt;/themekt&gt;
      &lt;key&gt;NONE&lt;/key&gt;
      &lt;key&gt;SOME&lt;/key&gt;
      &lt;key&gt;VALUE&lt;/key&gt;
    &lt;/theme&gt;
  &lt;/keywords&gt;
  </code></pre>
  
  <p>I need to get the values 1-5 from the 'key' tags nested under the first "theme" tag. Is there a way to retrieve these values without transforming the xml using xslt? I can't think of a way, so this is what I have tried using: </p>
  
  <pre><code>&lt;xsl:for-each select="keywords/theme"&gt;
      &lt;xsl:for-each select="key"&gt;
           &lt;p&gt;&lt;xsl:value-of select="key"/&gt;&lt;/p&gt;
      &lt;/xsl:for-each&gt;
  &lt;/xsl:for-each&gt;
  </code></pre>
  
  <p>The above returns empty p tags in the html transformation. If I use the code below it will return only the first key tag value (ONE and NONE) in each "theme" tag. </p>
  
  <pre><code>    &lt;xsl:for-each select="keywords/theme"&gt;
           &lt;p&gt;&lt;xsl:value-of select="key"/&gt;&lt;/p&gt;
      &lt;/xsl:for-each&gt;
  </code></pre>