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