~statik/ubuntu/maverick/erlang/erlang-merge-testing

« back to all changes in this revision

Viewing changes to lib/erl_docgen/priv/xsl/db_man.xsl

  • Committer: Elliot Murphy
  • Date: 2010-06-08 03:55:44 UTC
  • mfrom: (3.5.6 squeeze)
  • Revision ID: elliot@elliotmurphy.com-20100608035544-dd8zh2swk7jr5rz2
* Merge with Debian unstable; remaining Ubuntu changes:
  - Drop libwxgtk2.8-dev build dependency. Wx isn't in main, and not
    supposed to. (LP #438365)
  - Drop erlang-wx binary.
  - Drop erlang-wx dependency from -megaco, -common-test, and -reltool, they
    do not really need wx. Also drop it from -debugger; the GUI needs wx,
    but it apparently has CLI bits as well, and is also needed by -megaco,
    so let's keep the package for now.
* Added missing symlinks to /usr/include for a few new header files.
* Fixed generation of ${erlang-base:Depends} and ${erlang-x11:Depends}
  substitution variables.
* Added a fix for a re:compile/2 crash on a long regular expression.
* Changed urgency to medium as the change fixes a security bug.
* Manpages in section 1 are needed even if only arch-dependent packages are
  built. So, re-enabled them.
* Fixed HiPE architecture recognition for powerpc Debian architecture.
* Moved xsltproc and fop to build-depends-indep and do not build
  documentation if only architecture-specific packages are built.
* Refreshed all patches.
* Made Emacs look in man5 and man7 for Erlang manpages and added code
  skeleton files to erlang-mode package.
* New upstream release.
* Moved manpages from incorrect sections 4 and 6 to correct 5 and 7
  (closes: #498492).
* Made manpages regexp in Emacs mode match only 3erl pages in section 3.
* Removed docb_gen script which is no longer needed to build manpages.
* Added erlang-doc package which contains documentation in HTML and PDF
  formats. This package replaces erlang-doc-html package and it's easier
  to synchronize it with the main Erlang packages as it's built from
  a single source package (closes: #558451).
* Removed RPATH from ssl and crypto application binaries as required by
  Debian policy.
* Added libwxgtk2.4-dev and libwxgtk2.6-dev to build conflicts.
* Added a few dpendencies for erlang-dialyzer, erlang-et, erlang-observer
  and erlang-examples packages which now call functions from more modules
  than in 1:13.b.3.
* Added a workaround which disables vfork() for hppa architecture
  (closes: #562218).
* Strictened check for JDK 1.5 adding a call to String(int[], int, int)
  because GCJ 4.4 doesn't implement it and OpenJDK isn't available for all
  architectures.
* Fixed erlang-manpages package section.
* Made erlang-depends add only substvars which are requested in
  debian/control file. This minimizes number of warnings from dh_gencontrol.
  Also, improved descriptions of the functions in erlang-depends escript.
* Added erlang-erl-docgen package to erlang-nox dependencies.
* Made dummy packages erlang-nox and erlang-x11 architecture all.
* Cleaned up working with custom substitution variables in debian/rules.
* Reorganized debian/rules to ensure that manpages arent built twice, and
  aren't built at all if only architecture-dependent packages are requested.
* Fixed project links in README.Debian.
* Added a new package erlang-jinterface which provides tools for
  communication of Java programs with Erlang processes. This adds build
  depandency on default-jdk and as a result enables Java module for IDL
  compiler.
* Bumped standards version to 3.8.4.

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!--      
3
3
     #
4
4
     # %CopyrightBegin%
5
 
     # 
6
 
     # Copyright Ericsson AB 2009. All Rights Reserved.
7
 
     # 
 
5
     #
 
6
     # Copyright Ericsson AB 2009-2010. All Rights Reserved.
 
7
     #
8
8
     # The contents of this file are subject to the Erlang Public License,
9
9
     # Version 1.1, (the "License"); you may not use this file except in
10
10
     # compliance with the License. You should have received a copy of the
11
11
     # Erlang Public License along with this software. If not, it can be
12
12
     # retrieved online at http://www.erlang.org/.
13
 
     # 
 
13
     #
14
14
     # Software distributed under the License is distributed on an "AS IS"
15
15
     # basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
16
16
     # the License for the specific language governing rights and limitations
17
17
     # under the License.
18
 
     # 
 
18
     #
19
19
     # %CopyrightEnd%
20
20
     
21
21
     -->
37
37
  
38
38
  <!-- *ref/Section -->
39
39
  <xsl:template match="erlref/section|comref/section|cref/section|fileref/section|appref/section">
40
 
    <xsl:text>&#10;.RE&#10;</xsl:text>
41
40
    <xsl:text>&#10;.SH "</xsl:text><xsl:value-of select="translate(title, 'abcdefghijklmnopqrstuvwxyz','ABCDEFGHIJKLMNOPQRSTUVWXYZ')"/><xsl:text>"&#10;</xsl:text>
42
41
    <xsl:apply-templates/>
43
42
  </xsl:template>
44
43
 
45
44
  <!-- *ref/Subsection -->
46
 
  <xsl:template match="erlref/section/section|comref/section/section|cref/section/section|fileref/section/section|appref/section/section">
47
 
    <xsl:text>&#10;.RE&#10;</xsl:text>
 
45
  <xsl:template match="section/section">
48
46
    <xsl:text>&#10;.SS "</xsl:text><xsl:value-of select="title"/><xsl:text>"&#10;</xsl:text>
49
47
    <xsl:apply-templates/>
50
48
  </xsl:template>
53
51
  <!-- Lists -->
54
52
  
55
53
  <xsl:template match="list">
56
 
    <xsl:text>&#10;.RS 2&#10;</xsl:text>
 
54
    <xsl:text>&#10;.RS 2</xsl:text>
57
55
    <xsl:apply-templates/>
58
 
    <xsl:text>&#10;.RE&#10;</xsl:text>
 
56
    <xsl:text>&#10;.RE</xsl:text>
59
57
  </xsl:template>
60
58
 
61
59
  <xsl:template match="list/item">
62
60
    <xsl:text>&#10;.TP 2&#10;</xsl:text>
63
61
    <xsl:text>*&#10;</xsl:text>
64
 
    <xsl:variable name="content">
65
 
      <xsl:apply-templates/>
66
 
    </xsl:variable>
67
 
    <xsl:value-of select="normalize-space($content)"/>
68
 
    <xsl:text>&#10;.br&#10;</xsl:text>
69
 
    <xsl:text>&#10;.br&#10;</xsl:text>    
 
62
    <xsl:apply-templates/>
 
63
    <xsl:text>&#10;.LP&#10;</xsl:text>
70
64
  </xsl:template>
71
65
 
72
66
  <xsl:template match="taglist">
73
 
    <xsl:text>&#10;.RS 2&#10;</xsl:text>
74
 
    <xsl:apply-templates/>
75
 
    <xsl:text>&#10;.RE&#10;</xsl:text>
 
67
    <xsl:text>&#10;.RS 2</xsl:text>
 
68
    <xsl:apply-templates select="tag|item"/>
 
69
    <xsl:text>&#10;.RE</xsl:text>
76
70
  </xsl:template>
77
71
  
78
72
  <xsl:template match="taglist/tag">
79
 
    <xsl:text>&#10;.TP 4&#10;</xsl:text>
 
73
    <xsl:text>&#10;.TP 2&#10;</xsl:text>
80
74
    <xsl:text>.B&#10;</xsl:text>
81
 
    <xsl:apply-templates/>
 
75
    <xsl:apply-templates/><xsl:text>:&#10;</xsl:text>
 
76
  </xsl:template>
 
77
 
 
78
  <xsl:template match="taglist/item">
 
79
    <xsl:apply-templates/>        
82
80
  </xsl:template>
83
81
 
84
82
  <xsl:template match="item/p">
85
83
    <xsl:variable name="content">
86
84
      <xsl:apply-templates/>
87
85
    </xsl:variable>
88
 
    <xsl:value-of select="normalize-space($content)"/>
89
 
    <xsl:text>&#10;.br&#10;</xsl:text>
90
 
    <xsl:text>&#10;.br&#10;</xsl:text>
91
 
  </xsl:template>
92
 
 
93
 
 
94
 
  <xsl:template match="taglist/item">
95
 
    <xsl:text>&#10;</xsl:text>
96
 
    <xsl:apply-templates/>
 
86
    <xsl:choose>
 
87
      <xsl:when test="position() = 1">
 
88
        <xsl:value-of select="$content"/>
 
89
      </xsl:when>
 
90
      <xsl:otherwise>
 
91
        <xsl:text>&#10;.RS 2</xsl:text>     
 
92
        <xsl:text>&#10;.LP&#10;&#10;.LP&#10;</xsl:text>     
 
93
        <xsl:value-of select="$content"/>
 
94
        <xsl:text>&#10;.RE</xsl:text>     
 
95
      </xsl:otherwise>
 
96
    </xsl:choose>
97
97
  </xsl:template>
98
98
 
99
99
  <!-- Note -->
100
100
  <xsl:template match="note">
101
 
    <xsl:text>&#10;.TP 4&#10;.B&#10;Note:&#10;</xsl:text>
 
101
    <xsl:text>&#10;.SS Note:</xsl:text>
102
102
    <xsl:apply-templates/>
 
103
    <xsl:text>&#10;</xsl:text>
103
104
  </xsl:template>
104
105
 
105
106
  <!-- Warning -->
106
107
  <xsl:template match="warning">
107
 
    <xsl:text>&#10;.TP 4&#10;.B&#10;Warning:&#10;</xsl:text>
 
108
    <xsl:text>&#10;.SS Warning:</xsl:text>
108
109
    <xsl:apply-templates/>
109
 
  </xsl:template>
110
 
 
111
 
  <xsl:template match="warning/p|note/p">
112
 
    <xsl:variable name="content">
113
 
      <xsl:apply-templates/>
114
 
    </xsl:variable>
115
 
    <xsl:value-of select="normalize-space($content)"/>
116
 
    <xsl:text>&#10;.LP&#10;</xsl:text>
117
 
  </xsl:template>
118
 
 
 
110
    <xsl:text>&#10;</xsl:text>
 
111
  </xsl:template>
119
112
 
120
113
 <!-- Paragraph -->
121
114
  <xsl:template match="p">
122
115
    <xsl:text>&#10;.LP&#10;</xsl:text>
123
 
    <xsl:variable name="content">
124
 
      <xsl:apply-templates/>
125
 
    </xsl:variable>
126
 
    <xsl:value-of select="normalize-space($content)"/>
 
116
    <xsl:apply-templates/>
127
117
  </xsl:template>
128
118
 
129
119
  <!-- Inline elements -->
130
120
  <xsl:template match="b">
131
 
    <xsl:text> \fB</xsl:text>
 
121
    <xsl:text>\fB</xsl:text>
132
122
    <xsl:apply-templates/>
133
 
    <xsl:text>\fR\&amp;</xsl:text>
 
123
    <xsl:text>\fR\&amp; </xsl:text>
134
124
  </xsl:template>
135
125
 
136
126
  <xsl:template match="br">
138
128
  </xsl:template>
139
129
 
140
130
  <xsl:template match="c">
141
 
    <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
 
131
    <xsl:text>\fI</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
142
132
  </xsl:template>
143
133
 
144
134
  <xsl:template match="em">
145
 
    <xsl:text> \fI</xsl:text><xsl:value-of select="text()"/><xsl:text>\fR\&amp;</xsl:text>
 
135
    <xsl:text>\fI</xsl:text> <xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
146
136
  </xsl:template>
147
137
 
148
138
  <xsl:template match="seealso">
149
 
    <xsl:text> \fB</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
 
139
    <xsl:text>\fB</xsl:text><xsl:apply-templates/><xsl:text>\fR\&amp;</xsl:text>
150
140
  </xsl:template>
151
141
 
152
142
  <!-- Code -->
153
143
  <xsl:template match="code">
 
144
    <xsl:text>&#10;.LP&#10;</xsl:text>
154
145
    <xsl:text>&#10;.nf&#10;</xsl:text>
155
146
    <xsl:apply-templates/>
156
147
    <xsl:text>&#10;.fi&#10;</xsl:text>
158
149
 
159
150
  <!-- Pre -->
160
151
  <xsl:template match="pre">
 
152
    <xsl:text>&#10;.LP&#10;</xsl:text>
161
153
    <xsl:text>&#10;.nf&#10;</xsl:text>
162
154
    <xsl:apply-templates/>
163
155
    <xsl:text>&#10;.fi&#10;</xsl:text>
168
160
  <xsl:template match="table">
169
161
  </xsl:template>
170
162
 
171
 
  <!--xsl:template match="row">
172
 
      <xsl:apply-templates/>
173
 
  </xsl:template>
174
 
 
175
 
  <xsl:template match="cell">
176
 
      <xsl:apply-templates/>
177
 
  </xsl:template -->
178
 
 
179
 
 
180
 
  <!-- Image -->
 
163
 <!-- Image -->
181
164
  <xsl:template match="image">
182
165
  </xsl:template>
183
166
 
191
174
  
192
175
  <!-- Erlref -->
193
176
  <xsl:template match="/erlref">
194
 
      <xsl:text>.TH </xsl:text><xsl:value-of select="module"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Module Definition"&#10;</xsl:text>
195
 
      <xsl:text>.SH MODULE&#10;</xsl:text>
196
 
      <xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text>&#10;</xsl:text>  
197
 
      <xsl:apply-templates/>
 
177
    <xsl:variable name="companyname">
 
178
      <xsl:choose>
 
179
        <!-- Workaround until all of OTP's .../holder contents are correct.  -->
 
180
        <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
 
181
        <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
 
182
      </xsl:choose>
 
183
    </xsl:variable>
 
184
 
 
185
    <xsl:text>.TH </xsl:text><xsl:value-of select="module"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Erlang Module Definition"&#10;</xsl:text>
 
186
    <xsl:text>.SH NAME&#10;</xsl:text>
 
187
    <xsl:value-of select="module"/><xsl:text> \- </xsl:text><xsl:value-of select="modulesummary"/><xsl:text>&#10;</xsl:text>  
 
188
    <xsl:apply-templates/>
198
189
  </xsl:template>
199
190
 
200
191
  <!-- Comref -->
201
192
  <xsl:template match="/comref">
202
 
      <xsl:text>.TH </xsl:text><xsl:value-of select="com"/><xsl:text> 1 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "User Commands"&#10;</xsl:text>
203
 
      <xsl:text>.SH NAME&#10;</xsl:text>
204
 
      <xsl:value-of select="com"/><xsl:text> \- </xsl:text><xsl:value-of select="comsummary"/><xsl:text>&#10;</xsl:text>  
205
 
      <xsl:apply-templates/>
 
193
    <xsl:variable name="companyname">
 
194
      <xsl:choose>
 
195
        <!-- Workaround until all of OTP's .../holder contents are correct.  -->
 
196
        <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
 
197
        <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
 
198
      </xsl:choose>
 
199
    </xsl:variable>
 
200
   <xsl:text>.TH </xsl:text><xsl:value-of select="com"/><xsl:text> 1 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "User Commands"&#10;</xsl:text>
 
201
    <xsl:text>.SH NAME&#10;</xsl:text>
 
202
    <xsl:value-of select="com"/><xsl:text> \- </xsl:text><xsl:value-of select="comsummary"/><xsl:text>&#10;</xsl:text>  
 
203
    <xsl:apply-templates/>
206
204
  </xsl:template>
207
205
 
208
206
  <!-- Cref -->
209
207
  <xsl:template match="/cref">
210
 
      <xsl:text>.TH </xsl:text><xsl:value-of select="lib"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "C Library Functions"&#10;</xsl:text>
211
 
      <xsl:text>.SH NAME&#10;</xsl:text>
212
 
      <xsl:value-of select="lib"/><xsl:text> \- </xsl:text><xsl:value-of select="libsummary"/><xsl:text>&#10;</xsl:text>  
213
 
      <xsl:apply-templates/>
 
208
    <xsl:variable name="companyname">
 
209
      <xsl:choose>
 
210
        <!-- Workaround until all of OTP's .../holder contents are correct.  -->
 
211
        <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
 
212
        <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
 
213
      </xsl:choose>
 
214
    </xsl:variable>
 
215
    <xsl:text>.TH </xsl:text><xsl:value-of select="lib"/><xsl:text> 3 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "C Library Functions"&#10;</xsl:text>
 
216
    <xsl:text>.SH NAME&#10;</xsl:text>
 
217
    <xsl:value-of select="lib"/><xsl:text> \- </xsl:text><xsl:value-of select="libsummary"/><xsl:text>&#10;</xsl:text>  
 
218
    <xsl:apply-templates/>
214
219
  </xsl:template>
215
220
 
216
221
  <!-- Fileref -->
217
222
  <xsl:template match="/fileref">
218
 
      <xsl:text>.TH </xsl:text><xsl:value-of select="file"/><xsl:text> 4 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Files"&#10;</xsl:text>
219
 
      <xsl:text>.SH NAME&#10;</xsl:text>
220
 
      <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>  
221
 
      <xsl:apply-templates/>
 
223
    <xsl:variable name="companyname">
 
224
      <xsl:choose>
 
225
        <!-- Workaround until all of OTP's .../holder contents are correct.  -->
 
226
        <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
 
227
        <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
 
228
      </xsl:choose>
 
229
    </xsl:variable>
 
230
    <xsl:text>.TH </xsl:text><xsl:value-of select="file"/><xsl:text> 5 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Files"&#10;</xsl:text>
 
231
    <xsl:text>.SH NAME&#10;</xsl:text>
 
232
    <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>  
 
233
    <xsl:apply-templates/>
222
234
  </xsl:template>
223
235
 
224
236
  <!-- Appref -->
225
237
  <xsl:template match="/appref">
226
 
      <xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 6 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "Ericsson AB" "Erlang Application Definition"&#10;</xsl:text>
227
 
      <xsl:text>.SH NAME&#10;</xsl:text>
228
 
      <xsl:value-of select="file"/><xsl:text> \- </xsl:text><xsl:value-of select="filesummary"/><xsl:text>&#10;</xsl:text>  
229
 
      <xsl:apply-templates/>
 
238
    <xsl:variable name="companyname">
 
239
      <xsl:choose>
 
240
        <!-- Workaround until all of OTP's .../holder contents are correct.  -->
 
241
        <xsl:when test="starts-with(header/copyright/holder,'Ericsson AB')"><xsl:text>Ericsson AB</xsl:text></xsl:when>
 
242
        <xsl:otherwise><xsl:value-of select="header/copyright/holder"/></xsl:otherwise>
 
243
      </xsl:choose>
 
244
    </xsl:variable>
 
245
    <xsl:text>.TH </xsl:text><xsl:value-of select="app"/><xsl:text> 7 "</xsl:text><xsl:value-of select="$appname"/><xsl:text> </xsl:text><xsl:value-of select="$appver"/><xsl:text>" "</xsl:text><xsl:value-of select="$companyname"/><xsl:text>" "Erlang Application Definition"&#10;</xsl:text>
 
246
    <xsl:text>.SH NAME&#10;</xsl:text>
 
247
    <xsl:value-of select="app"/><xsl:text> \- </xsl:text><xsl:value-of select="appsummary"/><xsl:text>&#10;</xsl:text>  
 
248
    <xsl:apply-templates/>
230
249
  </xsl:template>
231
250
 
232
251
  <!-- Module|Com|Lib|File|App-->
297
316
    <!-- This tag is skipped for now. -->
298
317
  </xsl:template>
299
318
 
300
 
  <!-- xsl:template match="p/text()">
301
 
    <xsl:value-of select="normalize-space()"/>
302
 
  </xsl:template-->
303
 
 
304
 
  <xsl:template match="d/text()">
305
 
    <xsl:value-of select="normalize-space()"/>
 
319
 
 
320
  <!-- Authors -->
 
321
  <xsl:template match="authors">
 
322
    <xsl:text>&#10;.SH AUTHORS</xsl:text>
 
323
    <xsl:apply-templates/>
 
324
  </xsl:template>
 
325
 
 
326
  <!-- Aname -->
 
327
  <xsl:template match="authors/aname">
 
328
    <xsl:text>&#10;.LP&#10;</xsl:text>
 
329
    <xsl:apply-templates/>
 
330
  </xsl:template>
 
331
 
 
332
  <!-- Email -->
 
333
  <xsl:template match="authors/email">
 
334
    <xsl:text>&#10;.I&#10;&lt;</xsl:text>
 
335
    <xsl:apply-templates/>
 
336
    <xsl:text>&gt;</xsl:text>
 
337
  </xsl:template>
 
338
 
 
339
  <!-- Replace ' by \&' ans . by \&. -->
 
340
  <xsl:template match="text()">
 
341
    <xsl:variable name="startstring">
 
342
      <xsl:value-of select="normalize-space()"/><xsl:text> </xsl:text>
 
343
    </xsl:variable>    
 
344
    <xsl:variable name="rep1">
 
345
      <xsl:call-template name="replace-string">
 
346
        <xsl:with-param name="text" select="$startstring" />
 
347
        <xsl:with-param name="replace" select="&quot;\&quot;" />
 
348
        <xsl:with-param name="with" select="&quot;\\&quot;" />
 
349
      </xsl:call-template>
 
350
    </xsl:variable>
 
351
    <xsl:variable name="rep2">
 
352
      <xsl:call-template name="replace-string">
 
353
        <xsl:with-param name="text" select="$rep1" />
 
354
        <xsl:with-param name="replace" select="&quot;&apos;&quot;" />
 
355
        <xsl:with-param name="with" select="&quot;\&amp;&apos;&quot;" />
 
356
      </xsl:call-template>
 
357
    </xsl:variable>
 
358
    <xsl:call-template name="replace-string">
 
359
      <xsl:with-param name="text" select="$rep2" />
 
360
      <xsl:with-param name="replace" select="&quot;.&quot;" />
 
361
      <xsl:with-param name="with" select="&quot;\&amp;.&quot;" />
 
362
    </xsl:call-template>
 
363
  </xsl:template>
 
364
 
 
365
  <!-- Template replace-string is borrowed at http://www.dpawson.co.uk/xsl/sect2/replace.html -->
 
366
  <xsl:template name="replace-string">
 
367
    <xsl:param name="text"/>
 
368
    <xsl:param name="replace"/>
 
369
    <xsl:param name="with"/>
 
370
    <xsl:choose>
 
371
      <xsl:when test="contains($text,$replace)">
 
372
        <xsl:value-of select="substring-before($text,$replace)"/>
 
373
        <xsl:value-of select="$with"/>
 
374
        <xsl:call-template name="replace-string">
 
375
          <xsl:with-param name="text" select="substring-after($text,$replace)"/>
 
376
          <xsl:with-param name="replace" select="$replace"/>
 
377
          <xsl:with-param name="with" select="$with"/>
 
378
        </xsl:call-template>
 
379
      </xsl:when>
 
380
      <xsl:otherwise>
 
381
        <xsl:value-of select="$text"/>
 
382
      </xsl:otherwise>
 
383
    </xsl:choose>
306
384
  </xsl:template>
307
385
 
308
386
</xsl:stylesheet>