1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
2 | |
---|
3 | <!-- |
---|
4 | module : |
---|
5 | creation d'un ensemble select avec tous les identifiants d'auteur |
---|
6 | |
---|
7 | update : |
---|
8 | ++ xforms |
---|
9 | <OPTGROUP label="PortMaster 3"> A B C cf http://www.la-grange.net/w3c/html4.01/interact/forms.html#edef-OPTION |
---|
10 | $Id$ |
---|
11 | fplod 2007-10-17T08:09:03Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
12 | improve sort (diacriticals) |
---|
13 | fplod 2007-05-18T14:52:55Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
14 | modif gestion id |
---|
15 | fplod 2007-05-18T08:03:40Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
16 | correction pour homnymes partiels |
---|
17 | fplod 2007-04-20T12:49:26Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
18 | d'après http://enacit1.epfl.ch/exercices_html/ex_boutons.html |
---|
19 | Navigation par menu déroulant |
---|
20 | fplod 2007-04-18T09:23:37Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
21 | creation |
---|
22 | --> |
---|
23 | |
---|
24 | <xsl:stylesheet |
---|
25 | id="id" version="1.0" |
---|
26 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
27 | |
---|
28 | <xsl:include href="firstname_id.xsl"/> |
---|
29 | <xsl:include href="surname_id.xsl"/> |
---|
30 | |
---|
31 | <xsl:output |
---|
32 | method="xml" |
---|
33 | indent="yes" |
---|
34 | encoding="ISO-8859-1" |
---|
35 | omit-xml-declaration="no" |
---|
36 | doctype-public="-//OASIS//DTD DocBook XML V4.5//EN" |
---|
37 | doctype-system="http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"/> |
---|
38 | |
---|
39 | <xsl:variable name="list_author_ids" select="///author[not( self::node() = following::author )]"/> |
---|
40 | <xsl:template name="author_ids"> |
---|
41 | <xsl:element name="select"> |
---|
42 | <!--d'après http://enacit1.epfl.ch/exercices_html/ex_boutons.html |
---|
43 | Navigation par menu déroulant |
---|
44 | --> |
---|
45 | <xsl:attribute name="onChange">document.location=this.options[this.selectedIndex].value</xsl:attribute> |
---|
46 | <xsl:attribute name="size">1</xsl:attribute> |
---|
47 | <!-- one empty --> |
---|
48 | <xsl:element name="option"> |
---|
49 | <xsl:attribute name="value">#</xsl:attribute> |
---|
50 | <xsl:attribute name="SELECTED"/> |
---|
51 | Choose one of these known authors id |
---|
52 | </xsl:element> |
---|
53 | <xsl:for-each select="///author[not( self::node() = following::author )]"> |
---|
54 | <xsl:sort order="ascending" data-type="text" select="translate(.,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/> |
---|
55 | <xsl:element name="option"> |
---|
56 | <xsl:variable name="author_id"> |
---|
57 | <xsl:call-template name="surname_id"> |
---|
58 | <xsl:with-param name="surname" select="personname/surname"/> |
---|
59 | </xsl:call-template> |
---|
60 | <xsl:text>_</xsl:text> |
---|
61 | <xsl:call-template name="firstname_id"> |
---|
62 | <xsl:with-param name="firstname" select="personname/firstname"/> |
---|
63 | </xsl:call-template> |
---|
64 | </xsl:variable> |
---|
65 | <xsl:variable name="path">../many/superbib02/</xsl:variable> |
---|
66 | <xsl:variable name="ext">php</xsl:variable> |
---|
67 | <xsl:variable name="url"><xsl:value-of select="$path"/><xsl:value-of select="$author_id"/>.<xsl:value-of select="$ext"/></xsl:variable> |
---|
68 | <xsl:attribute name="value"><xsl:value-of select="$url"/></xsl:attribute> |
---|
69 | <xsl:value-of select="$author_id"/> |
---|
70 | </xsl:element> |
---|
71 | </xsl:for-each> |
---|
72 | </xsl:element> |
---|
73 | </xsl:template> |
---|
74 | |
---|
75 | <xsl:template match="bibliography"> |
---|
76 | <xsl:call-template name="author_ids"/> |
---|
77 | </xsl:template> |
---|
78 | |
---|
79 | </xsl:stylesheet> |
---|