source: trunk/select_id.xsl @ 51

Last change on this file since 51 was 49, checked in by pinsard, 16 years ago

improvements of .xsl files headers

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