programmation.xsl 21.4 KB
Newer Older
Neveux Anais's avatar
Neveux Anais committed
1
<?xml version="1.0" encoding="UTF-8"?>
2
3
<xsl:stylesheet xmlns="http://www.utc.fr/ics/hdoc/xhtml"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
Neveux Anais's avatar
Neveux Anais committed
4
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
5
6
7
8
9
10
11
12
13
14
15
16
17
    exclude-result-prefixes="xs"
    version="2.0"
    xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
    xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
    xmlns:cp="canope.fr:canoprof">
    <xsl:output method="xhtml"/>
    <xsl:strip-space elements="*" /> 
    <!-- Il faut uniformiser les sc:para -->
    <xsl:template match="sc:item">
        <xsl:apply-templates/>
    </xsl:template>
    <!--<xsl:template match="*"></xsl:template>-->
    <xsl:template match="cp:program">
Neveux Anais's avatar
Neveux Anais committed
18
        <xsl:processing-instruction name="oxygen">
19
         RNGSchema="../../schemas/xhtml/hdoc1-xhtml.rng" type="xml"</xsl:processing-instruction>
20
        <html>
Neveux Anais's avatar
Neveux Anais committed
21
            <head>
Neveux Anais's avatar
Neveux Anais committed
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
                <title>
                    <xsl:choose>
                        <xsl:when test="string-length(cp:programM/sp:title) > 0">
                            <xsl:value-of select="cp:programM/sp:title"/>
                        </xsl:when>
                        <xsl:otherwise>
                            PROGRAMMATION 
                            <xsl:if test="./cp:programM/sp:class">
                                <xsl:value-of select="./cp:programM/sp:class"/><xsl:text> </xsl:text>
                            </xsl:if>
                            <xsl:if test="./cp:programM/sp:period">
                                [<xsl:value-of select="./cp:programM/sp:period"/>]
                            </xsl:if>                            
                        </xsl:otherwise>
                    </xsl:choose>
                </title>
Neveux Anais's avatar
Neveux Anais committed
38
39
                <meta charset="utf-8"/>
                <meta content="HdocConverter/Opale3.4" name="generator"/>
40
                <xsl:apply-templates select="cp:programM/child::*[name() != 'sp:abstract' and name()!= 'sp:title']"/>
Neveux Anais's avatar
Neveux Anais committed
41
42
            </head>
            <body>
43
44
                <xsl:apply-templates select="cp:programM/sp:abstract"/>
                <xsl:apply-templates select="child::*[name() != 'cp:programM']"/>
45
                <xsl:apply-templates select="descendant::*[sp:question and ../name() != 'sp:question']/sp:question | descendant::*[sp:exercice]/sp:exercice"/>
Neveux Anais's avatar
Neveux Anais committed
46
47
48
            </body>
        </html>
    </xsl:template>
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
    <xsl:template match="sp:class">
        <meta name="description" content="{.}" />
    </xsl:template>
    <xsl:template match="cp:programM/sp:period">
        <meta name="date" content="{.}" />
    </xsl:template>
    <xsl:template match="sp:abstract">
        <section data-hdoc-type="introduction">
            <header>
                <h1>Introduction</h1>
            </header>
            <!-- a introduction has only a bloc -->
            <div>
                <xsl:apply-templates select="./cp:txtDesc/*"/>
            </div>          
        </section>
    </xsl:template>
Neveux Anais's avatar
Neveux Anais committed
66
67
68
    <xsl:template match="sp:sequence/cp:sequence">
        <section>
            <header>
69
70
                <h1><xsl:value-of select="./cp:sequenceM/sp:title"/></h1>
                <xsl:apply-templates select=".//cp:competence"/>
Neveux Anais's avatar
Neveux Anais committed
71
            </header>
72
73
74
75
76
77
78
79
80
81
82
83
            <xsl:apply-templates select=".//sp:ojectives"/>
            <xsl:apply-templates select="child::*[name()!= 'cp:sequenceM']"/>
        </section>
    </xsl:template>
    <xsl:template match="sp:ojectives">
        <section>
            <header>
                <h1>Objectifs</h1>
            </header>
            <div>
                <xsl:apply-templates select="./cp:txtDesc/*"/>
            </div>
Neveux Anais's avatar
Neveux Anais committed
84
85
86
        </section>
    </xsl:template>
    <xsl:template match="sp:session">
87
88
89
90
91
92
        <section>
            <header>
                <h1><xsl:value-of select="cp:session/cp:sessionM/sp:title"/></h1>
                <!-- gérer les sessionM -->
                
            </header>
93
            <xsl:apply-templates select="cp:session/*[name() != 'cp:sessionM']"/>
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
        </section>
    </xsl:template>
    
    <xsl:template match="sp:profInstruction">
        <div><xsl:apply-templates select="cp:txt/sc:para"/></div>
    </xsl:template>
    
    <!-- ***** TEXT START ***** -->
    
    <!-- Simple text 
    <xsl:template match="cp:res/sp:txt">
        <xsl:apply-templates select="./op:txt/*" />
    </xsl:template>-->
    
    <!-- Paragraph -->
    <xsl:template match="sc:para"> 
        <p>
            <xsl:apply-templates select="./* | ./text()" />
        </p>
    </xsl:template>
    
    <!-- ***** PARAGRAPH ITEMS START ***** -->
    
    <!-- citation -->
    <xsl:template match="sc:para/sc:inlineStyle[@role='quote']" priority="2">
        <q>
            <xsl:value-of select="." />
        </q>
    </xsl:template>
    <!-- important -->
    <xsl:template match="sc:para/sc:inlineStyle[@role='emphasis']" priority="2">
        <em>
            <xsl:value-of select="." />
        </em>
    </xsl:template>
    <!-- foreign term -->
    <xsl:template match="sc:para/sc:inlineStyle[@role='specific']" priority="2">
        <i>
            <xsl:value-of select="." />
        </i>
    </xsl:template>
    <!-- syntax -->
    <xsl:template match="sc:para/sc:inlineStyle[@role='code']" priority="2">
        <span data-hdoc-type="syntax">
            <xsl:value-of select="." />
        </span>
    </xsl:template>
    
    <xsl:template match="sc:para/sc:uLink" priority="2">
        <xsl:value-of select="." />
    </xsl:template>
    <!-- exponent -->
    <xsl:template match="sc:para/sc:textLeaf[@role='exp']" priority="2">
        <sup>
            <xsl:value-of select="." />
        </sup>
    </xsl:template>
    <!-- subscript -->
    <xsl:template match="sc:para/sc:textLeaf[@role='ind']" priority="2">
        <sub>
            <xsl:value-of select="." />
        </sub>
    </xsl:template>
    <!-- latex -->
    <xsl:template match="sc:para/sc:textLeaf[@role='mathtex']" priority="2">
        <span data-hdoc-type="latex">
            <xsl:value-of select="." />
        </span>
    </xsl:template>
Neveux Anais's avatar
Neveux Anais committed
163
164
165
166
167
168
169
    
    <xsl:template match="sc:para/sc:textLeaf[@role='gap']" priority = "2">
        <span data-hdoc-type="blank">
            <xsl:value-of select="."/>
        </span>    
    </xsl:template>
    
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
    <!-- default behaviour for other balises -->
    <xsl:template match="sc:para/sc:inlineStyle|sc:para/sc:textLeaf" priority="1">
        <xsl:value-of select="." />
    </xsl:template>
    
    <xsl:template match="sc:para/sc:phrase[@role='url']">
        <xsl:apply-templates select="cp:link"/>
    </xsl:template>
    
    <xsl:template match="cp:link">
        <a href="{sp:url/text()}"><xsl:value-of select="sp:title/text()"></xsl:value-of></a>
    </xsl:template>
    
    <!-- ***** PARAGRAPH ITEMS END ***** -->
    
    <!-- List-->
    <xsl:template match="sc:itemizedList">
        <ul>
            <xsl:apply-templates select="./sc:listItem" />
        </ul>
    </xsl:template>
    
    <!-- Ordered list -->
    <xsl:template match="sc:orderedList">
        <ol>
            <xsl:apply-templates select="./sc:listItem" />
        </ol>
    </xsl:template>
    
    <!-- ***** LIST ITEMS START ***** -->
    
    <!-- List item -->
    <xsl:template match="sc:listItem">
        <li>
            <xsl:apply-templates select="./*" />
        </li>
    </xsl:template>
    
    <!-- ***** LIST ITEMS END ***** -->
    
    <!-- Table -->
    <xsl:template match="sc:table">
        <table>
            <xsl:apply-templates select="./*" />
        </table>
    </xsl:template>
    
    <!-- ***** TABLE ITEMS START ***** -->
    
    <!-- caption -->
    <xsl:template match="sc:table/sc:caption">
        <caption>
            <xsl:value-of select="."></xsl:value-of>
        </caption>
    </xsl:template>
    <!-- table row -->
    <xsl:template match="sc:table/sc:row">
        <tr>
            <xsl:apply-templates select="./*" />
        </tr>
    </xsl:template>
    <!-- table cell -->
    <xsl:template match="sc:table/sc:row/sc:cell">
        <td>
            <xsl:apply-templates select="./*" />
        </td>
    </xsl:template>
    
    <!-- ***** TABLE ITEMS END ***** -->
    
    <!-- ***** TEXT END ***** -->
    
Neveux Anais's avatar
Neveux Anais committed
242
243
    
    
244
    <!-- ******** ACTIVITE TETM ********** -->
245
    <xsl:template match="sp:textActivity/cp:textActivity | sc:item/cp:textActivity | sp:section/cp:textActivity">
246
247
248
249
        <section>
            <header>
                <h1><xsl:value-of select="cp:activityM/sp:title"/></h1>
            </header>
250
           
251
            <xsl:apply-templates select="sp:body/cp:blocks/*[name() != 'sp:question' and name() != 'sp:exercice'] | sp:section/cp:textActivity"/>
252
253
254
255
256
257
        </section>
    </xsl:template>
    
    <!-- Gestion transclusion d'activite -->
    <xsl:template match="sp:textActivity[@sc:refUri]">
        <xsl:apply-templates select="document(@sc:refUri)"/>
Neveux Anais's avatar
Neveux Anais committed
258
259
    </xsl:template>
    
260
261
262
263
264
265
266
    <!-- Gestion information -->
    <xsl:template match="sp:info">
        <div>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
Neveux Anais's avatar
Neveux Anais committed
267
    </xsl:template>
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
    
    <!-- Gestion warning -->
    <xsl:template match="sp:warning">
        <div data-hdoc-type='warning'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>
    
    <!-- Gestion complement -->
    <xsl:template match="sp:extra">
        <div data-hdoc-type='complement'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>
    
    <!-- Gestion conseil -->
    <xsl:template match="sp:advice">
        <div data-hdoc-type='advice'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>
    
    <!-- Gestion definition -->
    <xsl:template match="sp:definition">
        <div data-hdoc-type='definition'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>
    
    <!-- Gestion exemple -->
    <xsl:template match="sp:example">
        <div data-hdoc-type='example'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>
    
    <!-- Gestion hypothese -->
    <xsl:template match="sp:hypothesis">
        <div data-hdoc-type='remark'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <!-- TODO gerer plusieurs types de paragraphe -->
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
    </xsl:template>

323
324
    <!-- Gestion methode -->
    <xsl:template match="sp:method">
325
326
327
328
        <div data-hdoc-type='method'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
329
330
331
332
    </xsl:template>
    
    <!-- Gestion rappel -->
    <xsl:template match="sp:reminder">
333
334
335
336
        <div data-hdoc-type='remind'>
            <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
        </div>
337
    </xsl:template>
338
339
340
    
    <!-- ******** FIN ACTIVITE TETM ********** -->
    
341
    
Neveux Anais's avatar
Neveux Anais committed
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
    <!-- ******** EXERCICE AVEC ET SANS CORRIGE ******** -->
    
    <!-- Texte à trou -->
    <xsl:template match="sp:question/cp:cloze | sp:exercice/cp:cloze">
        <section data-hdoc-type='fill-in-the-blank'>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type='question'>
                <xsl:apply-templates select="sc:question/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
            </div>
            <div data-hdoc-type='gapText'>
                <xsl:apply-templates select="sc:gapText/cp:txtCloze/sc:para"/>
            </div>
            <xsl:if test="../name() = 'sp:question'">
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>
            </xsl:if>
        </section>
    </xsl:template>
    
    <xsl:template match="sc:item/cp:cloze">
        <xsl:param name="withoutExplanation"/>
        <section data-hdoc-type='fill-in-the-blank'>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type='question'>
                <xsl:apply-templates select="sc:question/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
            </div>
            <div data-hdoc-type='gapText'>
                <xsl:apply-templates select="sc:gapText/cp:txtCloze/sc:para"/>
            </div>
            <xsl:if test="$withoutExplanation = 'sp:question'">
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>
            </xsl:if>
        </section>
    </xsl:template>
    
384
385
    
    <!-- Questionnement -->
386
387
    
    <xsl:template match="sp:question/cp:openQuestion | sp:exercice/cp:openQuestion">
388
389
390
391
        <section data-hdoc-type='exercise'>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
392
393
            <section>
                <header><h1/></header>
394
                <xsl:if test="sp:question/cp:flow/*[name() != 'sp:profInstruction']">
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
                    <div data-hdoc-type='openQuestion'>
                        <xsl:apply-templates select="sp:question/cp:flow/sp:txt/cp:txt//sc:para"/>
                    </div>
                    <div data-hdoc-type='hint'>
                        <xsl:apply-templates select="sp:question/cp:flow/sp:profInstruction/cp:txt//sc:para"/>
                    </div>
                </xsl:if>
                <xsl:if test="../name() = 'sp:question' and sp:solution">
                    <div data-hdoc-type='solution'>
                        <xsl:apply-templates select="sp:solution/cp:flow/sp:txt/cp:txt//sc:para"/>
                    </div>
                </xsl:if>
            </section>
        </section>
    </xsl:template>
    
    <xsl:template match="sc:item/cp:openQuestion">
        <xsl:param name="withoutExplanation"/>
        <section data-hdoc-type='exercise'>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <section>
                <header><h1/></header>
                <xsl:if test="sp:question/cp:flow/*">
                    <div data-hdoc-type='openQuestion'>
                        <xsl:apply-templates select="sp:question/cp:flow/sp:txt/cp:txt//sc:para"/>
                    </div>
                    <div data-hdoc-type='hint'>
                        <xsl:apply-templates select="sp:question/cp:flow/sp:profInstruction/cp:txt//sc:para"/>
                    </div>
                </xsl:if>
                <xsl:if test="$withoutExplanation = 'sp:question' and sp:solution">
                    <div data-hdoc-type='solution'>
                        <xsl:apply-templates select="sp:solution/cp:flow/sp:txt/cp:txt//sc:para"/>
                    </div>
                </xsl:if>
            </section>
433
434
435
436
        </section>
    </xsl:template>
    
    <!-- QCM and QCU-->
437
438
439
    <!-- TODO Gérer les explications par choix -->
    <xsl:template match="sc:item/cp:qcm">
        <xsl:param name="withoutExplanation"/>
440
441
442
443
444
        <section>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type = 'question'>
445
                <xsl:apply-templates select='sc:question/cp:block/sp:body'/>
446
447
            </div>
            <xsl:apply-templates select="sc:choices/sc:choice"/>
448
            <xsl:if test="$withoutExplanation = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
449
450
451
452
453
454
455
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>            
            </xsl:if>
        </section>
    </xsl:template>
    
456
457
458
459
460
461
    <xsl:template match="sp:question/cp:qcm | sp:exercice/cp:qcm">
        <section>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type = 'question'>
462
                <xsl:apply-templates select='sc:question/cp:block/sp:body'/>
463
464
465
466
467
468
469
470
471
472
473
474
            </div>
            <xsl:apply-templates select="sc:choices/sc:choice"/>
            <xsl:if test="../name() = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>            
            </xsl:if>
        </section>
    </xsl:template>
    
    <xsl:template match="sc:item/cp:qcu">
        <xsl:param name="withoutExplanation"/>
475
476
477
478
479
        <section>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type='singlechoicequestion'>
480
                <xsl:apply-templates select="sc:question/cp:block/sp:body"/>
481
482
483
            </div>
            <xsl:apply-templates select="sc:choices//sc:choice"/>
            <div data-hdoc-type='solution'><p><xsl:value-of select="sc:solution/@choice"/></p></div>
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
            <xsl:if test="$withoutExplanation = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>            
            </xsl:if>
            
        </section>
    </xsl:template>
    
    <xsl:template match="sp:question/cp:qcu | sp:exercice/cp:qcu">
        <section>
            <header>
                <h1><xsl:value-of select="cp:questionM/sp:title"/></h1>
            </header>
            <div data-hdoc-type='singlechoicequestion'>
499
                <xsl:apply-templates select="sc:question/cp:block/sp:body"/>
500
501
502
503
            </div>
            <xsl:apply-templates select="sc:choices//sc:choice"/>
            <div data-hdoc-type='solution'><p><xsl:value-of select="sc:solution/@choice"/></p></div>
            <xsl:if test="../name() = 'sp:question' and sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt">
504
505
506
507
508
509
510
511
512
513
514
                <div data-hdoc-type='explanation'>
                    <xsl:apply-templates select="sc:globalExplanation/cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
                </div>            
            </xsl:if>
    
        </section>
    </xsl:template>
    
    <xsl:template match="sc:choice">
        <div data-hdoc-type='choice'>
            <xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
515
516
517
518
519
520
            
            <xsl:if test="sc:choiceExplanation">
                <div data-hdoc-type='explanation-choice-correct'>
                    <xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
                </div>    
            </xsl:if>
521
522
523
524
525
526
527
528
529
        </div>
        
    </xsl:template>
    
    <xsl:template match="sc:choice[@solution]">
        <xsl:choose>
            <xsl:when test="@solution = 'checked'">
                <div data-hdoc-type='choice-correct'>
                    <xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
530
531
532
533
534
                    <xsl:if test="sc:choiceExplanation">
                        <div data-hdoc-type='explanation-choice-correct'>
                            <xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
                        </div>    
                    </xsl:if>
535
536
537
538
539
                </div>
            </xsl:when>
            <xsl:otherwise>
                <div data-hdoc-type='choice-incorrect'>
                    <xsl:apply-templates select="sc:choiceLabel/cp:txt/sc:para"/>
540
541
542
543
544
                    <xsl:if test="sc:choiceExplanation">
                        <div data-hdoc-type='explanation-choice-incorrect'>
                            <xsl:apply-templates select="sc:choiceExplanation/cp:txt/sc:para"/>
                        </div>    
                    </xsl:if>
545
546
547
                </div>
            </xsl:otherwise>
        </xsl:choose>
548
        
549
550
551
    </xsl:template>
    
    <xsl:template match="sp:question[@sc:refUri] | sp:exercice[@sc:refUri]">
552
553
554
       <xsl:apply-templates select="document(@sc:refUri)/sc:item/*">
           <xsl:with-param name="withoutExplanation" select="name()"/>
       </xsl:apply-templates>
555
556
    </xsl:template>
    
557
    
558
559
560
    <xsl:template match="sp:question | sp:exercice">
        <xsl:apply-templates select="./*"/>
    </xsl:template>
Neveux Anais's avatar
Neveux Anais committed
561
</xsl:stylesheet>