title: XSLT: Matching elements with namespaces not working
body: <p>I'm trying to convert a database of XML song lyrics into HTML with XSLT. My XML begins like this:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;song xmlns="http://openlyrics.info/namespace/2009/song" version="0.8" createdIn="OpenLP      2.0.1" modifiedIn="OpenLP 2.0.1" modifiedDate="2012-03-14T02:21:52"&gt;
    &lt;properties&gt;
      &lt;titles&gt;
        &lt;title&gt;Amazing Grace&lt;/title&gt;
      &lt;/titles&gt;
      &lt;authors&gt;
        &lt;author&gt;John Newton&lt;/author&gt;
      &lt;/authors&gt;
    &lt;/properties&gt;
    &lt;lyrics&gt;
      &lt;verse name="v1"&gt;
        &lt;lines&gt;Amazing grace, how sweet the sound&lt;br/&gt;That saved a wretch like me&lt;br/&gt;I once was lost, but now am found&lt;br/&gt;Was blind but now I see&lt;/lines&gt;
  </code></pre>
  
  <p>I know from other posts that I need to add the above namespace into my XSLT. I tried, and my XSLT looks like this:</p>
  
  <pre><code>&lt;xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:lyrics="http://openlyrics.info/namespace/2009/song"&gt;
  
  &lt;xsl:template match="lyrics:song"&gt;
    &lt;h3&gt;&lt;xsl:value-of select="properties/titles/title"/&gt;&lt;/h3&gt;
    &lt;h4&gt;&lt;xsl:value-of select="properties/authors/author"/&gt;&lt;/h4&gt;
    &lt;xsl:for-each select="lyrics/verse"&gt;
    &lt;xsl:copy-of select="lines" /&gt;&lt;br /&gt;&lt;br /&gt;
    &lt;/xsl:for-each&gt;
  &lt;/xsl:template&gt;
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>Unfortunately, this code still isn't working. My XSLT only works when I eliminate the xmlns entry in my XML and match "song" directly. Can anyone point out what I'm doing wrong in regards to the xmlns namespace that I titled "lyrics?" I'm very new at XML/XSLT. Thanks in advance!</p>