Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
1fee33fc
Commit
1fee33fc
authored
Dec 12, 2016
by
Benoit Villain
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rajout de la tranformation d'une Division et d'une Partie de Grain (Opale_to_Hdoc)
parent
7217f262
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
282 additions
and
243 deletions
+282
-243
opale_to_hdoc/README.md
opale_to_hdoc/README.md
+8
-0
opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl
opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl
+274
-243
No files found.
opale_to_hdoc/README.md
View file @
1fee33fc
...
@@ -149,3 +149,11 @@ The opale_to_hdoc converter transcribes an Opale publication to a hdoc format. O
...
@@ -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
The source code converter is available and can be completed in order to
improve it and manage more Opale elements.
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.
opale_to_hdoc/xsl/opale_to_hdoc_regle2.xsl
View file @
1fee33fc
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<!-- Namespaces -->
<!-- Namespaces -->
<xsl:stylesheet
<xsl:stylesheet
xmlns=
"http://www.utc.fr/ics/hdoc/xhtml"
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"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes=
"xs"
version=
"2.0"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:op=
"utc.fr:ics/opale3"
>
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:template
match=
"sc:item"
>
<xsl:apply-templates/>
<xsl:apply-templates/>
...
@@ -44,63 +38,92 @@
...
@@ -44,63 +38,92 @@
<!-- Information -->
<!-- Information -->
<xsl:template
match=
"op:ueM/sp:info"
>
<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:keywds/op:keywds/sp:keywd"
/>
<xsl:apply-templates
select=
"op:info/sp:cc"
/>
<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:cpyrgt/op:sPara/sc:para"
/>
</xsl:template>
</xsl:template>
<!-- Titles -->
<!-- Titles -->
<xsl:template
match=
"op:uM/sp:title | op:expUcDivM/sp:title"
>
<xsl:template
match=
"op:uM/sp:title | op:expUcDivM/sp:title | op:ueDivM/sp:title"
>
<h1><xsl:value-of
select=
"."
/></h1>
<h1>
<xsl:value-of
select=
"."
/>
</h1>
</xsl:template>
</xsl:template>
<xsl:template
match=
"op:ueM/sp:title"
>
<xsl:template
match=
"op:ueM/sp:title"
>
<title><xsl:value-of
select=
"."
/></title>
<title>
<xsl:value-of
select=
"."
/>
</title>
</xsl:template>
</xsl:template>
<xsl:template
match=
"op:pbTi/sp:title"
>
<xsl:template
match=
"op:pbTi/sp:title"
>
<h6><xsl:value-of
select=
"."
/></h6>
<h6>
<xsl:value-of
select=
"."
/>
</h6>
</xsl:template>
</xsl:template>
<!-- Subtitle -->
<!-- Subtitle -->
<xsl:template
match=
"op:uM/sp:sTitle"
>
<xsl:template
match=
"op:uM/sp:sTitle"
>
<h2><xsl:value-of
select=
"."
/></h2>
<h2>
<xsl:value-of
select=
"."
/>
</h2>
</xsl:template>
</xsl:template>
<!-- Liscences -->
<!-- Liscences -->
<xsl:template
match=
"op:ueM/sp:info/op:info/sp:cc"
>
<xsl:template
match=
"op:ueM/sp:info/op:info/sp:cc"
>
<meta
name=
"rights"
content=
"{.}"
/>
<meta
name=
"rights"
content=
"{.}"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:cc"
>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:cc"
>
<div
data-hdoc-type=
"rights"
>
<div
data-hdoc-type=
"rights"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- Keywords -->
<!-- Keywords -->
<xsl:template
match=
"op:ueM/sp:info/op:info/sp:keywds/op:keywds/sp:keywd"
>
<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>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:keywds"
>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:keywds"
>
<div
data-hdoc-type=
"tags"
>
<div
data-hdoc-type=
"tags"
>
<xsl:apply-templates
select=
"./op:keywds/sp:keywd"
/>
<xsl:apply-templates
select=
"./op:keywds/sp:keywd"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:keywds/op:keywds/sp:keywd"
>
<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>
</xsl:template>
<!-- Author -->
<!-- Author -->
<xsl:template
match=
"op:ueM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"
>
<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>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"
>
<xsl:template
match=
"op:uM/sp:info/op:info/sp:cpyrgt/op:sPara/sc:para"
>
<div
data-hdoc-type=
"author"
>
<div
data-hdoc-type=
"author"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- Division -->
<!-- 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:template
match=
"op:ue/sp:div | op:ueDiv/sp:div"
>
<xsl:apply-templates
select=
"./op:ueDiv/sp:courseUa|./op:ueDiv/sp:courseUc"
/>
<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>
</xsl:template>
<!-- Activity -->
<!-- Activity -->
...
@@ -108,16 +131,16 @@
...
@@ -108,16 +131,16 @@
<section>
<section>
<header>
<header>
<xsl:apply-templates
select=
"./op:courseUa/op:uM/sp:title"
/>
<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"
/>
<xsl:apply-templates
select=
"./op:courseUa/op:uM/sp:info/op:info/sp:cc"
/>
</header>
</header>
<!-- currently : grain & introduction & conclusion -->
<!-- currently : grain & introduction & conclusion -->
<!-- <xsl:apply-templates select="./op:courseUa/child::*[name() != 'op:uM'][name() != 'sp:quest']"/>-->
<xsl:apply-templates
select=
"./op:courseUa/sp:obj"
/>
<xsl:apply-templates
select=
"./op:courseUa/sp:courseUc"
/>
<xsl:apply-templates
select=
"./op:courseUa/sp:intro"
/>
<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:conclu"
/>
<xsl:apply-templates
select=
"./op:courseUa/sp:obj"
/>
<!-- overview questions : regroup questions into a section-->
<!-- overview questions : regroup questions into a section-->
<xsl:if
test=
"./op:courseUa/sp:quest"
>
<xsl:if
test=
"./op:courseUa/sp:quest"
>
...
@@ -127,7 +150,7 @@
...
@@ -127,7 +150,7 @@
</header>
</header>
<!-- a conclusion has only a bloc -->
<!-- a conclusion has only a bloc -->
<div>
<div>
<xsl:apply-templates
select=
"./op:courseUa/sp:quest"
/>
<xsl:apply-templates
select=
"./op:courseUa/sp:quest"
/>
</div>
</div>
</section>
</section>
</xsl:if>
</xsl:if>
...
@@ -143,14 +166,17 @@
...
@@ -143,14 +166,17 @@
<section>
<section>
<header>
<header>
<xsl:apply-templates
select=
"./op:expUc/op:uM/sp:title"
/>
<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"
/>
<xsl:apply-templates
select=
"./op:expUc/op:uM/sp:info/op:info/sp:cc"
/>
</header>
</header>
<!-- call for blocs and parts -->
<!-- call for blocs -->
<!-- <xsl:apply-templates select="./op:expUc/child::*[name() != 'op:uM']"/>-->
<xsl:apply-templates
select=
"./op:expUc/sp:pb/op:pb/*"
/>
<xsl:apply-templates
select=
"./op:expUc/sp:pb/op:pb/*"
/>
<!-- call for parts -->
<xsl:apply-templates
select=
"./op:expUc/sp:div"
/>
<footer>
<footer>
<xsl:apply-templates
select=
"./op:expUc/op:uM/sp:info/op:info/sp:keywds"
/>
<xsl:apply-templates
select=
"./op:expUc/op:uM/sp:info/op:info/sp:keywds"
/>
</footer>
</footer>
...
@@ -207,15 +233,18 @@
...
@@ -207,15 +233,18 @@
</xsl:template>
</xsl:template>
<!-- Parts (of a Grain) -->
<!-- Parts (of a Grain) -->
<xsl:template
match=
"sp:div"
>
<xsl:template
match=
"
op:expUc/sp:div | op:expUcDiv/
sp:div"
>
<section>
<section>
<header>
<header>
<!-- only title - parts don't have other metadata -->
<!-- only title - parts don't have other metadata -->
<xsl:apply-templates
select=
"./op:expUcDiv/op:expUcDivM/sp:title"
/>
<xsl:apply-templates
select=
"./op:expUcDiv/op:expUcDivM/sp:title"
/>
</header>
</header>
<!-- a part can contain blocs and other parts -->
<!-- call for blocs -->
<xsl:apply-templates
select=
"./op:expUcDiv/child::*[name() != 'op:expUcDivM']"
/>
<xsl:apply-templates
select=
"./op:expUcDiv/sp:pb/op:pb/*"
/>
<!-- call for parts -->
<xsl:apply-templates
select=
"./op:expUcDiv/sp:div"
/>
</section>
</section>
</xsl:template>
</xsl:template>
...
@@ -224,110 +253,110 @@
...
@@ -224,110 +253,110 @@
<!-- ***** BLOCS START ***** -->
<!-- ***** BLOCS START ***** -->
<xsl:template
match=
"sp:res[op:resInfoM/sp:index/text() = 'img']"
>
<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}"
/>
<img
src=
"re/{$name}"
alt=
"{$name}"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"sp:res[op:resInfoM/sp:index/text() = 'graph']"
>
<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"
/>
<object
data=
"re/{$name}"
type=
"application/vnd.oasis.opendocument.graphics"
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"sp:res[op:resInfoM/sp:index/text() = 'tab']"
>
<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"
/>
<object
data=
"re/{$name}"
type=
"application/vnd.oasis.opendocument.spreadsheet"
/>
</xsl:template>
</xsl:template>
<!-- content Information : no microformat -->
<!-- content Information : no microformat -->
<xsl:template
match=
"sp:pb/op:pb/sp:info"
>
<xsl:template
match=
"sp:pb/op:pb/sp:info"
>
<div>
<div>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content definition : definition -->
<!-- content definition : definition -->
<xsl:template
match=
"sp:pb/op:pb/sp:def"
>
<xsl:template
match=
"sp:pb/op:pb/sp:def"
>
<div
data-hdoc-type=
"definition"
>
<div
data-hdoc-type=
"definition"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content example : example -->
<!-- content example : example -->
<xsl:template
match=
"sp:pb/op:pb/sp:ex"
>
<xsl:template
match=
"sp:pb/op:pb/sp:ex"
>
<div
data-hdoc-type=
"example"
>
<div
data-hdoc-type=
"example"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content remark : remark -->
<!-- content remark : remark -->
<xsl:template
match=
"sp:pb/op:pb/sp:rem"
>
<xsl:template
match=
"sp:pb/op:pb/sp:rem"
>
<div
data-hdoc-type=
"remark"
>
<div
data-hdoc-type=
"remark"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content advice : advice -->
<!-- content advice : advice -->
<xsl:template
match=
"sp:pb/op:pb/sp:adv"
>
<xsl:template
match=
"sp:pb/op:pb/sp:adv"
>
<div
data-hdoc-type=
"advice"
>
<div
data-hdoc-type=
"advice"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content warning : warning -->
<!-- content warning : warning -->
<xsl:template
match=
"sp:pb/op:pb/sp:warning"
>
<xsl:template
match=
"sp:pb/op:pb/sp:warning"
>
<div
data-hdoc-type=
"warning"
>
<div
data-hdoc-type=
"warning"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content complement : complement -->
<!-- content complement : complement -->
<xsl:template
match=
"sp:pb/op:pb/sp:comp"
>
<xsl:template
match=
"sp:pb/op:pb/sp:comp"
>
<div
data-hdoc-type=
"complement"
>
<div
data-hdoc-type=
"complement"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content method : advice -->
<!-- content method : advice -->
<xsl:template
match=
"sp:pb/op:pb/sp:meth"
>
<xsl:template
match=
"sp:pb/op:pb/sp:meth"
>
<div
data-hdoc-type=
"advice"
>
<div
data-hdoc-type=
"advice"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- contenu review : complement -->
<!-- contenu review : complement -->
<xsl:template
match=
"sp:pb/op:pb/sp:remind"
>
<xsl:template
match=
"sp:pb/op:pb/sp:remind"
>
<div
data-hdoc-type=
"complement"
>
<div
data-hdoc-type=
"complement"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content fondamental : emphasis -->
<!-- content fondamental : emphasis -->
<xsl:template
match=
"sp:pb/op:pb/sp:basic"
>
<xsl:template
match=
"sp:pb/op:pb/sp:basic"
>
<div
data-hdoc-type=
"emphasis"
>
<div
data-hdoc-type=
"emphasis"
>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content syntax : no microformat (we lose this information) -->
<!-- content syntax : no microformat (we lose this information) -->
<xsl:template
match=
"sp:pb/op:pb/sp:syntax"
>
<xsl:template
match=
"sp:pb/op:pb/sp:syntax"
>
<div>
<div>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content legal : no microformat (we lose this information) -->
<!-- content legal : no microformat (we lose this information) -->
<xsl:template
match=
"sp:pb/op:pb/sp:legal"
>
<xsl:template
match=
"sp:pb/op:pb/sp:legal"
>
<div>
<div>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
<!-- content simulation : no microformat (we lose this information) -->
<!-- content simulation : no microformat (we lose this information) -->
<xsl:template
match=
"sp:pb/op:pb/sp:simul"
>
<xsl:template
match=
"sp:pb/op:pb/sp:simul"
>
<div>
<div>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"./op:pbTi/sp:title"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
<xsl:apply-templates
select=
"op:res/*"
/>
</div>
</div>
</xsl:template>
</xsl:template>
...
@@ -337,13 +366,13 @@
...
@@ -337,13 +366,13 @@
<!-- Simple text -->
<!-- Simple text -->
<xsl:template
match=
"op:res/sp:txt"
>
<xsl:template
match=
"op:res/sp:txt"
>
<xsl:apply-templates
select=
"./op:txt/*"
/>
<xsl:apply-templates
select=
"./op:txt/*"
/>
</xsl:template>
</xsl:template>
<!-- Paragraph -->
<!-- Paragraph -->
<xsl:template
match=
"sc:para"
>
<xsl:template
match=
"sc:para"
>
<p>
<p>
<xsl:apply-templates
select=
"./* | ./text()"
/>
<xsl:apply-templates
select=
"./* | ./text()"
/>
</p>
</p>
</xsl:template>
</xsl:template>
...
@@ -352,52 +381,52 @@
...
@@ -352,52 +381,52 @@
<!-- citation -->
<!-- citation -->
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='quote']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='quote']"
priority=
"2"
>
<q>
<q>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</q>
</q>
</xsl:template>
</xsl:template>
<!-- important -->
<!-- important -->
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='emp']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='emp']"
priority=
"2"
>
<em>
<em>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</em>
</em>
</xsl:template>
</xsl:template>
<!-- foreign term -->
<!-- foreign term -->
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='spec']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='spec']"
priority=
"2"
>
<i>
<i>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</i>
</i>
</xsl:template>
</xsl:template>
<!-- syntax -->
<!-- syntax -->
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='code']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:inlineStyle[@role='code']"
priority=
"2"
>
<span
data-hdoc-type=
"syntax"
>
<span
data-hdoc-type=
"syntax"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</span>
</span>
</xsl:template>
</xsl:template>
<xsl:template
match=
"sc:para/sc:uLink"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:uLink"
priority=
"2"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</xsl:template>
</xsl:template>
<!-- exponent -->
<!-- exponent -->
<xsl:template
match=
"sc:para/sc:textLeaf[@role='exp']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:textLeaf[@role='exp']"
priority=
"2"
>
<sup>
<sup>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</sup>
</sup>
</xsl:template>
</xsl:template>
<!-- subscript -->
<!-- subscript -->
<xsl:template
match=
"sc:para/sc:textLeaf[@role='ind']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:textLeaf[@role='ind']"
priority=
"2"
>
<sub>
<sub>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</sub>
</sub>
</xsl:template>
</xsl:template>
<!-- latex -->
<!-- latex -->
<xsl:template
match=
"sc:para/sc:textLeaf[@role='mathtex']"
priority=
"2"
>
<xsl:template
match=
"sc:para/sc:textLeaf[@role='mathtex']"
priority=
"2"
>
<span
data-hdoc-type=
"latex"
>
<span
data-hdoc-type=
"latex"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</span>
</span>
</xsl:template>
</xsl:template>
<!-- default behaviour for other balises -->
<!-- default behaviour for other balises -->
<xsl:template
match=
"sc:para/sc:inlineStyle|sc:para/sc:textLeaf"
priority=
"1"
>
<xsl:template
match=
"sc:para/sc:inlineStyle|sc:para/sc:textLeaf"
priority=
"1"
>
<xsl:value-of
select=
"."
/>
<xsl:value-of
select=
"."
/>
</xsl:template>
</xsl:template>
<xsl:template
match=
"sc:para/sc:phrase[@role='url']"
>
<xsl:template
match=
"sc:para/sc:phrase[@role='url']"
>
...
@@ -405,7 +434,9 @@
...
@@ -405,7 +434,9 @@
</xsl:template>
</xsl:template>
<xsl:template
match=
"op:urlM/sp:url"
>
<xsl:template
match=
"op:urlM/sp:url"
>
<a
href=
"{text()}"
><xsl:value-of
select=
"text()"
></xsl:value-of></a>
<a
href=
"{text()}"
>
<xsl:value-of
select=
"text()"
/>
</a>
</xsl:template>
</xsl:template>
<!-- ***** PARAGRAPH ITEMS END ***** -->
<!-- ***** PARAGRAPH ITEMS END ***** -->
...
@@ -413,14 +444,14 @@
...
@@ -413,14 +444,14 @@
<!-- List-->
<!-- List-->
<xsl:template
match=
"sc:itemizedList"
>
<xsl:template
match=
"sc:itemizedList"
>
<ul>
<ul>
<xsl:apply-templates
select=
"./sc:listItem"
/>
<xsl:apply-templates
select=
"./sc:listItem"
/>
</ul>
</ul>
</xsl:template>
</xsl:template>
<!-- Ordered list -->
<!-- Ordered list -->
<xsl:template
match=
"sc:orderedList"
>
<xsl:template
match=
"sc:orderedList"
>
<ol>
<ol>
<xsl:apply-templates
select=
"./sc:listItem"
/>
<xsl:apply-templates
select=
"./sc:listItem"
/>
</ol>
</ol>
</xsl:template>
</xsl:template>
...
@@ -429,7 +460,7 @@
...
@@ -429,7 +460,7 @@