Commit b708820a authored by Baptiste Perraud's avatar Baptiste Perraud

Merge branch 'master' of https://gitlab.utc.fr/crozatst/hdoc

parents 21a81fe8 92eca99d
......@@ -6,8 +6,8 @@ http://www.gnu.org/licenses/gpl-3.0.txt
## Credits
- 2016
- - Etienne Chognard
- - Fabien Boucaud
- Etienne Chognard
- Fabien Boucaud
- 2015
- Jean-Côme Douteau
- Gabrielle Rit
......@@ -85,4 +85,4 @@ Currently available on: https://framemo.org/framapad_to_opale
- br -> p
## Capitalisation
Using regular expression with xsl is a good way to parse a non xml file.
\ No newline at end of file
Using regular expression with xsl is a good way to parse a non xml file.
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
<property file="etherpad_to_hdoc.properties"/>
<property file="framapad_to_hdoc.properties"/>
<!-- import classes -->
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<taskdef name="htmlcleaner" classname="org.htmlcleaner.HtmlCleanerForAnt"/>
......
@echo off
set lib=lib
set ant=etherpad_to_hdoc.ant
set ant=framapad_to_hdoc.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
......
#!/bin/sh
lib="lib"
ant="etherpad_to_hdoc.ant"
ant="framapad_to_hdoc.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
......
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." name="myantce" default="main">
<property file="etherpad_to_opale.properties"/>
<property file="framapad_to_opale.properties"/>
<!-- CHECK FOR OS FAMILY -->
<condition property="is_windows">
<os family="windows"/>
......@@ -24,7 +24,7 @@
<include name="*.html"/>
</fileset>
</copy>
<exec dir="../etherpad_to_hdoc" executable="run.bat"/>
<exec dir="../framapad_to_hdoc" executable="run.bat"/>
</target>
<target name="to_hdoc_unix" if="${is_unix}">
......@@ -38,8 +38,8 @@
<include name="*.html"/>
</fileset>
</copy>
<exec executable="/bin/bash" dir="../etherpad_to_hdoc">
<arg value="../etherpad_to_hdoc/run.sh"/>
<exec executable="/bin/bash" dir="../framapad_to_hdoc">
<arg value="../framapad_to_hdoc/run.sh"/>
</exec>
</target>
......@@ -90,4 +90,4 @@
<antcall target="to_opale_windows"/>
<antcall target="to_opale_end"/>
</target>
</project>
\ No newline at end of file
</project>
......@@ -5,8 +5,8 @@ xsl = ${basedir}/xsl
lib = ${basedir}/lib
log = ${basedir}/log
eth_in = ../etherpad_to_hdoc/input
eth_out = ../etherpad_to_hdoc/output
eth_in = ../framapad_to_hdoc/input
eth_out = ../framapad_to_hdoc/output
opa_in = ../hdoc_to_opale/input
opa_out = ../hdoc_to_opale/output
rootfilename = content.xml
\ No newline at end of file
rootfilename = content.xml
@echo off
set lib=lib
set ant=etherpad_to_opale.ant
set ant=framapad_to_opale.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
......
#!/bin/sh
lib="lib"
ant="etherpad_to_opale.ant"
ant="framapad_to_opale.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
......
libdir=${basedir}/lib
rngdir=${basedir}/rng
xsldir=${basedir}/xsl
srcdir=${basedir}/in
outdir=${basedir}/out
InputPath=${basedir}/input
OutputPath=${basedir}/output
lib=${basedir}/lib
log=${basedir}/log
xsl=${basedir}/xsl
in=${basedir}/input
out=${basedir}/output
tmp=${basedir}/tmp
\ No newline at end of file
......@@ -3,49 +3,42 @@
<taskdef resource="net/sf/antcontrib/antlib.xml"/>
<property name="in" location="${basedir}/input"/>
<property name="out" location="${basedir}/output"/>
<property name="tmp" location="${basedir}/tmp"/>
<property name="xsl" location="${basedir}/xsl"/>
<property name="lib" location="${basedir}/lib"/>
<property name="log" location="${basedir}/log"/>
<target name="convert">
<echo message="DEBUT"/>
<mkdir dir="${tmp}"/>
<delete dir="${out}" failonerror="false"/>
<mkdir dir="${out}"/>
<delete dir="${log}" failonerror="false"/>
<mkdir dir="${log}"/>
<for param="inputFile">
<path>
<fileset dir="${in}" includes="**/*.hdoc"/>
</path>
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}"/>
<antcall target="UnzipHdocFile">
<param name="filename" value="${filename}"/>
</antcall>
<antcall target="content">
<param name="filename" value="${filename}"/>
</antcall>
<echo message="FIN"/>
</sequential>
</for>
</target>
<property file="build.properties"/>
<target name="convert">
<!-- Preparation for the file transformation : delete old folders and create new folders -->
<mkdir dir="${tmp}"/>
<delete dir="${out}" failonerror="false"/>
<mkdir dir="${out}"/>
<delete dir="${log}" failonerror="false"/>
<mkdir dir="${log}"/>
<echo message="DEBUT"/>
<!-- Convert all the hdoc files in the directory ${in} to data xml files that will be imported to basex later.
Fonctions "UnzipHdocFile" and "content" will be called. -->
<for param="inputFile">
<path>
<fileset dir="${in}" includes="**/*.hdoc"/>
</path>
<sequential>
<local name="filename"/>
<basename property="filename" file="@{inputFile}"/>
<antcall target="UnzipHdocFile">
<param name="filename" value="${filename}"/>
</antcall>
<antcall target="content">
<param name="filename" value="${filename}"/>
</antcall>
<echo message="FIN"/>
</sequential>
</for>
<!-- Clean-->
<delete dir="${tmp}" failonerror="false"/>
</target>
<target name="UnzipHdocFile">
<!-- Unzip the input hdoc file. Decompressed folder is named "decompressedHdoc" : this name is the only one which
......@@ -56,15 +49,13 @@
</target>
<target name="content" >
<xslt in="${tmp}/${filename}/decompressedHdoc/content.xml" out="${out}/${filename}_data.xml" style="${xsl}/transformation.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
<param name="filename" expression="${filename}"/>
<param name="lib" expression="${lib}"/>
</xslt>
<echo message="${filename}" />
<delete dir="${tmp}" failonerror="false"/>
<!-- Transformation of a xml file decompressed from hdoc file to data xml file to be imported to basex.
The transformation will be done in terms of the xsl file in ${xsl}.-->
<xslt in="${tmp}/${filename}/decompressedHdoc/content.xml" out="${out}/${filename}_data.xml" style="${xsl}/transformation.xsl" processor="org.apache.tools.ant.taskdefs.optional.TraXLiaison">
<param name="filename" expression="${filename}"/>
<param name="lib" expression="${lib}"/>
</xslt>
<echo message="${filename}" />
</target>
</project>
\ No newline at end of file
......@@ -149,3 +149,11 @@ The opale_to_hdoc converter transcribes an Opale publication to a hdoc format. O
The source code converter is available and can be completed in order to
improve it and manage more Opale elements.
Modified by Benoit Villain (12/12/2016)
------------------
Les divisions et les parties d'un grain n'étaient pas traitées... Contrairement à ce que mentionne le README...
J'ai donc apporté les modifications nécessaires pour que les divisions et les parties (récursives) soient bel et bien transformées en "section" hdoc.
<
<?xml version="1.0" encoding="UTF-8"?>
<!-- Namespaces -->
<xsl:stylesheet
xmlns="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:op="utc.fr:ics/opale3">
<xsl:stylesheet xmlns="http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs" version="2.0" xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:op="utc.fr:ics/opale3">
<xsl:template match="sc:item">
<xsl:apply-templates/>
</xsl:template>
<!-- MODULE -->
<xsl:template match="op:ue">
<!-- RNG -->
<xsl:processing-instruction name="oxygen">
RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml"
</xsl:processing-instruction>
<!-- HTML -->
<html>
<!-- MODULE"s HEADER -->
<head>
<xsl:apply-templates select="op:ueM/sp:title"/>
......@@ -34,91 +28,120 @@
<meta content="HdocConverter/Opale3.4" name="generator"/>
<xsl:apply-templates select="op:ueM/sp:info"/>
</head>
<!-- MODULE's COMPONENTS -->
<body>
<xsl:apply-templates select="child::*[name() != 'op:ueM']"/>
</body>
</html>
</xsl:template>
<!-- Information -->
<xsl:template match="op:ueM/sp:info">
<xsl:apply-templates select="op:info/sp:keywds/op:keywds/sp:keywd" />
<xsl:apply-templates select="op:info/sp:cc" />
<xsl:apply-templates select="op:info/sp:cpyrgt/op:sPara/sc:para" />
<xsl:apply-templates select="op:info/sp:keywds/op:keywds/sp:keywd"/>
<xsl:apply-templates select="op:info/sp:cc"/>
<xsl:apply-templates select="op:info/sp:cpyrgt/op:sPara/sc:para"/>
</xsl:template>
<!-- Titles -->
<xsl:template match="op:uM/sp:title | op:expUcDivM/sp:title">
<h1><xsl:value-of select="." /></h1>
<xsl:template match="op:uM/sp:title | op:expUcDivM/sp:title | op:ueDivM/sp:title">
<h1>
<xsl:value-of select="."/>
</h1>
</xsl:template>
<xsl:template match="op:ueM/sp:title">
<title><xsl:value-of select="." /></title>
<title>
<xsl:value-of select="."/>
</title>
</xsl:template>
<xsl:template match="op:pbTi/sp:title">
<h6><xsl:value-of select="." /></h6>
<h6>
<xsl:value-of select="."/>
</h6>
</xsl:template>
<!-- Subtitle -->
<xsl:template match="op:uM/sp:sTitle">
<h2><xsl:value-of select="." /></h2>
<h2>
<xsl:value-of select="."/>
</h2>
</xsl:template>
<!-- Liscences -->
<xsl:template match="op:ueM/sp:info/op:info/sp:cc">
<meta name="rights" content="{.}" />
<meta name="rights" content="{.}"/>
</xsl:template>
<xsl:template match="op:uM/sp:info/op:info/sp:cc">
<div data-hdoc-type="rights">
<xsl:value-of select="." />
<xsl:value-of select="."/>
</div>
</xsl:template>
<!-- Keywords -->
<xsl:template match="op:ueM/sp:info/op:info/sp:keywds/op:keywds/sp:keywd">
<meta name="keywords" content="{.}" />
<meta name="keywords" content="{.}"/>
</xsl:template>
<xsl:template match="op:uM/sp:info/op:info/sp:keywds">
<div data-hdoc-type="tags">
<xsl:apply-templates select="./op:keywds/sp:keywd" />
<xsl:apply-templates select="./op:keywds/sp:keywd"/>
</div>
</xsl:template>
<xsl:template match="op:uM/sp:info/op:info/sp:keywds/op:keywds/sp:keywd">
<span><xsl:value-of select="." /></span>
<span>
<xsl:value-of select="."/>
</span>
</xsl:template>
<!-- Author -->
<xsl:template match="op:ueM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para">
<meta name="author" content="{.}" />
<meta name="author" content="{.}"/>
</xsl:template>
<xsl:template match="op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para">
<div data-hdoc-type="author">
<xsl:value-of select="." />
<xsl:value-of select="."/>
</div>
</xsl:template>
<!-- Division -->
<xsl:template match="/sc:item/*[namespace-uri()='utc.fr:ics/opale3' and local-name()='ue'][1]/*[namespace-uri()='http://www.utc.fr/ics/scenari/v3/primitive' and local-name()='div']">
<xsl:apply-templates select="./op:ueDiv/sp:courseUa|./op:ueDiv/sp:courseUc"/>
<xsl:template match="op:ue/sp:div | op:ueDiv/sp:div">
<section>
<header>
<xsl:apply-templates select="./op:ueDiv/op:ueDivM/sp:title"/>
<xsl:apply-templates
select="./op:ueDiv/op:ueDivM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"/>
<xsl:apply-templates select="./op:ueDiv/op:ueDivM/sp:info/op:info/sp:cc"/>
</header>
<!-- check for sub-division -->
<xsl:apply-templates select="./op:ueDiv/sp:div"/>
<!-- currently : grain & introduction & conclusion -->
<xsl:apply-templates select="./op:ueDiv/sp:intro"/>
<xsl:apply-templates select="./op:ueDiv/sp:courseUc"/>
<xsl:apply-templates select="./op:ueDiv/sp:conclu"/>
<footer>
<xsl:apply-templates select="./op:ueDiv/op:ueDivM/sp:info/op:info/sp:keywds"/>
</footer>
</section>
</xsl:template>
<!-- Activity -->
<xsl:template match="sp:courseUa">
<section>
<header>
<xsl:apply-templates select="./op:courseUa/op:uM/sp:title"/>
<xsl:apply-templates select="./op:courseUa/op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"/>
<xsl:apply-templates
select="./op:courseUa/op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"/>
<xsl:apply-templates select="./op:courseUa/op:uM/sp:info/op:info/sp:cc"/>
</header>
<!-- currently : grain & introduction & conclusion -->
<!-- <xsl:apply-templates select="./op:courseUa/child::*[name() != 'op:uM'][name() != 'sp:quest']"/>-->
<xsl:apply-templates select="./op:courseUa/sp:courseUc"/>
<xsl:apply-templates select="./op:courseUa/sp:obj"/>
<xsl:apply-templates select="./op:courseUa/sp:intro"/>
<xsl:apply-templates select="./op:courseUa/sp:courseUc"/>
<xsl:apply-templates select="./op:courseUa/sp:conclu"/>
<xsl:apply-templates select="./op:courseUa/sp:obj"/>
<!-- overview questions : regroup questions into a section-->
<xsl:if test="./op:courseUa/sp:quest">
<section>
......@@ -127,36 +150,39 @@
</header>
<!-- a conclusion has only a bloc -->
<div>
<xsl:apply-templates select="./op:courseUa/sp:quest" />
</div>
<xsl:apply-templates select="./op:courseUa/sp:quest"/>
</div>
</section>
</xsl:if>
<footer>
<xsl:apply-templates select="./op:courseUa/op:uM/sp:info/op:info/sp:keywds"/>
</footer>
</footer>
</section>
</xsl:template>
<!-- Grain -->
<xsl:template match="sp:courseUc">
<section>
<header>
<xsl:apply-templates select="./op:expUc/op:uM/sp:title"/>
<xsl:apply-templates select="./op:expUc/op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"/>
<xsl:apply-templates
select="./op:expUc/op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"/>
<xsl:apply-templates select="./op:expUc/op:uM/sp:info/op:info/sp:cc"/>
</header>
<!-- call for blocs and parts -->
<!-- <xsl:apply-templates select="./op:expUc/child::*[name() != 'op:uM']"/>-->
<!-- call for blocs -->
<xsl:apply-templates select="./op:expUc/sp:pb/op:pb/*"/>
<!-- call for parts -->
<xsl:apply-templates select="./op:expUc/sp:div"/>
<footer>
<xsl:apply-templates select="./op:expUc/op:uM/sp:info/op:info/sp:keywds"/>
</footer>
</footer>
</section>
</xsl:template>
<!-- Aims (aims don't have metadata) -->
<xsl:template match="sp:obj">
<section>
......@@ -165,10 +191,10 @@
</header>
<div>
<xsl:apply-templates select="./op:sTxt/*"/>
</div>
</div>
</section>
</xsl:template>
<!-- Introduction (a introduction doesn't have metadata) -->
<xsl:template match="sp:intro">
<section data-hdoc-type="introduction">
......@@ -178,10 +204,10 @@
<!-- a introduction has only a bloc -->
<div>
<xsl:apply-templates select="./op:res/*"/>
</div>
</div>
</section>
</xsl:template>
<!-- Conclusion (a conclusion doesn't have metadata) -->
<xsl:template match="sp:conclu">
<section data-hdoc-type="conclusion">
......@@ -191,288 +217,293 @@
<!-- a conclusion has only a bloc -->
<div>
<xsl:apply-templates select="./op:res/*"/>
</div>
</div>
</section>
</xsl:template>
<xsl:template match="sp:filtered">
<xsl:if test="op:filter/sp:exclude/text() = 'short'">
<xsl:apply-templates select="./op:res/*"/>
</xsl:if>
</xsl:template>
<!-- Overview questions (fr : question de synthèse) -->
<xsl:template match="sp:quest">
<xsl:apply-templates select="./op:txt/*"/>
</xsl:template>
<!-- Parts (of a Grain) -->
<xsl:template match="sp:div">
<xsl:template match="op:expUc/sp:div | op:expUcDiv/sp:div">
<section>
<header>
<!-- only title - parts don't have other metadata -->
<xsl:apply-templates select="./op:expUcDiv/op:expUcDivM/sp:title"/>
</header>
<!-- a part can contain blocs and other parts -->
<xsl:apply-templates select="./op:expUcDiv/child::*[name() != 'op:expUcDivM']"/>
<!-- call for blocs -->
<xsl:apply-templates select="./op:expUcDiv/sp:pb/op:pb/*"/>
<!-- call for parts -->
<xsl:apply-templates select="./op:expUcDiv/sp:div"/>
</section>
</xsl:template>
<!-- ***** BLOCS START ***** -->
<xsl:template match="sp:res[op:resInfoM/sp:index/text() = 'img']">
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"></xsl:variable>
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"/>
<img src="re/{$name}" alt="{$name}"/>
</xsl:template>
<xsl:template match="sp:res[op:resInfoM/sp:index/text() = 'graph']">
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"></xsl:variable>
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"/>
<object data="re/{$name}" type="application/vnd.oasis.opendocument.graphics"/>
</xsl:template>
<xsl:template match="sp:res[op:resInfoM/sp:index/text() = 'tab']">
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"></xsl:variable>
<xsl:variable name="name" select="tokenize(@sc:refUri, '/')[last()]"/>
<object data="re/{$name}" type="application/vnd.oasis.opendocument.spreadsheet"/>
</xsl:template>
<!-- content Information : no microformat -->
<xsl:template match="sp:pb/op:pb/sp:info">
<div>
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content definition : definition -->
<xsl:template match="sp:pb/op:pb/sp:def">
<div data-hdoc-type="definition">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content example : example -->
<xsl:template match="sp:pb/op:pb/sp:ex">
<div data-hdoc-type="example">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content remark : remark -->
<xsl:template match="sp:pb/op:pb/sp:rem">
<div data-hdoc-type="remark">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content advice : advice -->
<xsl:template match="sp:pb/op:pb/sp:adv">
<div data-hdoc-type="advice">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content warning : warning -->
<xsl:template match="sp:pb/op:pb/sp:warning">
<div data-hdoc-type="warning">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content complement : complement -->
<xsl:template match="sp:pb/op:pb/sp:comp">
<div data-hdoc-type="complement">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content method : advice -->
<xsl:template match="sp:pb/op:pb/sp:meth">
<div data-hdoc-type="advice">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- contenu review : complement -->
<xsl:template match="sp:pb/op:pb/sp:remind">
<div data-hdoc-type="complement">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content fondamental : emphasis -->
<xsl:template match="sp:pb/op:pb/sp:basic">
<div data-hdoc-type="emphasis">
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content syntax : no microformat (we lose this information) -->
<xsl:template match="sp:pb/op:pb/sp:syntax">
<div>
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- content legal : no microformat (we lose this information) -->
<xsl:template match="sp:pb/op:pb/sp:legal">
<div>
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<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) -->
<xsl:template match="sp:pb/op:pb/sp:simul">
<div>
<xsl:apply-templates select="./op:pbTi/sp:title" />
<xsl:apply-templates select="op:res/*" />
<xsl:apply-templates select="./op:pbTi/sp:title"/>
<xsl:apply-templates select="op:res/*"/>
</div>
</xsl:template>
<!-- ***** BLOCS END ***** -->
<!-- ***** TEXT START ***** -->
<!-- Simple text -->
<xsl:template match="op:res/sp:txt">
<xsl:apply-templates select="./op:txt/*" />
</xsl:template>
<!-- Paragraph -->
<xsl:template match="sc:para">
<p>
<xsl:apply-templates select="./* | ./text()" />
</p>
</xsl:template>
<!-- ***** PARAGRAPH ITEMS START ***** -->
<!-- citation -->
<xsl:template match="sc:para/sc:inlineStyle[@role='quote']" priority="2">
<q>
<xsl:value-of select="." />
</q>
</xsl:template>
<!-- important -->
<xsl:template match="sc:para/sc:inlineStyle[@role='emp']" priority="2">
<em>
<xsl:value-of select="." />
</em>
</xsl:template>
<!-- foreign term -->