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
f02f1e91
Commit
f02f1e91
authored
Dec 15, 2016
by
Baptiste Montange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xslt sections
parent
13d565d4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
15 deletions
+81
-15
hdoc_to_basex/hdoc_to_basex.ant
hdoc_to_basex/hdoc_to_basex.ant
+3
-4
hdoc_to_basex/input/sample.hdoc
hdoc_to_basex/input/sample.hdoc
+0
-0
hdoc_to_basex/xsl/transformation.xsl
hdoc_to_basex/xsl/transformation.xsl
+78
-11
opale_to_hdoc/input/sample.scar
opale_to_hdoc/input/sample.scar
+0
-0
No files found.
hdoc_to_basex/hdoc_to_basex.ant
View file @
f02f1e91
...
...
@@ -14,7 +14,7 @@
<echo
message=
"DEBUT"
/>
<delete
dir=
"${tmp}"
failonerror=
"false"
/>
<mkdir
dir=
"${tmp}"
/>
<delete
dir=
"${out}"
failonerror=
"false"
/>
...
...
@@ -43,7 +43,6 @@
</antcall>
<echo
message=
"FIN"
/>
</sequential>
</for>
</target>
...
...
@@ -56,13 +55,13 @@
</target>
<target
name=
"content"
>
<xslt
in=
"${tmp}/${filename}/decompressedHdoc/content.xml"
out=
"${out}/${filename}
/${filename}
_data.xml"
style=
"${xsl}/transformation.xsl"
processor=
"org.apache.tools.ant.taskdefs.optional.TraXLiaison"
>
<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"
/
>
<!-- <delete dir="${tmp}" failonerror="false"/>--
>
</target>
...
...
hdoc_to_basex/input/sample.hdoc
deleted
100644 → 0
View file @
13d565d4
File deleted
hdoc_to_basex/xsl/transformation.xsl
View file @
f02f1e91
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:h=
"http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes=
"xs"
version=
"2.0"
>
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
xmlns:h=
"http://www.utc.fr/ics/hdoc/xhtml"
exclude-result-prefixes=
"xs"
version=
"2.0"
>
<xsl:template
match=
"h:html"
>
<xsl:apply-templates
mode=
"title"
/>
</xsl:template>
<xsl:template
match=
"h:head"
mode=
"title"
>
<titre>
<xsl:value-of
select=
"./h:title"
/>
</titre>
<xsl:apply-templates
select=
"./h:meta"
/>
</xsl:template>
<xsl:template
match=
"h:html"
>
<xsl:apply-templates
mode=
"title"
></xsl:apply-templates>
</xsl:template>
<xsl:template
match=
"h:meta[@name='author']"
>
<authors>
<xsl:for-each
select=
"tokenize(@content,', \d')"
>
<xsl:if
test=
"position() = 1"
>
<xsl:for-each
select=
"tokenize(.,', ')"
>
<author>
<xsl:value-of
select=
"."
/>
</author>
</xsl:for-each>
</xsl:if>
</xsl:for-each>
</authors>
</xsl:template>
<xsl:template
match=
"h:body"
mode=
"title"
>
<sections>
<xsl:apply-templates
select=
"./h:section"
/>
</sections>
</xsl:template>
<xsl:template
match=
"h:head"
mode=
"title"
>
<titre><xsl:value-of
select=
"./h:title"
/></titre>
<xsl:template
match=
"h:section"
>
<section>
<titresection>
<xsl:value-of
select=
"./h:header/h:h1"
/>
</titresection>
<contenu>
<paragraphes>
<xsl:apply-templates
select=
"h:div"
/>
</paragraphes>
<xsl:apply-templates
select=
"h:section"
mode=
"soussect"
/>
</contenu>
</section>
</xsl:template>
<xsl:template
match=
"h:section"
mode=
"soussect"
>
<soussection></soussection>
</xsl:template>
<xsl:template
match=
"h:body"
></xsl:template>
<xsl:template
match=
"h:div"
>
<xsl:if
test=
"h:p"
>
<paragraphe>
<xsl:value-of
select=
"."
/>
</paragraphe>
</xsl:if>
<xsl:if
test=
"h:ul"
>
<xsl:apply-templates
select=
"h:ul"
></xsl:apply-templates>
</xsl:if>
</xsl:template>
<xsl:template
match=
"h:ul"
>
<xsl:for-each
select=
"h:li"
>
<paragraphe>
<xsl:value-of
select=
"h:p"
/>
</paragraphe>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
</xsl:stylesheet>
opale_to_hdoc/input/sample.scar
deleted
100644 → 0
View file @
13d565d4
File deleted
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment