Commit 6618d4db authored by Neveux Anais's avatar Neveux Anais

activity transclusion done and some xsl fixes

parent fb816496
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
<!--<xsl:template match="*"></xsl:template>--> <!--<xsl:template match="*"></xsl:template>-->
<xsl:template match="cp:program"> <xsl:template match="cp:program">
<xsl:processing-instruction name="oxygen"> <xsl:processing-instruction name="oxygen">
RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml"</xsl:processing-instruction> RNGSchema="../../schemas/xhtml/hdoc1-xhtml.rng" type="xml"</xsl:processing-instruction>
<html> <html>
<head> <head>
<title><xsl:value-of select="cp:programM/sp:title"/></title> <title><xsl:value-of select="cp:programM/sp:title"/></title>
...@@ -74,9 +74,7 @@ ...@@ -74,9 +74,7 @@
<!-- gérer les sessionM --> <!-- gérer les sessionM -->
</header> </header>
<!-- <xsl:apply-templates select="cp:session/sp:profInstruction"/> --> <xsl:apply-templates select="cp:session/*[name() != 'cp:sessionM']"/>
<!-- TODO Faire un apply-template plus générique -->
<xsl:apply-templates select="cp:session/sp:textActivity"/>
</section> </section>
</xsl:template> </xsl:template>
...@@ -221,13 +219,13 @@ ...@@ -221,13 +219,13 @@
<!-- ******** ACTIVITE TETM ********** --> <!-- ******** ACTIVITE TETM ********** -->
<xsl:template match="sp:textActivity/cp:textActivity | sc:item/cp:textActivity"> <xsl:template match="sp:textActivity/cp:textActivity | sc:item/cp:textActivity | sp:section/cp:textActivity">
<section> <section>
<header> <header>
<h1><xsl:value-of select="cp:activityM/sp:title"/></h1> <h1><xsl:value-of select="cp:activityM/sp:title"/></h1>
</header> </header>
<!-- TODO généraliser -->
<xsl:apply-templates select="sp:body/cp:blocks/sp:info | sp:body/cp:blocks/sp:warning | sp:body/cp:blocks/sp:extra | sp:body/cp:blocks/sp:advice | sp:body/cp:blocks/sp:definition | sp:body/cp:blocks/sp:example | sp:body/cp:blocks/sp:hypothesis"/> <xsl:apply-templates select="sp:body/cp:blocks/* | sp:section/cp:textActivity"/>
</section> </section>
</xsl:template> </xsl:template>
...@@ -239,7 +237,6 @@ ...@@ -239,7 +237,6 @@
<!-- Gestion information --> <!-- Gestion information -->
<xsl:template match="sp:info"> <xsl:template match="sp:info">
<div> <div>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -249,7 +246,6 @@ ...@@ -249,7 +246,6 @@
<!-- Gestion warning --> <!-- Gestion warning -->
<xsl:template match="sp:warning"> <xsl:template match="sp:warning">
<div data-hdoc-type='warning'> <div data-hdoc-type='warning'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -259,7 +255,6 @@ ...@@ -259,7 +255,6 @@
<!-- Gestion complement --> <!-- Gestion complement -->
<xsl:template match="sp:extra"> <xsl:template match="sp:extra">
<div data-hdoc-type='complement'> <div data-hdoc-type='complement'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -269,7 +264,6 @@ ...@@ -269,7 +264,6 @@
<!-- Gestion conseil --> <!-- Gestion conseil -->
<xsl:template match="sp:advice"> <xsl:template match="sp:advice">
<div data-hdoc-type='advice'> <div data-hdoc-type='advice'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -279,7 +273,6 @@ ...@@ -279,7 +273,6 @@
<!-- Gestion definition --> <!-- Gestion definition -->
<xsl:template match="sp:definition"> <xsl:template match="sp:definition">
<div data-hdoc-type='definition'> <div data-hdoc-type='definition'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -289,7 +282,6 @@ ...@@ -289,7 +282,6 @@
<!-- Gestion exemple --> <!-- Gestion exemple -->
<xsl:template match="sp:example"> <xsl:template match="sp:example">
<div data-hdoc-type='example'> <div data-hdoc-type='example'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
...@@ -299,13 +291,21 @@ ...@@ -299,13 +291,21 @@
<!-- Gestion hypothese --> <!-- Gestion hypothese -->
<xsl:template match="sp:hypothesis"> <xsl:template match="sp:hypothesis">
<div data-hdoc-type='remark'> <div data-hdoc-type='remark'>
<!-- TODO factoriser -->
<h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6> <h6><xsl:value-of select="cp:block/cp:blockM/sp:title"/></h6>
<!-- TODO gerer plusieurs types de paragraphe --> <!-- TODO gerer plusieurs types de paragraphe -->
<xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/> <xsl:apply-templates select="cp:block/sp:body/cp:flow/sp:txt/cp:txt//sc:para"/>
</div> </div>
</xsl:template> </xsl:template>
<!-- Gestion methode -->
<xsl:template match="sp:method">
<!-- TODO -->
</xsl:template>
<!-- Gestion rappel -->
<xsl:template match="sp:reminder">
<!-- TODO -->
</xsl:template>
<!-- ******** FIN ACTIVITE TETM ********** --> <!-- ******** FIN ACTIVITE TETM ********** -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment