[2] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
| 2 | |
---|
| 3 | <!-- |
---|
| 4 | module : |
---|
| 5 | création d'une table avec tous les auteurs et le lien interne ou externe associé |
---|
| 6 | |
---|
| 7 | source : |
---|
| 8 | /usr/home/fplod/incas/bibnemo/src/bibnemomaf/table_authors.xsl sur aedon.locean-ipsl.upmc.fr |
---|
| 9 | |
---|
| 10 | update : |
---|
| 11 | ++ plein de trucs |
---|
| 12 | fplod 2007-05-18T14:40:38Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 13 | modif gestion des id |
---|
| 14 | fplod 2007-05-16T15:01:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 15 | correction pour homonymes partiels |
---|
| 16 | fplod 2007-04-18T13:32:33Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 17 | creation |
---|
| 18 | --> |
---|
| 19 | |
---|
| 20 | <xsl:stylesheet |
---|
| 21 | id="id" version="1.0" |
---|
| 22 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
| 23 | |
---|
| 24 | <xsl:output |
---|
| 25 | method="xml" |
---|
| 26 | indent="yes" |
---|
| 27 | encoding="ISO-8859-1" |
---|
| 28 | omit-xml-declaration="no" |
---|
| 29 | doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" |
---|
| 30 | doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/> |
---|
| 31 | |
---|
| 32 | <xsl:template name="table_authors"> |
---|
| 33 | <xsl:param name="linktype"/> |
---|
| 34 | <!-- |
---|
| 35 | creation of an informatable of 10 author_ids |
---|
| 36 | each entry of the table is a link #SURNAME_f |
---|
| 37 | --> |
---|
| 38 | |
---|
| 39 | <xsl:element name="informaltable"> |
---|
| 40 | <xsl:attribute name="id">author_ids</xsl:attribute> |
---|
| 41 | <xsl:attribute name="summary">author_ids of publications</xsl:attribute> |
---|
| 42 | <xsl:attribute name="width">80%</xsl:attribute> |
---|
| 43 | <xsl:element name="tgroup"> |
---|
| 44 | <xsl:variable name="nb_cols" select="8"/> |
---|
| 45 | <xsl:attribute name="cols"><xsl:value-of select="$nb_cols"/></xsl:attribute> |
---|
| 46 | <xsl:attribute name="align">center</xsl:attribute> |
---|
| 47 | <xsl:attribute name="colsep">1</xsl:attribute> |
---|
| 48 | <xsl:attribute name="rowsep">1</xsl:attribute> |
---|
| 49 | <xsl:element name="tbody"> |
---|
| 50 | <xsl:for-each select="///author[not( self::node() = following::author )]"> |
---|
| 51 | <xsl:sort order="ascending" data-type="text" select="."/> |
---|
| 52 | <xsl:if test="position() = 1 or position() mod $nb_cols = 1"> |
---|
| 53 | <xsl:text>
</xsl:text> |
---|
| 54 | <xsl:comment> début de row <xsl:value-of select="position()"/></xsl:comment> |
---|
| 55 | <xsl:text disable-output-escaping="yes"> |
---|
| 56 | <![CDATA[ |
---|
| 57 | <row> |
---|
| 58 | ]]> |
---|
| 59 | </xsl:text> |
---|
| 60 | </xsl:if> |
---|
| 61 | <xsl:text>
</xsl:text> |
---|
| 62 | <xsl:element name="entry"> |
---|
| 63 | <xsl:variable name="author_id"> |
---|
| 64 | <xsl:call-template name="surname_id"> |
---|
| 65 | <xsl:with-param name="surname" select="personname/surname"/> |
---|
| 66 | </xsl:call-template> |
---|
| 67 | <xsl:text>_</xsl:text> |
---|
| 68 | <xsl:call-template name="firstname_id"> |
---|
| 69 | <xsl:with-param name="firstname" select="personname/firstname"/> |
---|
| 70 | </xsl:call-template> |
---|
| 71 | </xsl:variable> |
---|
| 72 | <xsl:text>
</xsl:text> |
---|
| 73 | <xsl:element name="ulink"> |
---|
| 74 | <xsl:choose> |
---|
| 75 | <xsl:when test="$linktype='internal'"> |
---|
| 76 | <xsl:attribute name="url"><xsl:text>#</xsl:text><xsl:value-of select="$author_id"/></xsl:attribute> |
---|
| 77 | </xsl:when> |
---|
| 78 | <xsl:when test="$linktype='external'"> |
---|
| 79 | <xsl:attribute name="url"><xsl:value-of select="concat($author_id,$html.ext)"/></xsl:attribute> |
---|
| 80 | </xsl:when> |
---|
| 81 | <xsl:otherwise> |
---|
| 82 | <xsl:message terminate="yes"> |
---|
| 83 | eee : unknown linktype = <xsl:value-of select="$linktype"/> |
---|
| 84 | </xsl:message> |
---|
| 85 | </xsl:otherwise> |
---|
| 86 | </xsl:choose> |
---|
| 87 | <xsl:value-of select="normalize-space(.)"/> |
---|
| 88 | </xsl:element> |
---|
| 89 | </xsl:element> |
---|
| 90 | <xsl:if test="position() mod $nb_cols = 0 or position()=last()"> |
---|
| 91 | <xsl:text>
</xsl:text> |
---|
| 92 | <xsl:comment> fin de row <xsl:value-of select="position()"/></xsl:comment> |
---|
| 93 | <xsl:text disable-output-escaping="yes"> |
---|
| 94 | <![CDATA[ |
---|
| 95 | </row> |
---|
| 96 | ]]> |
---|
| 97 | </xsl:text> |
---|
| 98 | </xsl:if> |
---|
| 99 | </xsl:for-each> |
---|
| 100 | </xsl:element> |
---|
| 101 | </xsl:element> |
---|
| 102 | </xsl:element> |
---|
| 103 | </xsl:template> |
---|
| 104 | </xsl:stylesheet> |
---|