<?xml version="1.0" encoding="utf-8"?> <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"> <xsl:import href="str.replace.function.xsl"/> <xsl:import href="str.split.function.xsl"/> <xsl:output method="xml" cdata-section-elements="div" media-type="application/atom+xml" encoding="utf-8"/> <xsl:template match="/response/lst"/> <xsl:template match="/response/result"> <xsl:processing-instruction name="xml-stylesheet">href="atom.css" type="text/css"</xsl:processing-instruction> <feed xml:base="http://archive.org/"> <id>http://purl.oclc.org/GHARBEIA/AHMAD/p2-archive/atom.xml</id> <icon>http://www.archive.org/images/mediatype_etree.gif</icon> <logo>http://ia311316.us.archive.org/0/items/audio/audio.gif</logo> <title type="html" xml:lang="ar">أرشيف تسجيلات إذاعة البرنامج الثقافي في <a href="http://archive.org/">archive.org<a></title> <subtitle xml:lang="ar">تسجيلات أحمد غربية من إذاعة البرنامج الثاني</subtitle> <link rel="self" href="http://purl.oclc.org/GHARBEIA/AHMAD/p2-archive/atom.xml"/> <link rel="alternate" type="text/html" href="http://tinyurl.com/programme2archive-tables" title="في صيغة HTML"/> <link rel="via" type="text/xml" href="http://tinyurl.com/programme2archive-xml"/> <link rel="related" hreflang="ar" href="http://purl.oclc.org/GHARBEIA/ZAMAKAN/2008/02/02/064631" title="طَيُّ المُتَّصَلِ - من كنوز البرنامج الثاني"/> <author> <name xml:lang="ar">أحمد غربية</name> <email>gharbeia@gmail.com</email> <uri>http://ahmad.gharbeia.org/</uri> </author> <rights type="xhtml"> <xhtml:div xml:lang="ar"> بعض الحقوق محفوظة. منشور <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> </xhtml:div> </rights> <xsl:apply-templates select="doc"/> <updated><xsl:value-of select="date:date-time()"/></updated> </feed> </xsl:template> <xsl:template match="doc"> <xsl:variable name="item-identifier" select="str[@name='identifier']"/> <xsl:variable name="public-date" select="date[@name='publicdate']"/> <entry> <id>tag:archive.org,<xsl:value-of select="substring($public-date,1,10)"/>:<xsl:value-of select="$item-identifier"/></id> <title xml:lang="ar"><xsl:value-of select="str[@name='title']"/></title> <link rel="alternate" type="text/html" href="http://archive.org/details/{$item-identifier}"/> <xsl:for-each select="arr[@name='creator']/str"> <xsl:for-each select="str:split(text(), ';')"> <author> <name><xsl:value-of select="text()"/></name> </author> </xsl:for-each> </xsl:for-each> <summary type="xhtml"> <xhtml:div><xsl:value-of select="str:replace(str[@name='description']/text(), ' ', '<br/>')" disable-output-escaping="yes"/></xhtml:div> </summary> <xsl:for-each select="arr[@name='subject']/str"> <category term="{text()}"/> </xsl:for-each> <published><xsl:value-of select="$public-date"/></published> <rights xml:lang="ar">ملك عام</rights> <content type="audio/flac" src="/download/{$item-identifier}/{$item-identifier}.flac"/> <updated><xsl:value-of select="arr[@name='oai_updatedate']/date[last()]"/></updated> </entry> </xsl:template> </xsl:stylesheet>
هذا الكود المصدري منشور في موقع أحمد غربية.
This source code listing is published in the web site of Ahmad Gharbeia.