2004-04-07 14:40:50 +04:00
<?xml version='1.0'?>
<!--
Generate Docbook/XML file with attributions based on chapter/author tags
(C) Jelmer Vernooij 2003
2009-05-01 22:36:56 +04:00
Published under the GNU GPLv3 or later
2004-04-07 14:40:50 +04:00
-->
<xsl:stylesheet xmlns:xsl= "http://www.w3.org/1999/XSL/Transform"
2004-06-18 17:11:00 +04:00
version="1.1">
2004-04-07 14:40:50 +04:00
2009-05-01 22:36:56 +04:00
<xsl:output method= "xml" doctype-public= "-//Samba-Team//DTD DocBook V4.2-Based Variant V1.0//EN" doctype-system= "http://www.samba.org/samba/DTD/samba-doc" indent= "yes" />
2004-04-07 14:40:50 +04:00
<!-- Remove all character data -->
<xsl:template match= "@*|node()" >
<xsl:apply-templates select= "@*|node()" />
</xsl:template>
2004-06-20 16:43:16 +04:00
<xsl:template match= "/" >
<xsl:element name= "preface" >
<xsl:element name= "title" > <xsl:text > Attribution</xsl:text> </xsl:element>
2004-09-05 18:46:49 +04:00
<xsl:apply-templates />
2004-06-20 16:43:16 +04:00
</xsl:element>
</xsl:template>
2004-07-31 00:23:24 +04:00
<xsl:template match= "chapter|preface" >
2004-04-07 14:40:50 +04:00
<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>
2004-06-06 01:07:13 +04:00
<xsl:template match= "chapterinfo/author" >
2004-04-07 14:40:50 +04:00
<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:element name= "ulink" >
2005-03-13 01:34:38 +03:00
<xsl:attribute name= "noescape" >
2004-04-07 14:40:50 +04:00
<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:element>
</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>