1. <?xml version="1.0" encoding="utf-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/2005/Atom" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:date="http://exslt.org/dates-and-times" xmlns:str="http://exslt.org/strings" extension-element-prefixes="date str">
  3. <xsl:import href="str.replace.function.xsl"/>
  4. <xsl:import href="str.split.function.xsl"/>
  5. <xsl:output method="xml" cdata-section-elements="div" media-type="application/atom+xml" encoding="utf-8"/>
  6. <xsl:template match="/response/lst"/>
  7. <xsl:template match="/response/result">
  8. <xsl:processing-instruction name="xml-stylesheet">href="atom.css" type="text/css"</xsl:processing-instruction>
  9. <feed xml:base="http://archive.org/">
  10. <id>http://purl.oclc.org/GHARBEIA/AHMAD/p2-archive/atom.xml</id>
  11. <icon>http://www.archive.org/images/mediatype_etree.gif</icon>
  12. <logo>http://ia311316.us.archive.org/0/items/audio/audio.gif</logo>
  13. <title type="html" xml:lang="ar">أرشيف تسجيلات إذاعة البرنامج الثقافي في &lt;a href="http://archive.org/"&gt;archive.org&lt;a&gt;</title>
  14. <subtitle xml:lang="ar">تسجيلات أحمد غربية من إذاعة البرنامج الثاني</subtitle>
  15. <link rel="self" href="http://purl.oclc.org/GHARBEIA/AHMAD/p2-archive/atom.xml"/>
  16. <link rel="alternate" type="text/html" href="http://tinyurl.com/programme2archive-tables" title="في صيغة HTML"/>
  17. <link rel="via" type="text/xml" href="http://tinyurl.com/programme2archive-xml"/>
  18. <link rel="related" hreflang="ar" href="http://purl.oclc.org/GHARBEIA/ZAMAKAN/2008/02/02/064631" title="طَيُّ المُتَّصَلِ - من كنوز البرنامج الثاني"/>
  19. <author>
  20. <name xml:lang="ar">أحمد غربية</name>
  21. <email>gharbeia@gmail.com</email>
  22. <uri>http://ahmad.gharbeia.org/</uri>
  23. </author>
  24. <rights type="xhtml">
  25. <xhtml:div xml:lang="ar">
  26. بعض الحقوق محفوظة. منشور <xhtml:a title="Creative Commons Attribution 3.0 Unported" href="http://creativecommons.org/licenses/by/3.0/" hreflang="en" hreftype="application/xhtml+xml">برخصة المشاع الإبداعي: العزو 3.0</xhtml:a>
  27. </xhtml:div>
  28. </rights>
  29. <xsl:apply-templates select="doc"/>
  30. <updated><xsl:value-of select="date:date-time()"/></updated>
  31. </feed>
  32. </xsl:template>
  33. <xsl:template match="doc">
  34. <xsl:variable name="item-identifier" select="str[@name='identifier']"/>
  35. <xsl:variable name="public-date" select="date[@name='publicdate']"/>
  36. <entry>
  37. <id>tag:archive.org,<xsl:value-of select="substring($public-date,1,10)"/>:<xsl:value-of select="$item-identifier"/></id>
  38. <title xml:lang="ar"><xsl:value-of select="str[@name='title']"/></title>
  39. <link rel="alternate" type="text/html" href="http://archive.org/details/{$item-identifier}"/>
  40. <xsl:for-each select="arr[@name='creator']/str">
  41. <xsl:for-each select="str:split(text(), ';')">
  42. <author>
  43. <name><xsl:value-of select="text()"/></name>
  44. </author>
  45. </xsl:for-each>
  46. </xsl:for-each>
  47. <summary type="xhtml">
  48. <xhtml:div><xsl:value-of select="str:replace(str[@name='description']/text(), '&#13;', '&lt;br/>')" disable-output-escaping="yes"/></xhtml:div>
  49. </summary>
  50. <xsl:for-each select="arr[@name='subject']/str">
  51. <category term="{text()}"/>
  52. </xsl:for-each>
  53. <published><xsl:value-of select="$public-date"/></published>
  54. <rights xml:lang="ar">ملك عام</rights>
  55. <content type="audio/flac" src="/download/{$item-identifier}/{$item-identifier}.flac"/>
  56. <updated><xsl:value-of select="arr[@name='oai_updatedate']/date[last()]"/></updated>
  57. </entry>
  58. </xsl:template>
  59. </xsl:stylesheet>
  60.  

هذا الكود المصدري منشور في موقع أحمد غربية.

This source code listing is published in the web site of Ahmad Gharbeia.