<!-- 
  http://dh.obdurodon.org/analyze-string.html
  http://www.w3.org/TR/xslt20/#regular-expressions
-->
<xsl:stylesheet
  xmlns:atom="http://www.w3.org/2005/Atom"
  xmlns:gphoto="http://schemas.google.com/photos/2007"
  xmlns:media="http://search.yahoo.com/mrss/"
  xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  version="2.0">
  <xsl:template match="/">
    Picasa
    <a href="{picasa}" target="{/rss/target}">Picasa</a>
    <xsl:apply-templates select="rss/channel"/>
  </xsl:template>
  <xsl:template match="channel">
    <style>
      .gi {border: #dddddd 2px solid;width:180px;height:180px;}
      .gi:hover {border: #99ee99 2px solid;width:180px;height:180px;}
      .gd {float:left;margin:0px 4px 4px 0px;text-wrap:unrestricted;width:180px;height:180px;}
      .gt {position:relative;top:-175px;left:5px;right:5px;color:white;font-weight:bold;text-shadow: 2px 2px #ff0000;}
    </style>
    <xsl:if test="/rss/title='1'">
      <h2>
        <xsl:apply-templates select="title"/>
      </h2>
    </xsl:if>
    <xsl:apply-templates select="item"/>
    <p style="width: 100%; clear:both;"/>
  </xsl:template>
  <xsl:template match="item">
    <xsl:if test="/rss/image='1'">
      <!--
      <xsl:if test="title = '2013-06-01 2. Rapid-Lauf' or title = '2013-05-26 Kulovits Abschied'">
      -->
      <div class="gd">
        <a href="{link}" target="{/rss/target}">
          <img src="{media:group/media:thumbnail/@url}" alt="{title}" title="{title}" class="gi"/>
        </a>
        <xsl:if test="/rss/name='1'">
          <div  class="gt">
            <xsl:apply-templates select="title"/>
          </div>
        </xsl:if>
      </div>
    </xsl:if>
    <!--
    </xsl:if>
    -->
    <xsl:if test="/rss/image='0'">
      <xsl:if test="/rss/name='1'">
        <dt>
          <a href="{link}">
            <xsl:apply-templates select="title"/>
          </a>
        </dt>
      </xsl:if>
    </xsl:if>
  </xsl:template>
</xsl:stylesheet>