<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
   <xsl:template match="/">
      <rdf:RDF><rdf:Description rdf:about="">
         <xsl:apply-templates select="//xhtml:a[@class='external']"/>
      </rdf:Description></rdf:RDF>
   </xsl:template>
   <xsl:template match="xhtml:a">
      <xsl:variable name="url">
        <xsl:choose>
            <xsl:when test="starts-with(normalize-space(@href), 'http://w3photo.org')">
                <xsl:value-of select="concat('http://www.w3.org/2000/06/webdata/xslt?xslfile=http://dannyayers.com/2004/08/w3photo.xsl&amp;xmlfile=', normalize-space(@href))"/>
            </xsl:when>
            <xsl:otherwise><xsl:value-of select="@href"/></xsl:otherwise>
        </xsl:choose>
      </xsl:variable>
      <rdfs:seeAlso rdf:resource="{normalize-space($url)}"/>
   </xsl:template>
   <xsl:template match="*"/>
</xsl:stylesheet>