<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
		xmlns:f="http://www.flickr.com/services/api/"
		xmlns:exsl="http://exslt.org/common"
		exclude-result-prefixes="f exsl"
                version="1.0">

<xsl:import href="flickr1.xsl"/>

<xsl:output method="xml" encoding="utf-8" indent="yes"
	    omit-xml-declaration="yes"/>

<xsl:strip-space elements="*"/>

<!-- You must specify an f:api_key -->
<xsl:param name="f:api_key" select="''"/>

<!-- You must specify an f:shared_secret and f:auth_token -->
<!-- if you want to use methods that require authentication -->
<xsl:param name="f:shared_secret" select="''"/>
<xsl:param name="f:auth_token" select="''"/>

<xsl:param name="email" select="'ndw@nwalsh.com'"/>

<xsl:template match="/">
  <xsl:variable name="user.rsp">
    <xsl:call-template name="f:people.findByEmail">
      <xsl:with-param name="find_email" select="$email"/>
    </xsl:call-template>
  </xsl:variable>

  <xsl:variable name="userid" select="exsl:node-set($user.rsp)/*/user/@id"/>

  <xsl:call-template name="f:photos.search">
    <xsl:with-param name="user_id" select="$userid"/>
    <xsl:with-param name="per_page" select="3"/>
  </xsl:call-template>
</xsl:template>

</xsl:stylesheet>
