source: trunk/table_authors.xsl @ 44

Last change on this file since 44 was 33, checked in by pinsard, 17 years ago

add Id in many headers; replace bibrefnemo.xml by biblio.xml

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