Statistics
| Revision:

root / tmp / org.txm.core / bin / org / txm / macro / oriflamms / prepare / oriflamms-convert-graalc-oriflammsxml.xsl @ 54

History | View | Annotate | Download (21.2 kB)

1
<?xml version="1.0"?>
2
<xsl:stylesheet xmlns:edate="http://exslt.org/dates-and-times"
3
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:tei="http://www.tei-c.org/ns/1.0"
4
  xmlns:xd="http://www.pnp-software.com/XSLTdoc"
5
  xmlns:txm="http://textometrie.org/1.0"
6
  exclude-result-prefixes="tei edate xd txm" version="2.0">
7

    
8
  <xsl:output method="xml" encoding="utf-8" omit-xml-declaration="no" indent="no"/>
9
  
10
  <xd:doc type="stylesheet">
11
    <xd:short>
12
      Cette feuille permet de convertir la transcription compacte de la 
13
      Queste del saint Graal au format XML-TEI du projet Oriflamms.
14
    </xd:short>
15
    <xd:detail>
16
      This stylesheet is free software; you can redistribute it and/or
17
      modify it under the terms of the GNU Lesser General Public
18
      License as published by the Free Software Foundation; either
19
      version 3 of the License, or (at your option) any later version.
20
      
21
      This stylesheet is distributed in the hope that it will be useful,
22
      but WITHOUT ANY WARRANTY; without even the implied warranty of
23
      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
24
      Lesser General Public License for more details.
25
      
26
      You should have received a copy of GNU Lesser Public License with
27
      this stylesheet. If not, see http://www.gnu.org/licenses/lgpl.html
28
    </xd:detail>
29
    <xd:author>Alexei Lavrentiev alexei.lavrentev@ens-lyon.fr</xd:author>
30
    <xd:copyright>2014, CNRS / ICAR (Équipe CACTUS)</xd:copyright>
31
  </xd:doc>
32
  
33
  <xsl:template match="/">
34
    <xsl:apply-templates/>
35
  </xsl:template>
36
  
37
  
38
  <xsl:template match="*">
39
        <xsl:copy>
40
          <xsl:apply-templates select="@*"/>
41
          <xsl:apply-templates select="*|processing-instruction()|comment()|text()"/>
42
        </xsl:copy>
43
  </xsl:template>
44

    
45
  <xsl:template match="comment()|text()">
46
    <xsl:copy/>
47
  </xsl:template>
48
  
49
  <xsl:template match="processing-instruction()"></xsl:template>
50

    
51
  <!-- On supprime les attributs par défaut de la DTD TEI -->
52
  
53
  <xsl:template match="@*">
54
    <xsl:choose>
55
      <xsl:when test="matches(name(.),'^(part|instant|anchored|full)$')"/>
56
      <xsl:when test="matches(name(.),'rend')">
57
        <xsl:choose>
58
          <xsl:when test="matches(.,'^aggl$')"><xsl:attribute name="rend">space-after(none)</xsl:attribute></xsl:when>
59
          <xsl:otherwise><xsl:copy/></xsl:otherwise>
60
        </xsl:choose>
61
      </xsl:when>
62
      <xsl:otherwise><xsl:copy/></xsl:otherwise>
63
    </xsl:choose>
64
  </xsl:template>
65

    
66
  <xsl:template match="tei:teiHeader">    
67
      <xsl:copy>
68
        <xsl:apply-templates select="@*"/>
69
        <xsl:apply-templates/>
70
      </xsl:copy>    
71
  </xsl:template>
72

    
73
<xsl:template match="tei:revisionDesc">
74
  <xsl:copy>
75
  <xsl:apply-templates select="@*"/>
76
  <change xmlns="http://www.tei-c.org/ns/1.0" when="{format-date(current-date(),'[Y]-[M01]-[D01]')}" who="#auto">Conversion automatique au format XML-TEI-Oriflamms</change>
77
  <xsl:apply-templates/>
78
  </xsl:copy>
79
</xsl:template>
80
  
81
  <xsl:template match="tei:encodingDesc">
82
    <xsl:copy>
83
      <xsl:apply-templates select="@*"/>
84
      <xsl:apply-templates/>
85
      <xsl:if test="not(//tei:prefixDef[@ident='ori'])">
86
        <listPrefixDef xmlns="http://www.tei-c.org/ns/1.0">
87
          <prefixDef xmlns="http://www.tei-c.org/ns/1.0" ident="ori" 
88
            matchPattern="([a-z]+)" 
89
            replacementPattern="oriflamms-annotation-scheme.xml#$1">
90
            <p>In the context of this project, private URIs with the prefix
91
              "ori" point to <gi>interp</gi> elements in the project's
92
              oriflamms-annotation-scheme.xml file.
93
            </p>
94
          </prefixDef>
95
        </listPrefixDef>
96
      </xsl:if>
97
    </xsl:copy>
98
  </xsl:template>
99

    
100

    
101
<xsl:template match="tei:cb[@rend='hidden']">
102
  <xsl:comment>cb factice supprimé</xsl:comment>
103
</xsl:template>
104

    
105
<xsl:template match="tei:note|tei:supplied">
106
  <xsl:copy>
107
    <xsl:apply-templates select="@*"/>
108
    <xsl:attribute name="ana">
109
      <xsl:if test="@ana"><xsl:value-of select="concat(@ana,' ')"/></xsl:if>
110
      <xsl:text>ori:align-no</xsl:text>
111
    </xsl:attribute>
112
    <xsl:apply-templates/>
113
  </xsl:copy>
114
</xsl:template>
115

    
116
<!--<xsl:template match="tei:pb[not(preceding-sibling::*[1][self::tei:milestone[@unit='surface']] or ancestor::tei:supplied)]">
117
  <milestone xmlns="http://www.tei-c.org/ns/1.0" unit="surface" facs="{@facs}"/>
118
  <xsl:copy>
119
    <xsl:apply-templates select="@*"/>
120
  </xsl:copy>
121
</xsl:template>-->
122

    
123
<xsl:template match="tei:w[matches(@type,'^PON')]">
124
  <pc xmlns="http://www.tei-c.org/ns/1.0">
125
    <xsl:apply-templates select="@*"/>
126
    <xsl:analyze-string select="." regex="^(.*)%(.*)%(.*)$">
127
      <xsl:matching-substring>
128
        <xsl:choose>
129
          <xsl:when test="matches(regex-group(3),'^$')">
130
            <xsl:attribute name="ana">ori:align-no</xsl:attribute>
131
            <reg xmlns="http://www.tei-c.org/ns/1.0" ana="ori:align-no"><xsl:value-of select="regex-group(1)"/></reg>
132
          </xsl:when>
133
          <xsl:when test="matches(regex-group(1),'^$')">
134
            <orig xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="regex-group(3)"/></orig>
135
          </xsl:when>
136
          <xsl:otherwise>
137
            <choice xmlns="http://www.tei-c.org/ns/1.0">
138
              <reg xmlns="http://www.tei-c.org/ns/1.0" ana="ori:align-no"><xsl:value-of select="regex-group(1)"/></reg>
139
              <orig xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="regex-group(3)"/></orig>
140
            </choice>
141
          </xsl:otherwise>
142
        </xsl:choose>        
143
      </xsl:matching-substring>
144
      <xsl:non-matching-substring><xsl:value-of select="."/></xsl:non-matching-substring>
145
    </xsl:analyze-string>
146
  </pc>
147
</xsl:template>
148

    
149
  <xsl:template match="tei:orig">
150
    <xsl:apply-templates/>
151
  </xsl:template>
152

    
153

    
154

    
155
  <xsl:template match="tei:w[not(matches(@type,'^PON'))]//text()|tei:del[not(ancestor::tei:w or descendant::tei:w)]//text()">
156
    <xsl:choose>
157
      <xsl:when test="matches(.,'^\s*$')"><xsl:copy/></xsl:when>
158
      <xsl:otherwise>
159
        <xsl:analyze-string select="." regex="#?\*[ijuvIJUVí]|#[A-Za-zÀ-ÿſ]|\{{\{{[^}}]+\}}\}}|#?\(\([^)]+\)\).?|_">
160
          <xsl:matching-substring>
161
            <xsl:choose>
162
              <xsl:when test="matches(.,'#\*([ij])')">
163
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-j"><xsl:value-of select="upper-case(regex-group(1))"/></g>
164
              </xsl:when>
165
              <xsl:when test="matches(.,'#\*([uv])')">
166
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-v"><xsl:value-of select="upper-case(regex-group(1))"/></g>
167
              </xsl:when>
168
              <xsl:when test="matches(.,'\*í')">
169
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-i ori:facs-iacute">j</g>
170
              </xsl:when>
171
              <xsl:when test="matches(.,'\*([ij])')">
172
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-j"><xsl:value-of select="regex-group(1)"/></g>
173
              </xsl:when>
174
              <xsl:when test="matches(.,'\*([uv])')">
175
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-v"><xsl:value-of select="regex-group(1)"/></g>
176
              </xsl:when>
177
              <xsl:when test="matches(.,'#\*([IJ])')">
178
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-I"><xsl:value-of select="lower-case(regex-group(1))"/></g>
179
              </xsl:when>
180
              <xsl:when test="matches(.,'#\*([UV])')">
181
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-V"><xsl:value-of select="lower-case(regex-group(1))"/></g>
182
              </xsl:when>
183
              <xsl:when test="matches(.,'\*([IJ])')">
184
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-I"><xsl:value-of select="regex-group(1)"/></g>
185
              </xsl:when>
186
              <xsl:when test="matches(.,'\*([UV])')">
187
                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-V"><xsl:value-of select="regex-group(1)"/></g>
188
              </xsl:when>
189
              <xsl:when test="matches(.,'#ſ')">
190
                <xsl:analyze-string select="." regex="^#(.)">
191
                  <xsl:matching-substring>
192
                    <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-caps ori:facs-slong">S</g>
193
                  </xsl:matching-substring>
194
                </xsl:analyze-string>
195
              </xsl:when>
196
              <!--  -->
197
<!--              <xsl:when test="matches(.,'#')">
198
                <xsl:analyze-string select="." regex="^#(.)">
199
                  <xsl:matching-substring>
200
                    <choice xmlns="http://www.tei-c.org/ns/1.0">
201
                      <abbr xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="regex-group(1)"/></abbr>
202
                      <expan xmlns="http://www.tei-c.org/ns/1.0"><ex xmlns="http://www.tei-c.org/ns/1.0"><g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-small">E</g>t</ex></expan>
203
                    </choice>
204
                  </xsl:matching-substring>
205
                </xsl:analyze-string>
206
              </xsl:when>              -->
207
              <xsl:when test="matches(.,'#[A-Z]')">
208
                <xsl:analyze-string select="." regex="^#(.)">
209
                  <xsl:matching-substring>
210
                    <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-caps"><xsl:value-of select="lower-case(regex-group(1))"/></g>
211
                  </xsl:matching-substring>
212
                </xsl:analyze-string>
213
              </xsl:when>
214
              <xsl:when test="matches(.,'#[^(]')">
215
                <xsl:analyze-string select="." regex="^#(.+)$">
216
                  <xsl:matching-substring>
217
                    <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-small"><xsl:value-of select="upper-case(regex-group(1))"/></g>
218
                  </xsl:matching-substring>
219
                </xsl:analyze-string>
220
              </xsl:when>
221
              <xsl:when test="matches(.,'\{\{([^}}]+)\}\}')">
222
                <xsl:analyze-string select="." regex="^\{{\{{([^:]*):([^:]*):([^:]*):([^:]*):?([^:]*)\}}\}}$">
223
                  <xsl:matching-substring>
224
                    <xsl:variable name="lettrine"><xsl:value-of select="regex-group(1)"/></xsl:variable>
225
                    <xsl:variable name="size"><xsl:value-of select="regex-group(2)"/></xsl:variable>
226
                    <xsl:variable name="sizeAct"><xsl:value-of select="regex-group(3)"/></xsl:variable>
227
                    <xsl:variable name="color"><xsl:value-of select="regex-group(4)"/></xsl:variable>
228
                    <xsl:variable name="deco"><xsl:value-of select="regex-group(5)"/></xsl:variable>
229
                    <xsl:variable name="rend">
230
                      <xsl:value-of select="concat('size(',$size,')')"/>
231
                      <xsl:if test="matches($sizeAct,'.+')"><xsl:value-of select="concat(' sizeAct(',$sizeAct,')')"/></xsl:if>
232
                      <xsl:if test="matches($color,'.+')"><xsl:value-of select="concat(' color(',$color,')')"/></xsl:if>
233
                      <xsl:if test="matches($deco,'.+')"><xsl:value-of select="concat(' deco(',$deco,')')"/></xsl:if>
234
                    </xsl:variable>
235
                    <g xmlns="http://www.tei-c.org/ns/1.0" type="lettrine" rend="{$rend}"><xsl:value-of select="$lettrine"/></g>
236
                  </xsl:matching-substring>
237
                </xsl:analyze-string>
238
              </xsl:when>
239
              <xsl:when test="matches(.,'\(\(')">
240
                <xsl:analyze-string select="." regex="^#?\(\(([^\)]+)\)\)(.?)$">
241
                  <xsl:matching-substring>
242
                    <xsl:variable name="capitalize">
243
                      <xsl:choose>
244
                        <xsl:when test="matches(.,'^#')">yes</xsl:when>
245
                        <xsl:otherwise>no</xsl:otherwise>
246
                      </xsl:choose>
247
                    </xsl:variable>
248
                    <xsl:variable name="abbrexpan"><xsl:value-of select="regex-group(1)"/></xsl:variable>
249
                    <xsl:variable name="nextLetter"><xsl:value-of select="regex-group(2)"/></xsl:variable>
250
                    <xsl:variable name="abbr">
251
                      <xsl:choose>
252
                        <xsl:when test="matches($abbrexpan,'_')"><xsl:value-of select="substring-before($abbrexpan,'_')"/></xsl:when>
253
                        <xsl:when test="matches($abbrexpan,'^(.&#x0305;|.&#x0363;|.&#x0364;|.&#x0365;|bn&#x0305;|ch&#x02BC;&#xA75B;|ch&#x0305;&#xA75B;|ch&#xA75B;&#x0305;|gn&#x0363;t|qn&#x0363;t|&#x035B;|&#x1DD1;|&#x204A;|&#x223B;|&#xA76F;|&#xA770;|&#xF153;|&#xF158;|&#xF1C8;)$')">
254
                          <xsl:value-of select="$abbrexpan"/>
255
                        </xsl:when>
256
                        <xsl:otherwise/>
257
                      </xsl:choose>
258
                    </xsl:variable>
259
                    <xsl:variable name="expannocap" as="element()">
260
                      <expan xmlns="http://www.tei-c.org/ns/1.0">
261
                        <xsl:choose>
262
                        <xsl:when test="matches($abbrexpan,'_')">
263
                          <xsl:analyze-string select="substring-after($abbrexpan,'_')" regex="\[([^\]]+)\]">
264
                            <xsl:matching-substring>
265
                              <ex xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="regex-group(1)"/></ex>
266
                            </xsl:matching-substring>
267
                            <xsl:non-matching-substring>
268
                              <xsl:copy/>
269
                            </xsl:non-matching-substring>
270
                          </xsl:analyze-string>
271
                        </xsl:when>
272
                          <xsl:when test="matches($abbrexpan,'^bn&#x0305;$')">b<ex xmlns="http://www.tei-c.org/ns/1.0">ie</ex>n</xsl:when>
273
                          <xsl:when test="matches($abbrexpan,'^(ch&#x02BC;&#xA75B;|ch&#x0305;&#xA75B;|ch&#xA75B;&#x0305;)$')">ch<ex xmlns="http://www.tei-c.org/ns/1.0">evalie</ex>r</xsl:when>
274
                          <xsl:when test="matches($abbrexpan,'gn&#x0363;t')">g<ex xmlns="http://www.tei-c.org/ns/1.0">r</ex><c xmlns="http://www.tei-c.org/ns/1.0" rend="position(combsup)">a</c>nt</xsl:when>
275
                          <xsl:when test="matches($abbrexpan,'qn&#x0363;t')">q<ex xmlns="http://www.tei-c.org/ns/1.0">u</ex><c xmlns="http://www.tei-c.org/ns/1.0" rend="position(combsup)">a</c>nt</xsl:when>
276
                        <xsl:when test="matches($abbrexpan,'.&#x0305;$')">
277
                          <xsl:value-of select="substring($abbrexpan,1,1)"/>
278
                          <xsl:choose>
279
                            <xsl:when test="matches($abbrexpan,'^[aeiou]') and matches($nextLetter,'[bmnp]')"><ex xmlns="http://www.tei-c.org/ns/1.0">m</ex></xsl:when>
280
                            <xsl:when test="matches($abbrexpan,'^[aeiou]')"><ex xmlns="http://www.tei-c.org/ns/1.0">n</ex></xsl:when>
281
                            <xsl:when test="matches($abbrexpan,'^[q]')"><ex xmlns="http://www.tei-c.org/ns/1.0">ue</ex></xsl:when>
282
                            <xsl:when test="matches($abbrexpan,'^[p]')"><ex xmlns="http://www.tei-c.org/ns/1.0">re</ex></xsl:when>
283
                            <xsl:otherwise>‹bar›</xsl:otherwise>
284
                          </xsl:choose>
285
                        </xsl:when>
286
                          <xsl:when test="matches($abbrexpan,'.&#x0363;')">
287
                            <xsl:value-of select="substring($abbrexpan,1,1)"/>
288
                            <xsl:choose>
289
                              <xsl:when test="matches($abbrexpan,'^[Qq]')"><ex xmlns="http://www.tei-c.org/ns/1.0">u</ex></xsl:when>
290
                              <xsl:otherwise><ex xmlns="http://www.tei-c.org/ns/1.0">r</ex></xsl:otherwise>
291
                            </xsl:choose>
292
                            <c xmlns="http://www.tei-c.org/ns/1.0" rend="position(combsup)">a</c>
293
                          </xsl:when>
294
                          <xsl:when test="matches($abbrexpan,'.&#x0364;')">
295
                            <xsl:value-of select="substring($abbrexpan,1,1)"/>
296
                            <xsl:choose>
297
                              <xsl:when test="matches($abbrexpan,'^[Qq]')"><ex xmlns="http://www.tei-c.org/ns/1.0">u</ex></xsl:when>
298
                              <xsl:otherwise><ex xmlns="http://www.tei-c.org/ns/1.0">r</ex></xsl:otherwise>
299
                            </xsl:choose>
300
                            <c xmlns="http://www.tei-c.org/ns/1.0" rend="position(combsup)">e</c>
301
                          </xsl:when>
302
                          <xsl:when test="matches($abbrexpan,'.&#x0365;')">
303
                            <xsl:value-of select="substring($abbrexpan,1,1)"/>
304
                            <xsl:choose>
305
                              <xsl:when test="matches($abbrexpan,'^[Qq]')"><ex xmlns="http://www.tei-c.org/ns/1.0">u</ex></xsl:when>
306
                              <xsl:otherwise><ex xmlns="http://www.tei-c.org/ns/1.0">r</ex></xsl:otherwise>
307
                            </xsl:choose>
308
                            <c xmlns="http://www.tei-c.org/ns/1.0" rend="position(combsup)">i</c>
309
                          </xsl:when>
310
                          <xsl:when test="matches($abbrexpan,'&#xA76F;') and matches($nextLetter,'[bmnp]')">
311
                            <ex xmlns="http://www.tei-c.org/ns/1.0">com</ex>
312
                          </xsl:when>
313
                          <xsl:when test="matches($abbrexpan,'&#xA76F;')">
314
                            <ex xmlns="http://www.tei-c.org/ns/1.0">con</ex>
315
                          </xsl:when>
316
                          <xsl:when test="matches($abbrexpan,'&#x035B;|&#xF1C8;')">
317
                            <ex xmlns="http://www.tei-c.org/ns/1.0">er</ex>
318
                          </xsl:when>
319
                          <xsl:when test="matches($abbrexpan,'&#x204A;|&#xF158;')">
320
                            <ex xmlns="http://www.tei-c.org/ns/1.0">et</ex>
321
                          </xsl:when>
322
                          <xsl:when test="matches($abbrexpan,'&#x1DD1;|&#xF153;')">
323
                            <ex xmlns="http://www.tei-c.org/ns/1.0">ur</ex>
324
                          </xsl:when>
325
                          <xsl:when test="matches($abbrexpan,'&#xA770;')">
326
                            <ex xmlns="http://www.tei-c.org/ns/1.0">us</ex>
327
                          </xsl:when>
328
                          <xsl:otherwise>
329
                            <ex xmlns="http://www.tei-c.org/ns/1.0"><xsl:value-of select="$abbrexpan"/></ex><!--<xsl:comment>Unknown expan!</xsl:comment>-->
330
                          </xsl:otherwise>
331
                        </xsl:choose></expan>
332
                    </xsl:variable>
333
                    <xsl:variable name="expan">
334
                      <xsl:choose>
335
                        <xsl:when test="$capitalize eq 'yes'">
336
                          <expan xmlns="http://www.tei-c.org/ns/1.0">
337
                            <xsl:for-each select="$expannocap/node()">
338
                            <xsl:choose>
339
                              <xsl:when test="self::text()[not(preceding-sibling::*)]">
340
                                <g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-small"><xsl:value-of select="upper-case(substring(.,1,1))"/></g><xsl:value-of select="substring(.,2)"/>
341
                              </xsl:when>
342
                              <xsl:when test="self::*[not(preceding-sibling::text())]">
343
                                <xsl:copy><g xmlns="http://www.tei-c.org/ns/1.0" ana="ori:dipl-small"><xsl:value-of select="upper-case(substring(.,1,1))"/></g><xsl:value-of select="substring(.,2)"/></xsl:copy>
344
                              </xsl:when>
345
                              <xsl:otherwise><xsl:copy-of select="."/></xsl:otherwise>
346
                            </xsl:choose>
347
                          </xsl:for-each>
348
                          </expan>
349
                        </xsl:when>
350
                        <xsl:otherwise><xsl:copy-of select="$expannocap"/></xsl:otherwise>
351
                      </xsl:choose>
352
                    </xsl:variable>
353
                    <xsl:choose>
354
                      <xsl:when test="matches($abbr,'.+')">
355
                        <choice xmlns="http://www.tei-c.org/ns/1.0">
356
                          <abbr xmlns="http://www.tei-c.org/ns/1.0"><xsl:copy-of select="$abbr"/></abbr>
357
                          <xsl:copy-of select="$expan"/>
358
                        </choice>
359
                      </xsl:when>
360
                      <xsl:otherwise><xsl:copy-of select="$expan"/><!--<xsl:comment>Unknown abbr!</xsl:comment>--></xsl:otherwise>
361
                    </xsl:choose>
362
                    <xsl:value-of select="$nextLetter"/>
363
                  </xsl:matching-substring>
364
                </xsl:analyze-string>
365
              </xsl:when>
366
              <xsl:when test="matches(.,'__')">
367
                <space xmlns="http://www.tei-c.org/ns/1.0" ana="ori:figement"/>
368
              </xsl:when>
369
              <xsl:when test="matches(.,'_')">
370
                <space xmlns="http://www.tei-c.org/ns/1.0"/>
371
              </xsl:when>              
372
              <xsl:otherwise>Match: <xsl:copy/></xsl:otherwise>
373
            </xsl:choose>
374
          </xsl:matching-substring>
375
          <xsl:non-matching-substring>
376
            <xsl:copy/>
377
          </xsl:non-matching-substring>
378
        </xsl:analyze-string>
379
      </xsl:otherwise>
380
    </xsl:choose>
381
  </xsl:template>
382
  
383

    
384

    
385
</xsl:stylesheet>