Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 7 Mar 2014 11:37:22 +0000 (UTC)
From:      Gabor Kovesdan <gabor@FreeBSD.org>
To:        doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org
Subject:   svn commit: r44165 - in head: en_US.ISO8859-1/books/handbook share/xml
Message-ID:  <201403071137.s27BbM2v006612@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: gabor
Date: Fri Mar  7 11:37:21 2014
New Revision: 44165
URL: http://svnweb.freebsd.org/changeset/doc/44165

Log:
  - Allow generating only PGP fingerprints

Modified:
  head/en_US.ISO8859-1/books/handbook/Makefile
  head/share/xml/freebsd-pgpkeyring.xsl

Modified: head/en_US.ISO8859-1/books/handbook/Makefile
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/Makefile	Fri Mar  7 02:34:39 2014	(r44164)
+++ head/en_US.ISO8859-1/books/handbook/Makefile	Fri Mar  7 11:37:21 2014	(r44165)
@@ -288,7 +288,7 @@ XMLFLAGS+= ${CHAPTERS:S/\/chapter.xml//:
 XMLFLAGS+= -i chap.freebsd-glossary
 
 pgpkeyring: pgpkeys/chapter.xml ${DOC}.parsed.xml
-	@${XSLTPROC} ${XSLPGP} ${DOC}.parsed.xml
+	@${XSLTPROC} ${XSLTPROCOPTS} ${XSLPGP} ${DOC}.parsed.xml
 
 #
 # Handbook-specific variables
@@ -343,3 +343,8 @@ SRCS+=		mirrors.lastmod.inc \
 		eresources.xml.www.index.inc
 
 .include "${DOC_PREFIX}/share/mk/doc.project.mk"
+
+# XXX
+.if defined(FINGERPRINTS_ONLY)
+XSLTPROCOPTS+=--param generate.fingerprint.only '1'
+.endif

Modified: head/share/xml/freebsd-pgpkeyring.xsl
==============================================================================
--- head/share/xml/freebsd-pgpkeyring.xsl	Fri Mar  7 02:34:39 2014	(r44164)
+++ head/share/xml/freebsd-pgpkeyring.xsl	Fri Mar  7 11:37:21 2014	(r44165)
@@ -8,10 +8,23 @@
 
   <xsl:output method="text"/>
 
+  <xsl:param name="generate.fingerprint.only" select="0"/>
+
   <xsl:template match="/">
-    <xsl:for-each select="//db:programlisting[@role='pgpkey']">
-      <xsl:value-of select="."/>
-      <xsl:text>&#xA;</xsl:text>
-    </xsl:for-each>
+    <xsl:choose>
+      <xsl:when test="$generate.fingerprint.only">
+	<xsl:for-each select="//db:programlisting[@role='pgpfingerprint']">
+	  <xsl:value-of select="."/>
+	  <xsl:text>&#xA;</xsl:text>
+	</xsl:for-each>
+      </xsl:when>
+
+      <xsl:otherwise>
+	<xsl:for-each select="//db:programlisting[@role='pgpkey' or @role='pgpfingerprint']">
+	  <xsl:value-of select="."/>
+	  <xsl:text>&#xA;</xsl:text>
+	</xsl:for-each>
+      </xsl:otherwise>
+    </xsl:choose>
   </xsl:template>
 </xsl:stylesheet>



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