Commit 69b096a3 authored by Esquilax76's avatar Esquilax76
Browse files

fix pb aims and exercices

parent 6ecd9423
...@@ -27,7 +27,18 @@ ...@@ -27,7 +27,18 @@
<xsl:template match="body/section/section"> <xsl:template match="body/section/section">
MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}); MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"});
MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1); MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1);
<!--<xsl:apply-templates select="./div"/>--> <xsl:apply-templates select="./section"/>
</xsl:template>
<!-- Traitement spécial pour les objectifs, ils ont parfois la même longueur -->
<xsl:template match="body/section/section/section[@data-hdoc-type='aims']">
MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"});
MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' - ', parent::section/header/h1, ' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1);
</xsl:template>
<xsl:template match="body/section/section/section[not(@data-hdoc-type='aims')]">
MERGE (i:<xsl:value-of select="./@data-hdoc-type"/> {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"});
MATCH (l1 {title:"<xsl:value-of select="concat(./header/h1,' (',string-length(.), ')')"/>"}), (l2 {title:"<xsl:value-of select="concat(parent::section/header/h1,' (',string-length(parent::section), ')')"/>"}) MERGE (l2)-[:LIEN]->(l1);
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>
\ No newline at end of file
...@@ -257,6 +257,9 @@ ...@@ -257,6 +257,9 @@
<header> <header>
<xsl:apply-templates select="op:practUc/op:exeM/sp:title"/> <xsl:apply-templates select="op:practUc/op:exeM/sp:title"/>
</header> </header>
<div>
<xsl:value-of select="./*"/>
</div>
</section> </section>
</xsl:template> </xsl:template>
......
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