Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
1fa4b6a6
Commit
1fa4b6a6
authored
Jan 07, 2016
by
Mar60
Browse files
hdoc_to_lexique fix
parent
ce65a3f3
Changes
4
Hide whitespace changes
Inline
Side-by-side
hdoc_to_lexique/hdoc_to_lexique.ant
View file @
1fa4b6a6
...
...
@@ -47,10 +47,10 @@
</target>
<target name="clean" depends="buildContainer">
<delete file="get_content.ant"/>
<!--
<delete file="get_content.ant"/>
<delete file="get_ressources.ant"/>
<delete dir="${srcdir}" />
<delete dir="${outdir}" />
<delete dir="${outdir}" />
-->
</target>
</project>
\ No newline at end of file
hdoc_to_lexique/input/sample.zip
View file @
1fa4b6a6
No preview for this file type
hdoc_to_lexique/xsl/transfo.xsl
View file @
1fa4b6a6
...
...
@@ -10,54 +10,42 @@
<xsl:output
method=
"xml"
indent=
"yes"
/>
<xsl:template
match=
"/"
>
<sc:item
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<lx:term
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:lx=
"scpf.org:lexicon"
>
<lx:termM>
<sp:name><xsl:value-of
select=
"hodoc:html/hodoc:body/hodoc:h2[@span='titre_def']"
></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<xsl:apply-templates
select=
"hodoc:html/hodoc:body/hodoc:p[@span='def_content']"
></xsl:apply-templates>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
<xsl:apply-templates
select=
"./hodoc:html/hodoc:body"
/>
</xsl:template>
<xsl:template
match=
"hodoc:p[@span='def_content']"
>
<xsl:value-of
select=
"."
/>
<xsl:template
match=
"hodoc:section"
>
<xsl:result-document
href=
"{hodoc:header/hodoc:h1}.term"
encoding=
"UTF-8"
>
<!--TODO change name of the file-->
<sc:item
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:lx=
"scpf.org:lexicon"
xmlns:file=
"java.io.File"
>
<lx:term
>
<lx:termM>
<sp:name><xsl:value-of
select=
"hodoc:header/hodoc:h1"
></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<sc:para
xml:space=
"preserve"
sc:id=
"t7"
><xsl:apply-templates
select=
"hodoc:div/hodoc:p[@span='def_content']/hodoc:p[@class='def_text']"
></xsl:apply-templates></sc:para>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
</xsl:result-document>
</xsl:template>
<xsl:template
match=
"hodoc:p[@class='def_text']"
>
<xsl:value-of
select=
"./text()"
/>
<!--
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>-->
</xsl:template>
<!-- <xsl:template match="/hodoc:html/hodoc:body">
<xsl:for-each select="/hodoc:html/hodoc:body/hodoc:section">
<xsl:result-document href="section{position()}.html"> TODO change name of the file
<sc:item xmlns:sc="http://www.utc.fr/ics/scenari/v3/core">
<lx:term xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive" xmlns:lx="scpf.org:lexicon">
<lx:termM>
<sp:name><xsl:value-of select="hodoc:h2[@span='titre_def']"></xsl:value-of></sp:name>
</lx:termM>
<sp:def>
<lx:definition>
<sp:desc>
<lx:defTxt>
<xsl:apply-templates select="hodoc:p[@span='def_content']"></xsl:apply-templates>
</lx:defTxt>
</sp:desc>
</lx:definition>
</sp:def>
</lx:term>
</sc:item>
</xsl:result-document>
</xsl:for-each>
</xsl:template>-->
</xsl:stylesheet>
lexique_to_hdoc/run.bat
View file @
1fa4b6a6
@echo
off
set
lib
=
lib
<<<<<<<
HEAD
set
ant
=
lexique_to_hdoc
.ant
=======
set
ant
=
lexique_to_opale
.ant
>>>>>>>
e6164602e4169b2cb7eaf6215434ae0ed8be47a3
set
antparam
=
-Dprogram
.param
=
%
1
set
scJarList
=
%lib%
\
*
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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