Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 7 May 2014 19:20:55 +0000 (UTC)
From:      Glen Barber <gjb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r265590 - head/release/doc/share/xml
Message-ID:  <201405071920.s47JKt66041613@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gjb
Date: Wed May  7 19:20:54 2014
New Revision: 265590
URL: http://svnweb.freebsd.org/changeset/base/265590

Log:
  Modify release.xsl to allow proper attribution for
  sponsored and/or contributed works.
  
  This works similarly to how the subversion revision is
  suffixed in release notes entries when 'revision="NNNNNN"'
  is set.
  
  The <para> tag in relnotes/article.xml can now take the
  following new elements:
  
   - contrib: defined to what type of contribution the change
     is.  Right now, only 'vendor' or 'sponsor' are used.
     'vendor' is intended for vendor-contributed code, such as
     driver updates, etc.  'sponsor' is intended for sponsored
     work (the 'Sponsored by:' in the commit template).
  
   - vendor: The canonical name of the vendor.
  
   - sponsor: The canonical name of the sponsor.
  
   - vendorurl: The URL for the vendor website, if applicable.
  
   - sponsorurl: The URL for the sponsor website, if applicable.
  
  If 'vendor' or 'sponsor' are set, but 'contrib' is not, nothing
  is rendered.  If 'contrib' is set, but no 'vendor' or 'sponsor'
  are defined, nothing is printed.  If 'vendorurl' or 'sponsorurl'
  are set, the 'vendor' or 'sponsor' text is link, otherwise is
  non-clickable text.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  head/release/doc/share/xml/release.xsl

Modified: head/release/doc/share/xml/release.xsl
==============================================================================
--- head/release/doc/share/xml/release.xsl	Wed May  7 19:13:09 2014	(r265589)
+++ head/release/doc/share/xml/release.xsl	Wed May  7 19:20:54 2014	(r265590)
@@ -43,6 +43,51 @@
 	    <xsl:value-of select="concat('[r', @revision, ']')"/>
 	  </xsl:element>
 	</xsl:if>
+	<xsl:if test="@contrib">
+	  <xsl:element name="span">
+	    <xsl:attribute name="class">
+	      <xsl:value-of select="'contrib'"/>
+	    </xsl:attribute>
+	    <xsl:choose>
+	      <xsl:when test="@contrib = 'sponsor'">
+		<xsl:if test="@sponsor != ''">
+		  (Sponsored by
+		  <xsl:choose>
+		    <xsl:when test="@sponsorurl != ''">
+		      <xsl:element name="a">
+			<xsl:attribute name="href">
+			  <xsl:value-of select="@sponsorurl"/>
+			</xsl:attribute>
+			<xsl:value-of select="concat(@sponsor, ')')"/>
+		      </xsl:element>
+		    </xsl:when>
+		    <xsl:otherwise>
+		      <xsl:value-of select="concat(@sponsor, ')')"/>
+		    </xsl:otherwise>
+		  </xsl:choose>
+		</xsl:if>
+	      </xsl:when>
+	      <xsl:when test="@contrib = 'vendor'">
+		<xsl:if test="@vendor != ''">
+		  (Contributed / provided by
+		  <xsl:choose>
+		    <xsl:when test="@vendorurl != ''">
+		      <xsl:element name="a">
+			<xsl:attribute name="href">
+			  <xsl:value-of select="@vendorurl"/>
+			</xsl:attribute>
+			<xsl:value-of select="concat(@vendor, ')')"/>
+		      </xsl:element>
+		    </xsl:when>
+		    <xsl:otherwise>
+		      <xsl:value-of select="concat(@vendor, ')')"/>
+		    </xsl:otherwise>
+		  </xsl:choose>
+		</xsl:if>
+	      </xsl:when>
+	    </xsl:choose>
+	  </xsl:element>
+	</xsl:if>
        </p>
      </xsl:variable>
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405071920.s47JKt66041613>