source: trunk/select_id.xsl

Last change on this file was 323, checked in by pinsard, 11 years ago

fix for XSL documentations

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