fsfe-website/projects/projects.xsl

42 lines
1.1 KiB
XML

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" encoding="utf-8" indent="yes"/>
<!-- Fill dynamic content -->
<xsl:template match="dynamic-content">
<xsl:variable name="status"><xsl:value-of select="@status"/></xsl:variable>
<xsl:for-each select="/html/set/project [@status = $status]">
<xsl:sort select="@date" order="descending"/>
<!-- Title -->
<xsl:element name="h3">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:value-of select="link"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</xsl:element>
</xsl:element>
<!-- Description -->
<xsl:element name="p">
<xsl:apply-templates select="description/node()"/>
</xsl:element>
</xsl:for-each>
</xsl:template>
<!-- Do not copy <set> to output at all -->
<xsl:template match="set"/>
<!-- For all other nodes, copy verbatim -->
<xsl:template match="@*|node()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>