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 121 122 123 124
|
<?xml version="1.0" encoding="iso-8859-2"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:template match="/">
<fo:root>
<fo:layout-master-set>
<fo:simple-page-master master-name="exemple"
page-height="29.7cm" page-width="21cm"
margin-top="1cm" margin-bottom="2cm"
margin-left="1.5cm" margin-right="1.5cm">
<fo:region-body margin-top="3cm" margin-bottom="1.5cm" column-count="3"/>
<fo:region-before extent="3cm"/>
<fo:region-after extent="1.5cm"/>
</fo:simple-page-master> </fo:layout-master-set>
<fo:page-sequence master-reference="exemple">
<fo:flow flow-name="xsl-region-body">
<fo:block text-indent="0pc" space-after="7pt" space-before.minimum="6pt" space-before.optimum="8pt" space-before.maximum="10pt"><xsl:text> Relevé de notes de </xsl:text><xsl:value-of select="carnet/etudiant/@sexe" /> <xsl:text> </xsl:text> <xsl:value-of select="carnet/etudiant/@nom" /> <xsl:text> </xsl:text> <xsl:value-of select="carnet/etudiant/@prenom" />
</fo:block>
<fo:table table-layout="fixed" width="100%" border-bottom="1px solid #ccc"
font-size=".9em" color="#666">
<fo:table-column column-width="3cm" />
<fo:table-column column-width="6cm" />
<fo:table-column column-width="4cm" />
<fo:table-column column-width="3cm" />
<fo:table-column column-width="2cm" />
<fo:table-header>
<fo:table-cell>
<fo:block>
<xsl:text> Moyenne</xsl:text></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<!--Récupération de la moyenne de l'étudiant -->
<xsl:value-of select="carnet/ue/note/@value" /></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:text> Rang </xsl:text>
<!--Récupération du rang de l'étudiant -->
<xsl:value-of select="carnet/ue/rang/@value" /> <xsl:text>/</xsl:text>
<!--Récupération du nombre d'inscrits -->
<xsl:value-of select="carnet/ue/rang/@ninscrits" /></fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block>
<xsl:text> Notes /</xsl:text>
<!--Récupération de la note max -->
<xsl:value-of select="carnet/ue/note_max/@value" />
</fo:block>
</fo:table-cell>
</fo:table-header>
<fo:table-body>
<xsl:apply-templates select="carnet/ue" />
</fo:table-body>
</fo:table>
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>
<!--Récupération du code, titre, note du module-->
<xsl:template match="carnet/ue">
<fo:table-row >
<fo:table-cell background-color="#E0FEFE">
<fo:block ><xsl:value-of select="@code" /></fo:block>
</fo:table-cell>
<fo:table-cell background-color="#E0FEFE">
<fo:block ><xsl:value-of select="@titre" /></fo:block>
</fo:table-cell>
<fo:table-cell background-color="#E0FEFE">
<fo:block ><xsl:text> </xsl:text> </fo:block>
</fo:table-cell>
<fo:table-cell background-color="#E0FEFE">
<fo:block >
<xsl:value-of select="note/@value" />
</fo:block></fo:table-cell>
<fo:table-cell background-color="#E0FEFE">
<fo:block >
<xsl:text> </xsl:text></fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell background-color="yellow">
<fo:block ><xsl:value-of select="module/@code" /></fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow">
<fo:block ><xsl:value-of select="module/@titre" />
</fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow"> <fo:block ><xsl:text> </xsl:text> </fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow">
<fo:block >
<xsl:value-of select="module/note/@value" />
</fo:block>
</fo:table-cell>
<fo:table-cell background-color="yellow">
<fo:block >
<xsl:value-of select="module/@coef" /> </fo:block>
</fo:table-cell>
</fo:table-row>
<fo:table-row >
<fo:table-cell>
<fo:block>
<xsl:text> </xsl:text> </fo:block>
</fo:table-cell>
<fo:table-cell >
<!--Récupération des evaluations des modules avec leur description, note et coef -->
<fo:block ><xsl:value-of select="module/evaluation/@description" /> </fo:block></fo:table-cell>
<fo:table-cell > <fo:block ><xsl:text> </xsl:text> </fo:block>
</fo:table-cell>
<fo:table-cell >
<fo:block >
<xsl:value-of select="module/evaluation/note/@value" />
</fo:block></fo:table-cell>
<fo:table-cell > <fo:block >
<xsl:value-of select="module/evaluation/@coef" />
</fo:block> </fo:table-cell>
</fo:table-row>
</xsl:template>
</xsl:stylesheet> |