Commit e661b1a3 authored by Charlotte Luszcz's avatar Charlotte Luszcz

Updated hdoc_to_canoprof schema, added manangement of syntax, method, information and legal blocks

parent 0047b7c3
......@@ -8,11 +8,9 @@
<a:documentation>This schema is a restriction of XHTML (it validates XHTML
schema, if namespace is changed to http://www.w3.org/1999/xhtml)</a:documentation>
<a:documentation>Last update : 2014-12-04</a:documentation>
<a:documentation>Last update : 2014-12-22</a:documentation>
<a:documentation>Changes since last update :
Adding object type -> application/pdf
Adding introduction and conclusion to section header and footer
Externalizing ObjectType and VideoType (to type.rng)
Adding biblio management via a href='' data-hdoc-type='bibtexml'
</a:documentation>
<start>
......@@ -196,6 +194,13 @@
</element>
</optional>
<ref name="Flow"/>
<optional>
<element name="div">
<ref name="DivType"/>
<ref name="Text"/>
</element>
</optional>
</element>
</oneOrMore>
</define>
......
......@@ -23,6 +23,15 @@
<value>unit-of-content</value>
<value>multiple-choice-question</value>
<value>fill-in-the-blank</value>
<value>division</value>
<value>grain</value>
<value>exercise</value>
<value>activity</value>
<value>aims</value>
<value>synthesis</value>
<value>order</value>
<value>match</value>
<value>group</value>
</choice>
</attribute>
</optional>
......@@ -40,11 +49,24 @@
<value>remark</value>
<value>warning</value>
<value>advice</value>
<value>remind</value>
<value>method</value>
<value>information</value>
<!-- quiz management -->
<value>question</value>
<value>singlechoicequestion</value>
<value>choice</value>
<value>solution</value>
<value>choice-correct</value>
<value>choice-incorrect</value>
<value>explanation</value>
<value>explanation-choice-correct</value>
<value>explanation-choice-incorrect</value>
<value>openQuestion</value>
<value>hint</value>
<value>gapText</value>
<value>label</value>
<value>target</value>
</choice>
</attribute>
</optional>
......@@ -69,6 +91,7 @@
<value>application/vnd.oasis.opendocument.graphics </value>
<value>application/vnd.oasis.opendocument.spreadsheet</value>
<value>application/pdf</value>
<value>application/x-listing</value>
</choice>
</attribute>
</define>
......
......@@ -347,6 +347,44 @@
</cp:block>
</sp:method>
</xsl:when>
<!-- hdoc's information = canoprof's info -->
<xsl:when test="./@data-hdoc-type = 'information'">
<sp:info>
<cp:block>
<cp:blockM>
<xsl:if test="string-length(./h:h6/text()) > 0">
<sp:title>
<xsl:value-of select="./h:h6"/>
</sp:title>
</xsl:if>
</cp:blockM>
<sp:body>
<cp:flow>
<xsl:apply-templates select="./*"/>
</cp:flow>
</sp:body>
</cp:block>
</sp:info>
</xsl:when>
<!-- hdoc's method = canoprof's method -->
<xsl:when test="./@data-hdoc-type = 'method'">
<sp:method>
<cp:block>
<cp:blockM>
<xsl:if test="string-length(./h:h6/text()) > 0">
<sp:title>
<xsl:value-of select="./h:h6"/>
</sp:title>
</xsl:if>
</cp:blockM>
<sp:body>
<cp:flow>
<xsl:apply-templates select="./*"/>
</cp:flow>
</sp:body>
</cp:block>
</sp:method>
</xsl:when>
<!-- hdoc's autres or no attribute = canoprof's information-->
<xsl:otherwise>
<sp:info>
......
......@@ -306,7 +306,7 @@
<object data="re/{$name}" type="application/vnd.oasis.opendocument.spreadsheet"/>
</xsl:template>
<!-- content Information : no microformat -->
<!-- content Information : information -->
<xsl:template match="sp:pb/op:pb/sp:info">
<div data-hdoc-type="information">
<xsl:apply-templates select="./op:pbTi/sp:title"/>
......@@ -378,20 +378,20 @@
</xsl:template>
<!-- content syntax : complement -->
<xsl:template match="sp:pb/op:pb/sp:syntax">
<div data-hdoc-type="information">
<div data-hdoc-type="complement">
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content legal : complement -->
<xsl:template match="sp:pb/op:pb/sp:legal">
<div data-hdoc-type="information">
<div data-hdoc-type="complement">
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content simulation : no microformat (we lose this information) -->
<!-- content simulation : no microformat-->
<xsl:template match="sp:pb/op:pb/sp:simul">
<div>
<xsl:apply-templates select="./op:pbTi/sp:title"/>
......
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