[2] | 1 | <?xml version='1.0'?>
|
---|
| 2 | <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
---|
| 3 | xmlns:date="http://exslt.org/dates-and-times"
|
---|
| 4 | xmlns:exsl="http://exslt.org/common"
|
---|
| 5 | exclude-result-prefixes="date exsl"
|
---|
| 6 | version='1.0'>
|
---|
| 7 |
|
---|
| 8 | <!-- ********************************************************************
|
---|
| 9 | $Id: info.xsl,v 1.8 2005/07/09 07:41:58 xmldoc Exp $
|
---|
| 10 | ********************************************************************
|
---|
| 11 |
|
---|
| 12 | This file is part of the XSL DocBook Stylesheet distribution.
|
---|
| 13 | See ../README or http://docbook.sf.net/release/xsl/current/ for
|
---|
| 14 | copyright and other information.
|
---|
| 15 |
|
---|
| 16 | ******************************************************************** -->
|
---|
| 17 |
|
---|
| 18 | <!-- ================================================================== -->
|
---|
| 19 | <!-- * Get user "refentry metadata" preferences -->
|
---|
| 20 | <!-- ================================================================== -->
|
---|
| 21 |
|
---|
| 22 | <xsl:variable name="get.refentry.metadata.prefs">
|
---|
| 23 | <xsl:call-template name="get.refentry.metadata.prefs"/>
|
---|
| 24 | </xsl:variable>
|
---|
| 25 |
|
---|
| 26 | <xsl:variable name="refentry.metadata.prefs"
|
---|
| 27 | select="exsl:node-set($get.refentry.metadata.prefs)"/>
|
---|
| 28 |
|
---|
| 29 | <!-- * =============================================================== -->
|
---|
| 30 |
|
---|
| 31 | <xsl:template name="author.section">
|
---|
| 32 | <!-- * WARNING: The author.section API is slated for a rewrite and -->
|
---|
| 33 | <!-- * should not be considered stable. -->
|
---|
| 34 | <xsl:param name="info"/>
|
---|
| 35 | <xsl:param name="parentinfo"/>
|
---|
| 36 | <xsl:choose>
|
---|
| 37 | <xsl:when test="$info//author">
|
---|
| 38 | <xsl:apply-templates select="$info" mode="authorsect"/>
|
---|
| 39 | </xsl:when>
|
---|
| 40 | <xsl:when test="$parentinfo//author">
|
---|
| 41 | <xsl:apply-templates select="$parentinfo" mode="authorsect"/>
|
---|
| 42 | </xsl:when>
|
---|
| 43 | </xsl:choose>
|
---|
| 44 | </xsl:template>
|
---|
| 45 |
|
---|
| 46 | <!-- * Match only the direct *info children of Refentry, along with -->
|
---|
| 47 | <!-- * any *info for the valid direct parents of Refentry -->
|
---|
| 48 | <xsl:template match="info|refentryinfo|referenceinfo
|
---|
| 49 | |articleinfo|chapterinfo|sectioninfo
|
---|
| 50 | |sect1info|sect2info|sect3info|sect4info|sect5info
|
---|
| 51 | |partinfo|prefaceinfo|appendixinfo|docinfo"
|
---|
| 52 | mode="authorsect">
|
---|
| 53 | <xsl:text>.SH "</xsl:text>
|
---|
| 54 | <xsl:call-template name="string.upper">
|
---|
| 55 | <xsl:with-param name="string">
|
---|
| 56 | <xsl:call-template name="gentext">
|
---|
| 57 | <xsl:with-param name="key" select="'Author'"/>
|
---|
| 58 | </xsl:call-template>
|
---|
| 59 | </xsl:with-param>
|
---|
| 60 | </xsl:call-template>
|
---|
| 61 | <xsl:text>" </xsl:text>
|
---|
| 62 |
|
---|
| 63 | <xsl:for-each select=".//author" >
|
---|
| 64 | <xsl:if test="position() > 1">
|
---|
| 65 | <xsl:text>, </xsl:text>
|
---|
| 66 | </xsl:if>
|
---|
| 67 | <xsl:apply-templates select="." mode="authorsect"/>
|
---|
| 68 | </xsl:for-each>
|
---|
| 69 | <xsl:text>. </xsl:text>
|
---|
| 70 | <xsl:if test=".//editor">
|
---|
| 71 | <xsl:text>.br </xsl:text>
|
---|
| 72 | <xsl:apply-templates select=".//editor" mode="authorsect"/>
|
---|
| 73 | <xsl:text>. (man page) </xsl:text>
|
---|
| 74 | </xsl:if>
|
---|
| 75 | <xsl:for-each select="address">
|
---|
| 76 | <xsl:text>.br </xsl:text>
|
---|
| 77 | <xsl:apply-templates/>
|
---|
| 78 | <xsl:text> </xsl:text>
|
---|
| 79 | </xsl:for-each>
|
---|
| 80 | </xsl:template>
|
---|
| 81 |
|
---|
| 82 | <xsl:template match="author|editor" mode="authorsect">
|
---|
| 83 | <xsl:call-template name="person.name"/>
|
---|
| 84 | <xsl:if test=".//email">
|
---|
| 85 | <xsl:text> </xsl:text>
|
---|
| 86 | <xsl:apply-templates select=".//email" mode="authorsect"/>
|
---|
| 87 | </xsl:if>
|
---|
| 88 | </xsl:template>
|
---|
| 89 |
|
---|
| 90 | <xsl:template match="email" mode="authorsect">
|
---|
| 91 | <xsl:text><</xsl:text>
|
---|
| 92 | <xsl:apply-templates/>
|
---|
| 93 | <xsl:text>></xsl:text>
|
---|
| 94 | </xsl:template>
|
---|
| 95 |
|
---|
| 96 | <!-- * ============================================================== -->
|
---|
| 97 |
|
---|
| 98 | <!-- * suppress refmeta and all *info (we grab what we need from them -->
|
---|
| 99 | <!-- * elsewhere) -->
|
---|
| 100 |
|
---|
| 101 | <xsl:template match="refmeta"/>
|
---|
| 102 |
|
---|
| 103 | <xsl:template match="info|refentryinfo|referenceinfo|refsynopsisdivinfo
|
---|
| 104 | |refsectioninfo|refsect1info|refsect2info|refsect3info
|
---|
| 105 | |articleinfo|chapterinfo|sectioninfo
|
---|
| 106 | |sect1info|sect2info|sect3info|sect4info|sect5info
|
---|
| 107 | |partinfo|prefaceinfo|appendixinfo|docinfo"/>
|
---|
| 108 |
|
---|
| 109 | <!-- ============================================================== -->
|
---|
| 110 |
|
---|
| 111 | </xsl:stylesheet>
|
---|