kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 1 | <?xml version="1.0"?> |
| 2 | |
| 3 | <xsl:stylesheet version="1.0" |
| 4 | xmlns="http://www.w3.org/2005/Atom" |
| 5 | xmlns:a="http://www.w3.org/2005/Atom" |
| 6 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 7 | |
| 8 | <xsl:variable name="registry" select="document('registry.xml')/registry" /> |
| 9 | |
| 10 | <xsl:template match="a:feed"> |
| 11 | <xsl:copy> |
| 12 | <xsl:copy-of select="@*" /> |
| 13 | <xsl:apply-templates select="*" /> |
| 14 | |
| 15 | <xsl:for-each select="$registry/*/history/revision"> |
| 16 | <xsl:sort select="@date" order="descending"/> |
kbr_google | 5079788 | 2012-05-17 03:24:48 +0000 | [diff] [blame] | 17 | <xsl:sort select="@number" order="descending"/> |
kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 18 | <xsl:if test="position() < 11"> |
| 19 | <entry> |
| 20 | <title> |
| 21 | <xsl:value-of select="../../name" /> |
| 22 | <xsl:text> : revision </xsl:text> |
| 23 | <xsl:value-of select="@number"/> |
| 24 | </title> |
| 25 | <link rel="alternate" type="text/html" href="{../../@href}"/> |
| 26 | |
| 27 | <id><xsl:value-of select="../../@href"/>#r=<xsl:value-of select="@number"/></id> |
| 28 | <updated><xsl:value-of select="translate(@date,'/','-')"/>T23:59:59Z</updated> |
| 29 | <summary> |
| 30 | <xsl:for-each select="change"> |
David Sheets | f2849f6 | 2013-03-02 22:18:11 -0800 | [diff] [blame] | 31 | <xsl:value-of select="."/><xsl:text>

</xsl:text> |
kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 32 | </xsl:for-each> |
| 33 | </summary> |
| 34 | </entry> |
| 35 | </xsl:if> |
| 36 | </xsl:for-each> |
| 37 | </xsl:copy> |
| 38 | </xsl:template> |
| 39 | |
| 40 | <xsl:template match="*"> |
| 41 | <xsl:copy> |
| 42 | <xsl:copy-of select="@*" /> |
| 43 | <xsl:apply-templates select="node()" /> |
| 44 | </xsl:copy> |
| 45 | </xsl:template> |
| 46 | |
| 47 | <xsl:template match="a:updated"> |
| 48 | <xsl:for-each select="$registry/*/history/revision"> |
| 49 | <xsl:sort select="@date"/> |
| 50 | <xsl:if test="position()=last()"> |
| 51 | <updated> |
| 52 | <xsl:value-of select="translate(@date,'/','-')"/><xsl:text>T23:59:59Z</xsl:text> |
| 53 | </updated> |
| 54 | </xsl:if> |
| 55 | </xsl:for-each> |
| 56 | </xsl:template> |
| 57 | |
| 58 | </xsl:stylesheet> |