blob: 7e6c21346b0658189d4cb8e3c63d7ce9e5b5956b [file] [log] [blame]
kbr_google38e9d272011-12-08 06:07:51 +00001<?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_google50797882012-05-17 03:24:48 +000011 <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_google38e9d272011-12-08 06:07:51 +000024
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_google9eeea3a2012-05-10 00:25:20 +000037 <xsl:copy-of select="*|@*" />
kbr_google38e9d272011-12-08 06:07:51 +000038 <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 Boesch29747e32015-01-21 09:15:28 +010044<!-- 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_google4062a142012-05-07 20:21:02 +000052<!-- proposals are not summarized in the registry or syndication feeds -->
Kenneth Russell45cea532012-08-28 09:13:20 -070053<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_google4062a142012-05-07 20:21:02 +000059
kbr_googled28f5732012-07-20 02:17:54 +000060<xsl:template match="extension|draft|ratified">
kbr_google38e9d272011-12-08 06:07:51 +000061 <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>