[2] | 1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
[76] | 2 | <xsl:stylesheet |
---|
| 3 | version="1.0" |
---|
[56] | 4 | xmlns:d="http://docbook.org/ns/docbook" |
---|
[55] | 5 | xmlns:html="http://www.w3.org/1999/xhtml" |
---|
| 6 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
[2] | 7 | |
---|
[76] | 8 | <!--rst |
---|
[80] | 9 | |
---|
[108] | 10 | .. _form_db.xsl: |
---|
| 11 | |
---|
[95] | 12 | =========== |
---|
| 13 | form_db.xsl |
---|
| 14 | =========== |
---|
[76] | 15 | |
---|
[2] | 16 | creation du formulaire |
---|
| 17 | |
---|
[76] | 18 | EVOLUTIONS |
---|
| 19 | ========== |
---|
| 20 | |
---|
[33] | 21 | $Id$ |
---|
[76] | 22 | |
---|
| 23 | - fplod 2008-09-17T09:49:51Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 24 | |
---|
| 25 | * project name from main.xml file instead of a fixed one |
---|
| 26 | |
---|
| 27 | - fplod 2008-04-29T08:57:43Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 28 | |
---|
| 29 | * chgt for dbk5 |
---|
| 30 | |
---|
| 31 | - fplod 2007-10-17T08:07:50Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 32 | |
---|
| 33 | * improve sort (diacriticals) |
---|
| 34 | |
---|
| 35 | - fplod 2007-05-18T14:56:32Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 36 | |
---|
| 37 | * modif gestion de id |
---|
| 38 | |
---|
| 39 | - fplod 2007-05-15T07:41:16Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 40 | |
---|
| 41 | * factorisation de biblioentry |
---|
| 42 | |
---|
| 43 | - fplod 2007-04-27T10:53:20Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 44 | |
---|
| 45 | * inclusion de php d'après http://www.cygwin.com/ml/docbook-apps/2005-q1/msg00484.html |
---|
| 46 | |
---|
| 47 | - fplod 2007-04-26T12:08:09Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
| 48 | |
---|
| 49 | * creation |
---|
[80] | 50 | |
---|
[2] | 51 | --> |
---|
| 52 | |
---|
| 53 | <xsl:include href="personal_db.xsl"/> |
---|
| 54 | <xsl:include href="compilers_db.xsl"/> |
---|
| 55 | <xsl:include href="platforms_db.xsl"/> |
---|
| 56 | <xsl:include href="components_db.xsl"/> |
---|
| 57 | <xsl:include href="comments_db.xsl"/> |
---|
| 58 | <xsl:include href="newreferences_db.xsl"/> |
---|
| 59 | <xsl:include href="processors_db.xsl"/> |
---|
| 60 | <xsl:include href="biblioentry_xml.xsl"/> |
---|
| 61 | |
---|
| 62 | <xsl:template name="form_db"> |
---|
| 63 | <!-- ++ template ou existant visu ou modif --> |
---|
[31] | 64 | <xsl:param name="user"/> |
---|
[2] | 65 | <xsl:param name="author_id"/> |
---|
| 66 | <xsl:param name="visu_modif"/> |
---|
| 67 | <xsl:param name="bibmode"/> |
---|
| 68 | |
---|
| 69 | <xsl:text>
</xsl:text> |
---|
[55] | 70 | <xsl:element name="html:form"> |
---|
[2] | 71 | <xsl:choose> |
---|
| 72 | <xsl:when test="$visu_modif= 'modif'"> |
---|
| 73 | <xsl:attribute name="action"> |
---|
[76] | 74 | <xsl:value-of select="$link.mailto.url"/><xsl:text>?subject=[</xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/><xsl:text>]</xsl:text> |
---|
[2] | 75 | <!-- value is completed in form_html.xsl because of php sequence ++ --> |
---|
| 76 | </xsl:attribute> |
---|
| 77 | <xsl:attribute name="method">post</xsl:attribute> |
---|
| 78 | <xsl:attribute name="enctype">text/plain</xsl:attribute> |
---|
| 79 | <xsl:text>
</xsl:text> |
---|
[55] | 80 | <xsl:element name="html:input"> |
---|
[2] | 81 | <xsl:attribute name="name">message</xsl:attribute> |
---|
| 82 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
[76] | 83 | <xsl:attribute name="value"><xsl:text>Thank you for your contribution to </xsl:text><xsl:value-of select="document('main.xml')/d:article/d:title"/></xsl:attribute> |
---|
[2] | 84 | </xsl:element> |
---|
| 85 | <xsl:text>
</xsl:text> |
---|
[55] | 86 | <xsl:element name="html:input"> |
---|
[2] | 87 | <xsl:attribute name="name">server</xsl:attribute> |
---|
| 88 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
| 89 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
| 90 | </xsl:element> |
---|
| 91 | <xsl:text>
</xsl:text> |
---|
[55] | 92 | <xsl:element name="html:input"> |
---|
[2] | 93 | <xsl:attribute name="name">phpversion</xsl:attribute> |
---|
| 94 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
| 95 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
| 96 | </xsl:element> |
---|
| 97 | <xsl:text>
</xsl:text> |
---|
[55] | 98 | <xsl:element name="html:input"> |
---|
[2] | 99 | <xsl:attribute name="name">timestamp</xsl:attribute> |
---|
| 100 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
| 101 | <!-- value is set in form_html.xsl because of php sequence ++ --> |
---|
| 102 | </xsl:element> |
---|
| 103 | </xsl:when> |
---|
| 104 | </xsl:choose> |
---|
| 105 | <xsl:text>
</xsl:text> |
---|
[55] | 106 | <xsl:element name="html:input"> |
---|
[2] | 107 | <xsl:attribute name="name">author_id</xsl:attribute> |
---|
| 108 | <xsl:attribute name="type">hidden</xsl:attribute> |
---|
| 109 | <xsl:attribute name="value"><xsl:value-of select="$author_id"/></xsl:attribute> |
---|
| 110 | </xsl:element> |
---|
| 111 | |
---|
| 112 | <xsl:call-template name="personal"> |
---|
[31] | 113 | <xsl:with-param name="user" select="$user"/> |
---|
[55] | 114 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 115 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 116 | </xsl:call-template> |
---|
| 117 | <xsl:call-template name="components"> |
---|
[31] | 118 | <xsl:with-param name="user" select="$user"/> |
---|
[55] | 119 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 120 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 121 | </xsl:call-template> |
---|
| 122 | <xsl:call-template name="platforms"> |
---|
[31] | 123 | <xsl:with-param name="user" select="$user"/> |
---|
[55] | 124 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 125 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 126 | </xsl:call-template> |
---|
| 127 | <xsl:call-template name="processors"> |
---|
[31] | 128 | <xsl:with-param name="user" select="$user"/> |
---|
[55] | 129 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 130 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 131 | </xsl:call-template> |
---|
| 132 | <xsl:call-template name="compilers"> |
---|
[31] | 133 | <xsl:with-param name="user" select="$user"/> |
---|
[55] | 134 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 135 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 136 | </xsl:call-template> |
---|
| 137 | <xsl:choose> |
---|
| 138 | <xsl:when test="$bibmode= 'yes'"> |
---|
| 139 | <xsl:text>
</xsl:text> |
---|
[76] | 140 | <xsl:element name="orderedlist"> |
---|
[2] | 141 | <!-- |
---|
[56] | 142 | <xsl:for-each select="/descendant::d:biblioentry[descendant::d:author=$author_name]"> |
---|
[2] | 143 | --> |
---|
[56] | 144 | <xsl:for-each select="//d:biblioentry"> |
---|
| 145 | <xsl:sort order="descending" data-type="number" select="./d:biblioset/d:pubdate"/> |
---|
[2] | 146 | |
---|
[56] | 147 | <xsl:for-each select="descendant::d:author"> |
---|
| 148 | <xsl:sort order="ascending" data-type="text" select="translate(./d:personname,'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/> |
---|
[2] | 149 | <xsl:variable name="author_id2"> |
---|
| 150 | <xsl:call-template name="surname_id"> |
---|
[56] | 151 | <xsl:with-param name="surname" select="d:personname/d:surname"/> |
---|
[2] | 152 | </xsl:call-template> |
---|
| 153 | <xsl:text>_</xsl:text> |
---|
| 154 | <xsl:call-template name="firstname_id"> |
---|
[56] | 155 | <xsl:with-param name="firstname" select="d:personname/d:firstname"/> |
---|
[2] | 156 | </xsl:call-template> |
---|
| 157 | </xsl:variable> |
---|
| 158 | <!-- |
---|
| 159 | <xsl:message terminate="no"> |
---|
| 160 | ref #<xsl:value-of select="position()"/> |
---|
| 161 | _id appel <xsl:value-of select="$author_id"/> |
---|
| 162 | _id fabrique <xsl:value-of select="$author_id2"/> |
---|
| 163 | egal ? <xsl:value-of select="$author_id2 = $author_id"/> |
---|
| 164 | </xsl:message> |
---|
| 165 | --> |
---|
| 166 | <xsl:if test="$author_id2 = $author_id"> |
---|
[76] | 167 | <xsl:call-template name="one_biblioentry"> |
---|
[2] | 168 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
[56] | 169 | <xsl:with-param name="my_biblioentry" select="ancestor::d:biblioentry"/> |
---|
| 170 | <!-- ++ <xsl:with-param name="id" select="@xml:id"/> --> |
---|
[2] | 171 | </xsl:call-template> |
---|
| 172 | |
---|
| 173 | </xsl:if> |
---|
| 174 | </xsl:for-each> |
---|
| 175 | </xsl:for-each> |
---|
| 176 | </xsl:element> |
---|
| 177 | </xsl:when> |
---|
| 178 | </xsl:choose> |
---|
| 179 | <xsl:call-template name="comments"> |
---|
[55] | 180 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 181 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 182 | </xsl:call-template> |
---|
| 183 | <xsl:call-template name="newreferences"> |
---|
[55] | 184 | <xsl:with-param name="author_id" select="$author_id"/> |
---|
[2] | 185 | <xsl:with-param name="visu_modif" select="'modif'"/> |
---|
| 186 | </xsl:call-template> |
---|
| 187 | |
---|
| 188 | <xsl:choose> |
---|
| 189 | <xsl:when test="$visu_modif= 'modif'"> |
---|
| 190 | <xsl:text>
</xsl:text> |
---|
[55] | 191 | <xsl:element name="html:input"> |
---|
[2] | 192 | <xsl:attribute name="type">submit</xsl:attribute> |
---|
[76] | 193 | <xsl:attribute name="value">Mail</xsl:attribute> |
---|
[2] | 194 | </xsl:element> |
---|
| 195 | <xsl:text>
</xsl:text> |
---|
[76] | 196 | <xsl:element name="html:input"> |
---|
[2] | 197 | <xsl:attribute name="type">reset</xsl:attribute> |
---|
[76] | 198 | <xsl:attribute name="value">reset</xsl:attribute> |
---|
[2] | 199 | </xsl:element> |
---|
| 200 | </xsl:when> |
---|
| 201 | </xsl:choose> |
---|
| 202 | </xsl:element> |
---|
| 203 | </xsl:template> |
---|
| 204 | |
---|
| 205 | </xsl:stylesheet> |
---|