<?xml version="1.0" encoding="ISO-8859-1"?>
<?xml-stylesheet href="http://www.w3.org/2002/02/style-xsl.css" type="text/css"?>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
 xmlns:an="http://www.w3.org/2003/05/tr-history/analysis#"
 xmlns:contact="http://www.w3.org/2000/10/swap/pim/contact#"
 xmlns:org="http://www.w3.org/2001/04/roadmap/org#"
 xmlns:doc="http://www.w3.org/2000/10/swap/pim/doc#"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:rec="http://www.w3.org/2001/02pd/rec54#"
 xmlns="http://www.w3.org/2000/svg"
 xmlns:xlink="http://www.w3.org/1999/xlink"
 xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
 version="1.0">

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

 <xsl:template match="/rdf:RDF">
  <rdf:RDF>
   <xsl:apply-templates select="rec:REC">
    <xsl:sort select="doc:versionOf/@rdf:resource"/>
   </xsl:apply-templates>
  </rdf:RDF>
 </xsl:template>

 <xsl:template match="rec:REC">
  <rec:REC rdf:about="{@rdf:about}">
   <dc:date><xsl:value-of select="dc:date"/></dc:date>
   <doc:versionOf rdf:resource="{doc:versionOf/@rdf:resource}"/>
  </rec:REC>
 </xsl:template>
</xsl:stylesheet>

