source: trunk/template_db.xsl @ 110

Last change on this file since 110 was 108, checked in by pinsard, 14 years ago

usage of option directive

  • Property svn:keywords set to Id
File size: 3.6 KB
RevLine 
[2]1<?xml version="1.0" encoding="iso-8859-1"?>
[55]2<xsl:stylesheet
3version="1.0"
4xmlns:html="http://www.w3.org/1999/xhtml"
[58]5xmlns:d="http://docbook.org/ns/docbook"
[55]6xmlns:xl="http://www.w3.org/1999/xlink"
7xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
[2]8
[76]9<!--rst
[80]10
[108]11.. _template_db.xsl:
12
[95]13===============
14template_db.xsl
15===============
[76]16
[49]17création du prototype de formulaire utilisateur
[2]18
[76]19EVOLUTIONS
20==========
21
[31]22$Id$
[76]23
24- fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin)
25
26  * project name from main.xml file instead of a fixed one
27
28- fplod 2008-04-30T13:30:47Z aedon.locean-ipsl.upmc.fr (Darwin)
29
30  * language inherited from biblio.xml
31
32- fplod 2008-04-29T10:28:37Z aedon.locean-ipsl.upmc.fr (Darwin)
33
34  * chgt for dbk5
35
36- fplod 2007-04-26T09:31:32Z aedon.locean-ipsl.upmc.fr (Darwin)
37
38  * creation
[80]39
[2]40-->
41
42<xsl:output
43 method="xml"
44 indent="yes"
45 encoding="ISO-8859-1"
[55]46 omit-xml-declaration="no"/>
[2]47
48<xsl:include href="form_db.xsl"/>
49
[31]50<xsl:template match="users">
[2]51
[31]52 <xsl:apply-templates select="user[child::userid='template']"/>
[2]53</xsl:template>
54
[31]55<xsl:template match="user[child::userid='template']">
[76]56<xsl:variable name="project">
57 <xsl:value-of select="document('main.xml')//d:keyword[@xml:id='project']"/>
58</xsl:variable>
59
[55]60<xsl:element name="article">
61<xsl:attribute name="version">5.0</xsl:attribute>
62<xsl:attribute name="xmlns">http://docbook.org/ns/docbook</xsl:attribute>
[64]63<xsl:attribute name="xml:lang"><xsl:value-of select="/d:bibliography/@xml:lang"/></xsl:attribute>
[55]64<xsl:attribute name="xml:id">template_form</xsl:attribute>
65
[76]66 <title><xsl:value-of select="$project"/> - Template</title>
[55]67<info>
[2]68<authorgroup>
69<author><personname><firstname>Sébastien</firstname> <surname>Masson</surname></personname></author>
70<author><personname><firstname>Françoise</firstname> <surname>Pinsard</surname></personname></author>
71<!--++-->
72</authorgroup>
73<keywordset>
[76]74<keyword><xsl:value-of select="$project"/></keyword>
[2]75</keywordset>
76<!-- ++ date -->
[55]77</info>
[58]78 <xsl:text>&#xA;</xsl:text>
[2]79
[76]80 <xsl:comment>
[31]81  template form from template userid in user.xml.
[58]82<xsl:call-template name="para_lastupdate_user">
83 <xsl:with-param name="language" select="document('biblio.xml')/d:bibliography/@xml:lang"/>
84
85 <xsl:with-param name="date" select="ancestor::users/child::date"/>
86</xsl:call-template>
[2]87 </xsl:comment>
[58]88
[2]89 <xsl:text>&#xA;</xsl:text>
90 <xsl:element name="sect1">
[55]91  <xsl:attribute name="xml:id">intro</xsl:attribute>
[2]92  <title>Context</title>
93  <xsl:element name="para">
[76]94   The mail sent by filling this form will be used to update
95<link xl:href="main.php"><xsl:value-of select="$project"/>-Publications-Papers</link>
96and <link xl:href="user.html"><xsl:value-of select="$project"/> Users</link>.
[2]97  </xsl:element>
98 </xsl:element>
99 <xsl:text>&#xA;</xsl:text>
100 <xsl:element name="sect1">
[55]101  <xsl:attribute name="xml:id"><xsl:value-of select="userid"/></xsl:attribute>
[2]102  <xsl:text>&#xA;</xsl:text>
103  <xsl:choose>
104   <xsl:when test="userid != 'template'">
105    <xsl:element name="title">
106     <xsl:value-of select="personname/firstname"/> <xsl:text> </xsl:text> <xsl:value-of select="personname/surname"/>
107    </xsl:element>
108   </xsl:when>
109   <xsl:otherwise>
110    <xsl:element name="title">Template</xsl:element>
111   </xsl:otherwise>
112  </xsl:choose>
113  <xsl:text>&#xA;</xsl:text>
114  <xsl:element name="para">
115   <xsl:value-of select="email"/>
116  </xsl:element>
117  <xsl:text>&#xA;</xsl:text>
118  <xsl:call-template name="form_db">
119   <xsl:with-param name="author_id" select="userid"/>
[31]120   <xsl:with-param name="user" select="."/>
[2]121   <xsl:with-param name="visu_modif" select="'modif'"/>
122   <xsl:with-param name="bibmode" select="'no'"/>
123  </xsl:call-template>
124 <xsl:text>&#xA;</xsl:text>
125 </xsl:element>
[55]126</xsl:element>
[2]127</xsl:template>
128
129</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.