<?xml version="1.0" encoding="utf-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:svg="http://www.w3.org/2000/svg">

  <!-- include reference to document containing the developer's keys -->
  <xsl:import href="keys.xsl"/>

  <xsl:variable name="foaf">http://blub.foafnaut.org/</xsl:variable>

  <xsl:template name="get-svg">
    <xsl:param name="title"/>

    <xsl:variable name="foaf-title"  select="translate(normalize-space($title), ' ', '+')"/>
    <xsl:variable name="foaf-key"    select="document($key)//foaf"/>
    <!-- <xsl:variable name="foaf-search" select="concat($foaf, ' $foaf-key)"/>-->
    <xsl:variable name="foaf-result" select="document($foaf)"/>

      <xsl:for-each select="$foaf-result">
         <xsl:apply-templates />
            &lt;!-----------SVG----------&gt;
           </xsl:for-each>
   
  </xsl:template>

  <xsl:template match="svg:svg">
	     <xsl:element name="svg">
                           <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> 
		<xsl:attribute name="onload"><xsl:value-of select="@onload"/></xsl:attribute> 
                            <xsl:apply-templates />
                          
                       </xsl:element>
  </xsl:template>

 <xsl:template match="svg:script">
	     <xsl:element name="script">
                           <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute> 
		<xsl:attribute name="type"><xsl:value-of select="@type"/></xsl:attribute> 
                            <xsl:apply-templates />
                          
                       </xsl:element>
  </xsl:template>
 



</xsl:stylesheet>
