diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2004-04-07 10:40:50 +0000 |
---|---|---|
committer | Gerald W. Carter <jerry@samba.org> | 2008-04-23 08:45:43 -0500 |
commit | dabce971b0a08c2a85428b2db29152dce2cb4075 (patch) | |
tree | be059214131897047b38f637fd7d56a096a8a501 /docs/xslt/generate-attributions.xsl | |
parent | 992f1e6b8f86b346fddd266b04d29cde69585633 (diff) | |
download | samba-dabce971b0a08c2a85428b2db29152dce2cb4075.tar.gz samba-dabce971b0a08c2a85428b2db29152dce2cb4075.tar.bz2 samba-dabce971b0a08c2a85428b2db29152dce2cb4075.zip |
- Better names for some files
- Add the build system
(This used to be commit 450386e3edfc59e0ad67c12998eddfc46b381250)
Diffstat (limited to 'docs/xslt/generate-attributions.xsl')
-rw-r--r-- | docs/xslt/generate-attributions.xsl | 81 |
1 files changed, 81 insertions, 0 deletions
diff --git a/docs/xslt/generate-attributions.xsl b/docs/xslt/generate-attributions.xsl new file mode 100644 index 0000000000..79bf942504 --- /dev/null +++ b/docs/xslt/generate-attributions.xsl @@ -0,0 +1,81 @@ +<?xml version='1.0'?> +<!-- + Generate Docbook/XML file with attributions based on chapter/author tags + (C) Jelmer Vernooij 2003 +--> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:exsl="http://exslt.org/common" + xmlns:samba="http://samba.org/common" + version="1.1" + extension-element-prefixes="exsl"> + +<xsl:output method="xml" omit-xml-declaration="yes"/> + +<!-- Remove all character data --> +<xsl:template match="@*|node()"> + <xsl:apply-templates select="@*|node()"/> +</xsl:template> + +<xsl:template match="chapter"> + <xsl:choose> + <xsl:when test="chapterinfo/author != ''"> + <xsl:element name="para"> + <xsl:element name="link"> + <xsl:attribute name="linkend"><xsl:value-of select="@id"/></xsl:attribute> + <xsl:value-of select="title"/> + </xsl:element> + <xsl:text> 	</xsl:text> + <xsl:element name="itemizedlist"> + <xsl:apply-templates/> + <xsl:text>	</xsl:text> + </xsl:element> + <xsl:text> </xsl:text> + </xsl:element> + </xsl:when> + </xsl:choose> +</xsl:template> + +<xsl:template match="author"> + <xsl:choose> + <xsl:when test="firstname != ''"> + <xsl:text>	</xsl:text> + <xsl:element name="listitem"> + <xsl:element name="para"> + <xsl:value-of select="firstname"/> + <xsl:if test="othername != ''"> + <xsl:text> </xsl:text> + <xsl:value-of select="othername"/> + <xsl:text> </xsl:text> + </xsl:if> + <xsl:text> </xsl:text><xsl:value-of select="surname"/> + <xsl:choose> + <xsl:when test="affiliation/address/email != ''"> + <xsl:text> <</xsl:text> + <xsl:element name="ulink"> + <xsl:attribute name="noescape"> + <xsl:text>1</xsl:text> + </xsl:attribute> + <xsl:attribute name="url"> + <xsl:text>mailto:</xsl:text> + <xsl:value-of select="affiliation/address/email"/> + </xsl:attribute> + <xsl:value-of select="affiliation/address/email"/> + </xsl:element> + <xsl:text>></xsl:text> + </xsl:when> + </xsl:choose> + <xsl:choose> + <xsl:when test="contrib != ''"> + <xsl:text> (</xsl:text> + <xsl:value-of select="contrib"/> + <xsl:text>) </xsl:text> + </xsl:when> + </xsl:choose> + </xsl:element> + </xsl:element> + <xsl:text> </xsl:text> + </xsl:when> + </xsl:choose> +</xsl:template> + +</xsl:stylesheet> |