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:xsl="http://www.w3.org/1999/XSL/Transform"> |
| 5 | |
| 6 | <xsl:param name="extensions" /> |
| 7 | |
| 8 | <xsl:template name="output-summaries"> |
| 9 | <xsl:param name="list" /> |
| 10 | <xsl:variable name="car" select="substring-before($list, ',')" /> |
kbr_google | 5079788 | 2012-05-17 03:24:48 +0000 | [diff] [blame] | 11 | <xsl:variable name="cdr" select="substring-after($list, ',')" /> |
| 12 | |
| 13 | <xsl:variable name="path"> |
| 14 | <xsl:choose> |
| 15 | <xsl:when test="substring-after($car,'.')='xml'"> |
| 16 | <xsl:value-of select="$car" /> |
| 17 | </xsl:when> |
| 18 | <xsl:otherwise> |
| 19 | <xsl:value-of select="concat($car,'/extension.xml')" /> |
| 20 | </xsl:otherwise> |
| 21 | </xsl:choose> |
| 22 | </xsl:variable> |
| 23 | <xsl:apply-templates select="document($path)" /> |
kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 24 | |
| 25 | <xsl:if test="$cdr"> |
| 26 | <xsl:call-template name="output-summaries"> |
| 27 | <xsl:with-param name="list" select="$cdr" /> |
| 28 | </xsl:call-template> |
| 29 | </xsl:if> |
| 30 | </xsl:template> |
| 31 | |
| 32 | <xsl:template match="comment()"><xsl:copy /></xsl:template> |
| 33 | |
| 34 | <xsl:template match="registry"> |
| 35 | <xsl:comment>AUTOGENERATED FILE - DO NOT EDIT - SEE Makefile</xsl:comment> |
| 36 | <registry> |
kbr_google | 9eeea3a | 2012-05-10 00:25:20 +0000 | [diff] [blame] | 37 | <xsl:copy-of select="*|@*" /> |
kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 38 | <xsl:call-template name="output-summaries"> |
| 39 | <xsl:with-param name="list" select="concat($extensions,',')"/> |
| 40 | </xsl:call-template> |
| 41 | </registry> |
| 42 | </xsl:template> |
| 43 | |
Florian Boesch | 29747e3 | 2015-01-21 09:15:28 +0100 | [diff] [blame] | 44 | <!-- rejected are not summarized in the registry or syndication feeds --> |
| 45 | <xsl:template match="rejected"> |
| 46 | <xsl:copy> |
| 47 | <xsl:copy-of select="@href" /> |
| 48 | <xsl:copy-of select="name"/> |
| 49 | </xsl:copy> |
| 50 | </xsl:template> |
| 51 | |
kbr_google | 4062a14 | 2012-05-07 20:21:02 +0000 | [diff] [blame] | 52 | <!-- proposals are not summarized in the registry or syndication feeds --> |
Kenneth Russell | 45cea53 | 2012-08-28 09:13:20 -0700 | [diff] [blame] | 53 | <xsl:template match="proposal"> |
| 54 | <xsl:copy> |
| 55 | <xsl:copy-of select="@href" /> |
| 56 | <xsl:copy-of select="name"/> |
| 57 | </xsl:copy> |
| 58 | </xsl:template> |
kbr_google | 4062a14 | 2012-05-07 20:21:02 +0000 | [diff] [blame] | 59 | |
kbr_google | d28f573 | 2012-07-20 02:17:54 +0000 | [diff] [blame] | 60 | <xsl:template match="extension|draft|ratified"> |
kbr_google | 38e9d27 | 2011-12-08 06:07:51 +0000 | [diff] [blame] | 61 | <xsl:copy> |
| 62 | <xsl:copy-of select="@href" /> |
| 63 | <xsl:copy-of select="name"/> |
| 64 | <xsl:copy-of select="number"/> |
| 65 | <history> |
| 66 | <xsl:for-each select="history/revision"> |
| 67 | <xsl:sort select="@date"/> |
| 68 | <xsl:copy> |
| 69 | <xsl:copy-of select="@*"/> |
| 70 | <xsl:attribute name="number"> |
| 71 | <xsl:value-of select="position()"/> |
| 72 | </xsl:attribute> |
| 73 | <xsl:copy-of select="node()"/> |
| 74 | </xsl:copy> |
| 75 | </xsl:for-each> |
| 76 | </history> |
| 77 | </xsl:copy> |
| 78 | </xsl:template> |
| 79 | |
| 80 | </xsl:stylesheet> |