- Add a sponsor element to the status report DTD so that sponsores can be

mentioned in a unified manner
- Generate sponsor entries into the output
- Update the template

Requested by:	theraven
This commit is contained in:
Gabor Kovesdan 2014-01-19 12:40:13 +00:00
parent b99fd09e89
commit 395845e6b6
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43567
3 changed files with 22 additions and 1 deletions
en_US.ISO8859-1/htdocs/news/status
share/xml

View file

@ -51,6 +51,9 @@
in this area.</p>
</body>
<sponsor>Optional sponsor</sponsor>
<sponsor>Another one</sponsor>
<!-- Optional section for listing tasks. -->
<help>
<task>If help is needed, make this explicit!</task>

View file

@ -93,6 +93,22 @@
<xsl:apply-templates select="body"/>
<xsl:if test="sponsor">
<xsl:variable name="sponsors">
<xsl:for-each select="sponsor">
<xsl:value-of select="."/>
<xsl:choose>
<xsl:when test="position() = last()">.</xsl:when>
<xsl:when test="position() = (last() - 1)"> and </xsl:when>
<xsl:when test="position() &lt; (last() - 1)">, </xsl:when>
<xsl:otherwise>.</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:variable>
<p>This project was sponsored by <xsl:value-of select="$sponsors"/></p>
</xsl:if>
<xsl:apply-templates select="help"/>
<hr/>

View file

@ -44,7 +44,7 @@
id ID #IMPLIED
>
<!ELEMENT project (title, contact, links, body, help?)>
<!ELEMENT project (title, contact, links, body, sponsor*, help?)>
<!ATTLIST project
id ID #IMPLIED
cat CDATA #REQUIRED
@ -86,6 +86,8 @@
href CDATA #REQUIRED
>
<!ELEMENT sponsor (#PCDATA)>
<!ELEMENT help (task)+>
<!ATTLIST help
id ID #IMPLIED