blob: 5a2e96498cabafef1047e20363f8341d040c77d1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="atom.xslt"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.w3.org/2005/Atom">
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>
<xsl:variable name="root">https://px.cnx.gdn/</xsl:variable>
<xsl:template match="page">
<xsl:variable name="base">
<xsl:value-of select="$root"/>
<xsl:value-of select="@curr"/>
<xsl:text>/</xsl:text>
</xsl:variable>
<xsl:for-each select="post">
<xsl:variable name="url">
<xsl:value-of select="$base"/>
<xsl:text>#</xsl:text>
<xsl:value-of select="translate(@title, ' ', '-')"/>
</xsl:variable>
<entry xml:lang="{@lang}">
<link rel="alternate" type="application/xhtml+xml" href="{$url}"/>
<id><xsl:value-of select="$url"/></id>
<title><xsl:value-of select="@title"/></title>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<xsl:for-each select="picture">
<img alt="{@desc}" title="{@desc}"
src="{$base}{@filename}.jpg"/>
</xsl:for-each>
</div>
</content>
<updated><xsl:value-of select="@time"/></updated>
</entry>
</xsl:for-each>
</xsl:template>
<xsl:template match="/">
<feed xmlns="http://www.w3.org/2005/Atom">
<link href="{$root}atom.xml" rel="self"/>
<link href="{$root}"/>
<id><xsl:value-of select="$root"/></id>
<icon><xsl:value-of select="$root"/>favicon.png</icon>
<title>pix by cnx</title>
<author>
<name>Nguyễn Gia Phong</name>
<uri>https://cnx.gdn/</uri>
<email>cnx@loang.net</email>
</author>
<rights>CC BY-SA 4.0</rights>
<updated>2024-10-04T15:42:29Z</updated>
<xsl:apply-templates select="document('00/index.xml')/page"/>
<xsl:apply-templates select="document('01/index.xml')/page"/>
<xsl:apply-templates select="document('02/index.xml')/page"/>
<xsl:apply-templates select="document('03/index.xml')/page"/>
<xsl:apply-templates select="document('04/index.xml')/page"/>
<xsl:apply-templates select="document('05/index.xml')/page"/>
<xsl:apply-templates select="document('06/index.xml')/page"/>
<xsl:apply-templates select="document('07/index.xml')/page"/>
<xsl:apply-templates select="document('08/index.xml')/page"/>
<xsl:apply-templates select="document('09/index.xml')/page"/>
<xsl:apply-templates select="document('10/index.xml')/page"/>
<xsl:apply-templates select="document('11/index.xml')/page"/>
<xsl:apply-templates select="document('12/index.xml')/page"/>
<xsl:apply-templates select="document('13/index.xml')/page"/>
<xsl:apply-templates select="document('14/index.xml')/page"/>
<xsl:apply-templates select="document('15/index.xml')/page"/>
</feed>
</xsl:template>
</xsl:stylesheet>
|