[pkg-opensc-commit] [pam-p11] 54/66: build: remove embedded wiki docs

Eric Dorland eric at moszumanska.debian.org
Tue Jun 13 04:06:54 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository pam-p11.

commit a85276f0b61a0c609adb07d987cb98c1e6bfb6c3
Author: Alon Bar-Lev <alon.barlev at gmail.com>
Date:   Fri Sep 27 22:14:41 2013 +0300

    build: remove embedded wiki docs
    
    old wiki site is unavailable.
    
    having the need for online access for build from source repository was
    never good.
    
    Signed-off-by: Alon Bar-Lev <alon.barlev at gmail.com>
---
 Makefile.am                       |   2 +-
 configure.ac                      |  59 --------
 doc/Makefile.am                   |   8 --
 doc/README                        |  10 --
 doc/nonpersistent/Makefile.am     |  56 --------
 doc/nonpersistent/export-wiki.sh  |  72 ----------
 doc/nonpersistent/export-wiki.xsl |  58 --------
 doc/nonpersistent/svn2cl.xsl      | 295 --------------------------------------
 8 files changed, 1 insertion(+), 559 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index d50ca01..36b372b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,7 @@ MAINTAINERCLEANFILES = \
 	$(srcdir)/packaged
 EXTRA_DIST = .gitignore
 
-SUBDIRS = src doc
+SUBDIRS = src
 
 dist_noinst_SCRIPTS = bootstrap
 dist_doc_DATA = NEWS
diff --git a/configure.ac b/configure.ac
index df6f4ca..9d392c9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -19,14 +19,6 @@ AC_PROG_CC
 PKG_PROG_PKG_CONFIG
 AC_C_BIGENDIAN
 
-AC_MSG_CHECKING([svn checkout])
-if test -e "${srcdir}/packaged"; then
-	svn_checkout="no"
-else
-	svn_checkout="yes"
-fi
-AC_MSG_RESULT([${svn_checkout}])
-
 AC_ARG_ENABLE(
 	[strict],
 	[AS_HELP_STRING([--enable-strict],[enable strict compile mode @<:@disabled@:>@])],
@@ -41,13 +33,6 @@ AC_ARG_ENABLE(
 	[enable_pedantic="no"]
 )
 
-AC_ARG_ENABLE(
-	[doc],
-	[AS_HELP_STRING([--enable-doc],[enable installation of documents @<:@disabled@:>@])],
-	,
-	[enable_doc="no"]
-)
-
 AC_ARG_WITH(
 	[pamdir],
 	[AS_HELP_STRING([--with-pamdir=PATH],[Specify the directory where PAM modules are stored])],
@@ -107,43 +92,6 @@ PKG_CHECK_MODULES(
 	)]
 )
 
-dnl These required for svn checkout
-AC_ARG_VAR([XSLTPROC], [xsltproc utility])
-AC_ARG_VAR([SVN], [subversion utility])
-AC_ARG_VAR([WGET], [wget utility])
-AC_ARG_VAR([WGET_OPTS], [wget options])
-AC_ARG_VAR([TR], [tr utility])
-AC_CHECK_PROGS([XSLTPROC],[xsltproc])
-AC_CHECK_PROGS([SVN],[svn])
-AC_CHECK_PROGS([WGET],[wget])
-AC_CHECK_PROGS([TR],[tr])
-test -z "${WGET_OPTS}" && WGET_OPTS="-nv"
-
-dnl svn checkout dependencies
-if test "${svn_checkout}" = "yes"; then
-	AC_MSG_CHECKING([XSLTPROC requirement])
-	if test -n "${XSLTPROC}"; then
-		AC_MSG_RESULT([ok])
-	else
-		if test "${enable_doc}" = "yes"; then
-			AC_MSG_ERROR([Missing XSLTPROC svn build with doc])
-		else
-			AC_MSG_WARN(["make dist" will not work])
-		fi
-	fi
-
-	AC_MSG_CHECKING([svn doc build dependencies])
-	if test -n "${SVN}" -a -n "${TR}" -a -n "${WGET}"; then
-		AC_MSG_RESULT([ok])
-	else
-		if test "${enable_doc}" = "yes"; then
-			AC_MSG_ERROR([Missing SVN, TR or WGET for svn doc build])
-		else
-			AC_MSG_WARN(["make dist" will not work])
-		fi
-	fi
-fi
-
 if test -z "${PAM_LIBS}"; then
 	AC_ARG_VAR([PAM_CFLAGS], [C compiler flags for pam])
 	AC_ARG_VAR([PAM_LIBS], [linker flags for pam])
@@ -157,9 +105,6 @@ fi
 
 AC_SUBST([pamdir])
 
-AM_CONDITIONAL([SVN_CHECKOUT], [test "${svn_checkout}" = "yes"])
-AM_CONDITIONAL([ENABLE_DOC], [test "${enable_doc}" = "yes"])
-
 if test "${enable_pedantic}" = "yes"; then
 	enable_strict="yes";
 	CFLAGS="${CFLAGS} -pedantic"
@@ -170,8 +115,6 @@ fi
 
 AC_CONFIG_FILES([
 	Makefile
-	doc/Makefile
-	doc/nonpersistent/Makefile
 	src/Makefile
 ])
 AC_OUTPUT
@@ -184,8 +127,6 @@ pam_p11 has been configured with the following options:
 Version:                 ${PACKAGE_VERSION}
 Libraries:               $(eval eval eval echo "${libdir}")
 
-doc support:             ${enable_doc}
-
 Host:                    ${host}
 Compiler:                ${CC}
 Preprocessor flags:      ${CPPFLAGS}
diff --git a/doc/Makefile.am b/doc/Makefile.am
deleted file mode 100644
index a97911d..0000000
--- a/doc/Makefile.am
+++ /dev/null
@@ -1,8 +0,0 @@
-MAINTAINERCLEANFILES = $(srcdir)/Makefile.in
-
-if ENABLE_DOC
-SUBDIRS = nonpersistent
-endif
-DIST_SUBDIRS = nonpersistent
-
-dist_doc_DATA = README
diff --git a/doc/README b/doc/README
deleted file mode 100644
index 460c66b..0000000
--- a/doc/README
+++ /dev/null
@@ -1,10 +0,0 @@
-This directory contains a snapshot of the pam_p11 Wiki
-=====================================================
-
-The original wiki page is at http://www.opensc-project.org/pam_p11/
-and includes a bug tracker and source browser.
-
-The wiki was transformed to html using the export-wiki shell
-script and xsl style sheet. The original version is at 
-	http://www.twdata.org/trac-howto/
-
diff --git a/doc/nonpersistent/Makefile.am b/doc/nonpersistent/Makefile.am
deleted file mode 100644
index b8ec4af..0000000
--- a/doc/nonpersistent/Makefile.am
+++ /dev/null
@@ -1,56 +0,0 @@
-MAINTAINERCLEANFILES = \
-	$(srcdir)/Makefile.in
-
-wikidir=$(htmldir)/wiki
-
-dist_noinst_SCRIPTS = export-wiki.sh export-wiki.xsl \
-	svn2cl.xsl 
-dist_wiki_DATA = wiki.out/*
-dist_noinst_DATA = ChangeLog
-
-if SVN_CHECKOUT
-
-wiki.out/*:
-	test -n "$(WGET)" -a -n "$(SED)" -a -n "$(TR)" -a -n "$(XSLTPROC)"
-	WGET="$(WGET)" WGET_OPTS="$(WGET_OPTS)" SED="$(SED)" TR="$(TR)" XSLTPROC="$(XSLTPROC)" \
-		PROJECT="@PACKAGE_NAME@" \
-		$(SHELL) "$(srcdir)/export-wiki.sh" "$(srcdir)" "wiki.tmp"
-	mv wiki.tmp wiki.out
-
-ChangeLog:
-	test -n "$(SVN)" -a -n "$(XSLTPROC)"
-	if test -d "$(top_srcdir)/.svn"; then \
-		$(SVN) --verbose --xml log "$(top_srcdir)" | \
-			$(XSLTPROC) --nonet --stringparam linelen 75 \
-			--stringparam groupbyday no \
-			--stringparam include-rev no \
-			"$(srcdir)/svn2cl.xsl" - > ChangeLog.tmp; \
-	else \
-		echo "Warning: Unable to generate ChangeLog from none svn checkout" >&2; \
-		echo > ChangeLog.tmp; \
-	fi
-	mv ChangeLog.tmp ChangeLog
-
-else
-
-wiki.out/*:
-	$(LN_S) "$(srcdir)/wiki.out" wiki.out
-
-ChangeLog:
-	$(LN_S) "$(srcdir)/ChangeLog" ChangeLog
-
-endif
-
-distclean-local:
-	-rm -rf wiki.tmp
-	if test -L wiki.out; then \
-		rm -fr wiki.out; \
-	fi
-	-rm -fr ChangeLog.tmp
-	if test -L ChangeLog; then \
-		rm -fr ChangeLog; \
-	fi
-
-maintainer-clean-local:
-	-rm -rf "$(srcdir)/wiki.out"
-	-rm -rf "$(srcdir)/ChangeLog"
diff --git a/doc/nonpersistent/export-wiki.sh b/doc/nonpersistent/export-wiki.sh
deleted file mode 100755
index ce95593..0000000
--- a/doc/nonpersistent/export-wiki.sh
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-set -e
-
-test -z "$XSLTPROC" && XSLTPROC="xsltproc"
-test -z "$WGET" && WGET="wget"
-test -z "$WGET_OPTS" && WGET_OPTS="$WGET_OPTS"
-test -z "$SED" && SED="sed"
-test -z "$TR" && TR="tr"
-
-test -z "$SERVER" && SERVER="http://www.opensc-project.org"
-test -z "$PROJECT" && PROJECT="opensc"
-
-SRCDIR=.
-OUTDIR=.
-test -n "$1" && SRCDIR="$1"
-test -n "$2" &&	OUTDIR="$2"
-
-WIKI="$PROJECT/wiki"
-XSL="$SRCDIR/export-wiki.xsl"
-
-test -f "$SRCDIR"/`basename $0`
-
-test -e "$OUTDIR" && rm -fr "$OUTDIR"
-
-mkdir "$OUTDIR" || exit 1
-
-$WGET $WGET_OPTS $SERVER/$WIKI/TitleIndex -O "$OUTDIR"/TitleIndex.tmp
-
-$SED -e "s#</li>#</li>\n#g" < "$OUTDIR"/TitleIndex.tmp \
-	| grep "\"/$WIKI/[^\"]*\"" \
-        |$SED -e "s#.*\"/$WIKI/\([^\"]*\)\".*#\1#g" \
-	> "$OUTDIR"/WikiWords.tmp
-$SED -e /^Trac/d -e /^Wiki/d -e /^TitleIndex/d -e /^RecentChanges/d \
-        -e /^CamelCase/d -e /^SandBox/d -e /^InterMapTxt/d -e /^InterWiki/d \
-        -e /^InterTrac/d -i "$OUTDIR"/WikiWords.tmp
-
-
-for A in WikiStart `cat "$OUTDIR"/WikiWords.tmp`
-do
-	F=`echo $A|$SED -e 's/\//_/g'`
-	$WGET $WGET_OPTS $SERVER/$WIKI/$A  -O "$OUTDIR"/$F.tmp
-	$XSLTPROC --nonet --output "$OUTDIR"/$F.html "$XSL" "$OUTDIR"/$F.tmp
-	$SED -e "s#<a href=\"/$WIKI/\([^\"]*\)\"#<a href=\"\1.html\"#g" \
-		-i "$OUTDIR"/$F.html
-done
-
-mv "$OUTDIR"/WikiStart.html "$OUTDIR"/index.html
-
-$WGET $WGET_OPTS http://www.opensc-project.org/trac/css/trac.css \
-	-O "$OUTDIR"/trac.css
-
-cat "$OUTDIR"/*.html |grep "<img src=\"/$PROJECT/attachment/wiki" \
-	|$SED -e 's/.*<img src="\/'$PROJECT'\/attachment\/wiki\/\([^"]*\)?format=raw".*/\1/g' \
-	|sort -u |while read A
-do
-	B="`echo $A |$TR / _`"
-	$WGET $WGET_OPTS "$SERVER/$PROJECT/attachment/wiki/$A?format=raw" -O "$OUTDIR"/$B
-	for C in "${OUTDIR}"/*.html
-	do
-		$SED -e 's#\/'$PROJECT'\/attachment\/wiki\/'$A'?format=raw#'$B'#g' -i "$C"
-	done
-done
-
-for A in "${OUTDIR}"/*.html
-do
-	$SED -e 's#href="/'$PROJECT'/wiki/\([^"]*\)"#href="\1.html"#g' \
-		-i $A
-done
-
-rm "$OUTDIR"/*.tmp
-exit 0
diff --git a/doc/nonpersistent/export-wiki.xsl b/doc/nonpersistent/export-wiki.xsl
deleted file mode 100644
index 30a600e..0000000
--- a/doc/nonpersistent/export-wiki.xsl
+++ /dev/null
@@ -1,58 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
-xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-xmlns="http://www.w3.org/1999/xhtml"
-xmlns:html="http://www.w3.org/1999/xhtml">
-	<xsl:output method="html" indent="yes"/>
-  
-  <xsl:template match="/">
-    <xsl:apply-templates />
-  </xsl:template>
-  
-  <xsl:template match="/html:html">
-      <html>
-        <head>
-          <title><xsl:value-of select="/html:html/html:head/html:title" /></title>
-          <style type="text/css">
-           @import url(trac.css);
-          </style>
-        </head>
-        <body>
-          <xsl:apply-templates select="//html:div[@class='wiki']" />
-          <div class="footer">
-            <hr />
-            <p><a href="index.html">Back to Index</a></p>
-          </div>
-        </body>
-      </html>
-  </xsl:template>
-  
-  <xsl:template match="/pages">
-      <html>
-        <head>
-          <title>Wiki Index</title>
-          <style type="text/css">
-           @import url(trac.css);
-          </style>
-        </head>
-        <body>
-          <h1>Index of Wiki Pages</h1>
-          <ul>
-          <xsl:apply-templates select="page" />
-          </ul>
-        </body>
-      </html>
-  </xsl:template>
-  
-  <xsl:template match="page">
-    <li><a href="{.}.html"><xsl:value-of select="." /></a></li>
-  </xsl:template>
-  
-  <xsl:template match="node()|@*" priority="-1">
-    <xsl:copy>
-      <xsl:apply-templates select="@*|node()"/>
-    </xsl:copy>
-  </xsl:template>
- 
-</xsl:stylesheet>
-
diff --git a/doc/nonpersistent/svn2cl.xsl b/doc/nonpersistent/svn2cl.xsl
deleted file mode 100755
index 3672035..0000000
--- a/doc/nonpersistent/svn2cl.xsl
+++ /dev/null
@@ -1,295 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!--
-
-   svn2cl.xsl - xslt stylesheet for converting svn log to a normal
-                changelog
-
-   Usage (replace ++ with two minus signs):
-     svn ++verbose ++xml log | \
-       xsltproc ++stringparam strip-prefix `basename $(pwd)` \
-                ++stringparam linelen 75 \
-                ++stringparam groupbyday yes \
-                ++stringparam include-rev yes \
-                svn2cl.xsl - > ChangeLog
-
-   This file is based on several implementations of this conversion
-   that I was not completely happy with and some other common
-   xslt constructs found on the web.
-
-   Copyright (C) 2004, 2005 Arthur de Jong.
-
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   1. Redistributions of source code must retain the above copyright
-      notice, this list of conditions and the following disclaimer.
-   2. Redistributions in binary form must reproduce the above copyright
-      notice, this list of conditions and the following disclaimer in
-      the documentation and/or other materials provided with the
-      distribution.
-   3. The name of the author may not be used to endorse or promote
-      products derived from this software without specific prior
-      written permission.
-
-   THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
-   IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-   WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-   ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
-   DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-   DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
-   GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-   INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
-   IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-   OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
-   IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
--->
-
-<!DOCTYPE page [
- <!ENTITY tab "	">
- <!ENTITY newl "
">
- <!ENTITY space " ">
-]>
-
-<!--
-   TODO
-   - make external lookups of author names possible
-   - find a place for revision numbers
-   - mark deleted files as such
-   - combine paths
-   - make path formatting nicer
--->
-
-<xsl:stylesheet
-  version="1.0"
-  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
-  xmlns="http://www.w3.org/1999/xhtml">
-
- <xsl:output
-   method="text"
-   encoding="iso-8859-15"
-   media-type="text/plain"
-   omit-xml-declaration="yes"
-   standalone="yes"
-   indent="no" />
-
- <xsl:strip-space elements="*" />
-
- <!-- the prefix of pathnames to strip -->
- <xsl:param name="strip-prefix" select="'/'" />
-
- <!-- the length of a line to wrap messages at -->
- <xsl:param name="linelen" select="75" />
- 
- <!-- whether entries should be grouped by day -->
- <xsl:param name="groupbyday" select="'no'" />
-
- <!-- whether entries should be grouped by day -->
- <xsl:param name="include-rev" select="'no'" />
-
- <!-- add newlines at the end of the changelog -->
- <xsl:template match="log">
-  <xsl:apply-templates/>
-  <xsl:text>&newl;</xsl:text>
- </xsl:template>
-
- <!-- format one entry from the log -->
- <xsl:template match="logentry">
-  <!-- save log entry number -->
-  <xsl:variable name="pos" select="position()"/>
-  <!-- fetch previous entry's date -->
-  <xsl:variable name="prevdate">
-   <xsl:apply-templates select="../logentry[position()=(($pos)-1)]/date"/>
-  </xsl:variable>
-  <!-- fetch previous entry's author -->
-  <xsl:variable name="prevauthor">
-   <xsl:apply-templates select="../logentry[position()=(($pos)-1)]/author"/>
-  </xsl:variable>
-  <!-- fetch this entry's date -->
-  <xsl:variable name="date">
-   <xsl:apply-templates select="date" />
-  </xsl:variable>
-  <!-- fetch this entry's author -->
-  <xsl:variable name="author">
-   <xsl:apply-templates select="author" />
-  </xsl:variable>
-  <!-- check if header is changed -->
-  <xsl:if test="($prevdate!=$date) or ($prevauthor!=$author)">
-   <!-- add newline -->
-   <xsl:if test="not(position()=1)">
-     <xsl:text>&newl;</xsl:text>
-   </xsl:if>
-   <!-- date -->
-   <xsl:apply-templates select="date" />
-   <!-- two spaces -->
-   <xsl:text>&space;&space;</xsl:text>
-   <!-- author's name -->
-   <xsl:apply-templates select="author" />
-   <!-- two newlines -->
-   <xsl:text>&newl;&newl;</xsl:text>
-  </xsl:if>
-  <!-- get paths string -->
-  <xsl:variable name="paths">
-   <xsl:apply-templates select="paths" />
-  </xsl:variable>
-  <!-- get revision number -->
-  <xsl:variable name="rev">
-   <xsl:if test="$include-rev='yes'">
-    <xsl:text>[r</xsl:text>
-    <xsl:value-of select="@revision"/>
-    <xsl:text>]&space;</xsl:text>
-   </xsl:if>
-  </xsl:variable>
-  <!-- first line is indented (other indents are done in wrap template) -->
-  <xsl:text>&tab;*&space;</xsl:text>
-  <!-- print the paths and message nicely wrapped -->
-  <xsl:call-template name="wrap">
-   <xsl:with-param name="txt" select="concat($rev,$paths,normalize-space(msg))" />
-  </xsl:call-template>
- </xsl:template>
-
- <!-- format date -->
- <xsl:template match="date">
-  <xsl:variable name="date" select="normalize-space(.)" />
-  <!-- output date part -->
-  <xsl:value-of select="substring($date,1,10)" />
-  <!-- output time part -->
-  <xsl:if test="$groupbyday!='yes'">
-   <xsl:text>&space;</xsl:text>
-   <xsl:value-of select="substring($date,12,5)" />
-  </xsl:if>
- </xsl:template>
-
- <!-- format author -->
- <xsl:template match="author">
-  <xsl:value-of select="normalize-space(.)" />
- </xsl:template>
-
- <!-- present a list of paths names -->
- <xsl:template match="paths">
-  <xsl:for-each select="path">
-   <xsl:sort select="normalize-space(.)" data-type="text" />
-   <!-- unless we are the first entry, add a comma -->
-   <xsl:if test="not(position()=1)">
-    <xsl:text>,&space;</xsl:text>
-   </xsl:if>
-   <!-- print the path name -->
-   <xsl:apply-templates select="."/>
-  </xsl:for-each>
-  <!-- end the list with a colon -->
-  <xsl:text>:&space;</xsl:text>
- </xsl:template>
-
- <!-- transform path to something printable -->
- <xsl:template match="path">
-  <!-- fetch the pathname -->
-  <xsl:variable name="p1" select="normalize-space(.)" />
-  <!-- strip leading slash -->
-  <xsl:variable name="p2">
-   <xsl:choose>
-    <xsl:when test="starts-with($p1,'/')">
-     <xsl:value-of select="substring($p1,2)" />
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$p1" />
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:variable>
-  <!-- strip trailing slash from strip-prefix -->
-  <xsl:variable name="sp">
-   <xsl:choose>
-    <xsl:when test="substring($strip-prefix,string-length($strip-prefix),1)='/'">
-     <xsl:value-of select="substring($strip-prefix,1,string-length($strip-prefix)-1)" />
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$strip-prefix" />
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:variable>
-  <!-- strip strip-prefix -->
-  <xsl:variable name="p3">
-   <xsl:choose>
-    <xsl:when test="starts-with($p2,$sp)">
-     <xsl:value-of select="substring($p2,1+string-length($sp))" />
-    </xsl:when>
-    <xsl:otherwise>
-     <!-- TODO: do not print strings that do not begin with strip-prefix -->
-     <xsl:value-of select="$p2" />
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:variable>
-  <!-- strip another slash -->
-  <xsl:variable name="p4">
-   <xsl:choose>
-    <xsl:when test="starts-with($p3,'/')">
-     <xsl:value-of select="substring($p3,2)" />
-    </xsl:when>
-    <xsl:otherwise>
-     <xsl:value-of select="$p3" />
-    </xsl:otherwise>
-   </xsl:choose>
-  </xsl:variable>
-  <!-- translate empty string to dot -->
-  <xsl:choose>
-   <xsl:when test="$p4 = ''">
-    <xsl:text>.</xsl:text>
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:value-of select="$p4" />
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- string-wrapping template -->
- <xsl:template name="wrap">
-  <xsl:param name="txt" />
-  <xsl:choose>
-   <xsl:when test="(string-length($txt) < (($linelen)-9)) or not(contains($txt,' '))">
-    <!-- this is easy, nothing to do -->
-    <xsl:value-of select="$txt" />
-    <!-- add newline -->
-    <xsl:text>&newl;</xsl:text>
-   </xsl:when>
-   <xsl:otherwise>
-    <!-- find the first line -->
-    <xsl:variable name="tmp" select="substring($txt,1,(($linelen)-10))" />
-    <xsl:variable name="line">
-     <xsl:choose>
-      <xsl:when test="contains($tmp,' ')">
-       <xsl:call-template name="find-line">
-        <xsl:with-param name="txt" select="$tmp" />
-       </xsl:call-template>
-      </xsl:when>
-      <xsl:otherwise>
-       <xsl:value-of select="substring-before($txt,' ')" />
-      </xsl:otherwise>
-     </xsl:choose>
-    </xsl:variable>
-    <!-- print newline and tab -->
-    <xsl:value-of select="$line" />
-    <xsl:text>&newl;&tab;&space;&space;</xsl:text>
-    <!-- wrap the rest of the text -->
-    <xsl:call-template name="wrap">
-     <xsl:with-param name="txt" select="normalize-space(substring($txt,string-length($line)+1))" />
-    </xsl:call-template>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
- <!-- template to trim line to contain space as last char -->
- <xsl:template name="find-line">
-  <xsl:param name="txt" />
-  <xsl:choose>
-   <xsl:when test="substring($txt,string-length($txt),1) = ' '">
-    <xsl:value-of select="normalize-space($txt)" />
-   </xsl:when>
-   <xsl:otherwise>
-    <xsl:call-template name="find-line">
-     <xsl:with-param name="txt" select="substring($txt,1,string-length($txt)-1)" />
-    </xsl:call-template>
-   </xsl:otherwise>
-  </xsl:choose>
- </xsl:template>
-
-</xsl:stylesheet>

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/pam-p11.git



More information about the pkg-opensc-commit mailing list