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

activity transclusion done and some xsl fixes

parent fb816496
......@@ -16,7 +16,7 @@
<!--<xsl:template match="*"></xsl:template>-->
<xsl:template match="cp:program">
<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>
<head>
<title><xsl:value-of select="cp:programM/sp:title"/></title>
......@@ -74,9 +74,7 @@
<!-- gérer les sessionM -->
</header>
<!-- <xsl:apply-templates select="cp:session/sp:profInstruction"/> -->
<!-- TODO Faire un apply-template plus générique -->
<xsl:apply-templates select="cp:session/sp:textActivity"/>
<xsl:apply-templates select="cp:session/*[name() != 'cp:sessionM']"/>
</section>
</xsl:template>
......@@ -221,13 +219,13 @@
<!-- ******** 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>
<header>
<h1><xsl:value-of select="cp:activityM/sp:title"/></h1>
</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>
</xsl:template>
......@@ -239,7 +237,6 @@
<!-- Gestion information -->
<xsl:template match="sp:info">
<div>
<!-- TODO factoriser -->
<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"/>
......@@ -249,7 +246,6 @@
<!-- Gestion warning -->
<xsl:template match="sp:warning">
<div data-hdoc-type='warning'>
<!-- TODO factoriser -->
<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"/>
......@@ -259,7 +255,6 @@
<!-- Gestion complement -->
<xsl:template match="sp:extra">
<div data-hdoc-type='complement'>
<!-- TODO factoriser -->
<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"/>
......@@ -269,7 +264,6 @@
<!-- Gestion conseil -->
<xsl:template match="sp:advice">
<div data-hdoc-type='advice'>
<!-- TODO factoriser -->
<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"/>
......@@ -279,7 +273,6 @@
<!-- Gestion definition -->
<xsl:template match="sp:definition">
<div data-hdoc-type='definition'>
<!-- TODO factoriser -->
<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"/>
......@@ -289,7 +282,6 @@
<!-- Gestion exemple -->
<xsl:template match="sp:example">
<div data-hdoc-type='example'>
<!-- TODO factoriser -->
<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"/>
......@@ -299,13 +291,21 @@
<!-- Gestion hypothese -->
<xsl:template match="sp:hypothesis">
<div data-hdoc-type='remark'>
<!-- TODO factoriser -->
<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 methode -->
<xsl:template match="sp:method">
<!-- TODO -->
</xsl:template>
<!-- Gestion rappel -->
<xsl:template match="sp:reminder">
<!-- TODO -->
</xsl:template>
<!-- ******** 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