activite_texte_multimedia.xsl 4.13 KB
Newer Older
Neveux Anais's avatar
Neveux Anais committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    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:op="utc.fr:ics/opale3"  xmlns:cp="canope.fr:canoprof">
    
    <xsl:template match="sp:textActivity">
        <section>
            <header>
                <xsl:apply-templates select="cp:textActivity/cp:activityM/sp:title"/>
                
            </header>
        </section>
        
        <!-- Blocs -->
        <xsl:apply-templates select="./cp:textActivity/sp:body/cp:blocks/*"/>

        <!-- Parts -->
        
        <footer>
            
        </footer>
    </xsl:template>
    
    
    <!-- Titles -->
    <xsl:template match="cp:activityM/sp:title">
        <h1>
            <xsl:value-of select="."/>
        </h1>
    </xsl:template>
    
    <xsl:template match="cp:block/cp:blockM/sp:title">
        <h6>
            <xsl:value-of select="."/>
        </h6>
    </xsl:template>
    
    <!-- Content information -->
    <xsl:template match="sp:body/cp:blocks/sp:info">
        <div>
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    
    <!-- Content definition -->
    <xsl:template match="sp:body/cp:blocks/sp:def">
        <div data-hdoc-type="definition">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    <!-- content example -->
    <xsl:template match="sp:body/cp:blocks/sp:ex">
        <div data-hdoc-type="example">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    
    <!-- content hypothesis-->
    <xsl:template match="sp:body/cp:blocks/sp:hypothesis">
        <div data-hdoc-type="remark">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    <!-- content advice -->
    <xsl:template match="sp:body/cp:blocks/sp:advice">
        <div data-hdoc-type="advice">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    <!-- content warning -->
    <xsl:template match="sp:body/cp:blocks/sp:warning">
        <div data-hdoc-type="warning">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    <!-- content rappel -->
    <xsl:template match="sp:body/cp:blocks/sp:reminder">
        <div data-hdoc-type="complement"> <!-- TODO change for reminder -->
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    
    <!-- content complement -->
    <xsl:template match="sp:body/cp:blocks/sp:extra">
        <div data-hdoc-type="complement">
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    
    <!-- content method -->
    <xsl:template match="sp:body/cp:blocks/sp:method">
        <div data-hdoc-type="advice"> <!-- TODO change for method -->
            <xsl:apply-templates select="cp:block/cp:blockM/sp:title"/>
            <xsl:apply-templates select="cp:block/sp:body/cp:flow/*"/>
        </div>
    </xsl:template>
    
    <!-- Simple text -->
    <xsl:template match="op:res/sp:txt">
        <xsl:apply-templates select="./cp:txt/*"/>
    </xsl:template>
    
    <!-- Paragraph -->
    <xsl:template match="sc:para">
        <p>
            test
            <!-- TODO Gérer -->
        </p>
    </xsl:template>
  
</xsl:stylesheet>