source: trunk/select_id.xsl @ 32

Last change on this file since 32 was 29, checked in by pinsard, 17 years ago

parametrisation of number of chunked outputs. side effect = bibnemomaf03 is replaced by bibnemomaf01 and bibnemomaf04 is replaced by bibnemomaf02

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