1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
2 | |
---|
3 | <!-- |
---|
4 | module : |
---|
5 | creation of a table with every author with an associated external or internal link |
---|
6 | |
---|
7 | update : |
---|
8 | $Id$ |
---|
9 | fplod 2007-10-17T07:48:19Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
10 | improve sort (diacriticals) |
---|
11 | fplod 2007-05-18T14:40:38Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
12 | modif gestion des id |
---|
13 | fplod 2007-05-16T15:01:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
14 | correction pour homonymes partiels |
---|
15 | fplod 2007-04-18T13:32:33Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
16 | creation |
---|
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 | <!-- |
---|
34 | creation of an informatable of 10 author_ids |
---|
35 | each 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>
</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>
</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>
</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"> |
---|
82 | eee : 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>
</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> |
---|