title: XSL if test starts-with
body: <p>Given this piece of XML</p>
  
  <pre><code>&lt;dc:date&gt;info:eu-repo/date/embargoEnd/2013-06-12&lt;/dc:date&gt;
  &lt;dc:date&gt;2012-07-04&lt;/dc:date&gt;
  </code></pre>
  
  <p>I should need with XSL to output only the year of the string <strong>not starting with</strong> <code>info:eu-repo</code>.
  I'm trying this way, but it doesn't work. I'm wrong with the <code>for-each</code>?</p>
  
  <pre><code>&lt;xsl:if test="not(starts-with('dc:date', 'info:eu-repo'))"&gt;
                  &lt;xsl:for-each select="dc:date"&gt;
                      &lt;publicationYear&gt;
                          &lt;xsl:variable name="date" select="."/&gt;
                          &lt;xsl:value-of select="substring($date, 0, 5)"/&gt;
                      &lt;/publicationYear&gt;
                  &lt;/xsl:for-each&gt;
  &lt;/xsl:if&gt;
  </code></pre>