Last change
on this file since 164 was
62,
checked in by pinsard, 16 years ago
|
replace single quote by underscore in author id to avoid warning in docbook 5 validation
|
-
Property svn:keywords set to
Id
|
File size:
1.2 KB
|
Line | |
---|
1 | <?xml version="1.0" encoding="iso-8859-1"?> |
---|
2 | <xsl:stylesheet |
---|
3 | version="1.0" |
---|
4 | xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
5 | |
---|
6 | <!-- |
---|
7 | module : |
---|
8 | génération de la partie "nom" de l'id |
---|
9 | |
---|
10 | update : |
---|
11 | $Id$ |
---|
12 | fplod 2008-05-05T12:13:12Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
13 | simplification and replace single quote by underscore |
---|
14 | fplod 2007-05-18T13:03:39Z aedon.locean-ipsl.upmc.fr (Darwin) |
---|
15 | creation |
---|
16 | cf http://www.dpawson.co.uk/xsl/sect2/N7998.html |
---|
17 | There's a trick to this: |
---|
18 | |
---|
19 | translate($x, translate($x, 'abcde', ''), '') |
---|
20 | |
---|
21 | will remove all characters except a,b,c,d, and e from your string $x. |
---|
22 | et String split into elements dans http://www.dpawson.co.uk/xsl/sect2/N7240.html |
---|
23 | http://www.dpawson.co.uk/xsl/sect2/N7240.html |
---|
24 | cf. http://www.dpawson.co.uk/xsl/sect2/N7240.html CRLF to BR |
---|
25 | --> |
---|
26 | |
---|
27 | <xsl:template name="surname_id"> |
---|
28 | <xsl:param name="surname"/> |
---|
29 | <xsl:variable name="surname1"> |
---|
30 | <xsl:variable name="single-quote">'</xsl:variable> |
---|
31 | <xsl:variable name="underscore">_</xsl:variable> |
---|
32 | <xsl:value-of select="translate($surname,$single-quote,$underscore)"/> |
---|
33 | </xsl:variable> |
---|
34 | <xsl:value-of select="translate($surname1, 'abcdefghijklmnopqrstuvwxyz éèçàùëöñó', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_EECAUEONO')"/> |
---|
35 | |
---|
36 | </xsl:template> |
---|
37 | </xsl:stylesheet> |
---|
Note: See
TracBrowser
for help on using the repository browser.