Skip to content
GitLab
Menu
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
8746e1a1
Commit
8746e1a1
authored
Nov 30, 2015
by
Ivan D'halluin
Browse files
import last semester project
parents
Changes
334
Hide whitespace changes
Inline
Side-by-side
hdoc_to_opale/addCourseUcIds.xsl
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h=
"http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"1.0"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
xmlns:op=
"utc.fr:ics/opale3"
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output
method=
"xml"
indent=
"yes"
encoding=
"UTF-8"
/>
<xsl:template
match=
"@*|node()"
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
</xsl:template>
<xsl:template
name=
"string-to-lowercase"
>
<xsl:param
name=
"lcletters"
>
abcdefghijklmnopqrstuvwxyzeeeeaaaa
</xsl:param>
<xsl:param
name=
"ucletters"
>
ABCDEFGHIJKLMNOPQRSTUVWXYZéèêëàâàá
</xsl:param>
<xsl:param
name=
"text"
/>
<xsl:value-of
select=
"translate($text,$ucletters,$lcletters)"
/>
</xsl:template>
<xsl:template
name=
"string-to-slug"
>
<xsl:param
name=
"text"
select=
"''"
/>
<xsl:variable
name=
"dodgyChars"
select=
"' ,.#_-!?*:;=+ /(){}\|'"
/>
<xsl:variable
name=
"replacementChar"
select=
"'--------------------'"
/>
<xsl:variable
name=
"oneline"
>
<xsl:value-of
select=
"normalize-space(translate($text,' ',''))"
/>
</xsl:variable>
<xsl:variable
name=
"lowercased"
><xsl:call-template
name=
"string-to-lowercase"
><xsl:with-param
name=
"text"
select=
"$oneline"
/></xsl:call-template></xsl:variable>
<xsl:variable
name=
"escaped"
><xsl:value-of
select=
"translate( $lowercased, $dodgyChars, $replacementChar )"
/></xsl:variable>
<xsl:variable
name=
"cleaned"
>
<xsl:call-template
name=
"string-replace-caller"
>
<xsl:with-param
name=
"text"
select=
"$escaped"
/>
<xsl:with-param
name=
"replace"
select=
"'---'"
/>
<xsl:with-param
name=
"by"
select=
"'-'"
/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of
select=
"$cleaned"
/>
</xsl:template>
<xsl:template
name=
"string-replace-all"
>
<xsl:param
name=
"text"
/>
<xsl:param
name=
"replace"
/>
<xsl:param
name=
"by"
/>
<xsl:choose>
<xsl:when
test=
"contains($text,$replace)"
>
<xsl:value-of
select=
"substring-before($text,$replace)"
/>
<xsl:value-of
select=
"$by"
/>
<xsl:call-template
name=
"string-replace-all"
>
<xsl:with-param
name=
"text"
select=
"substring-after($text,$replace)"
/>
<xsl:with-param
name=
"replace"
select=
"$replace"
/>
<xsl:with-param
name=
"by"
select=
"$by"
/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"$text"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
name=
"string-replace-caller"
>
<xsl:param
name=
"text"
/>
<xsl:param
name=
"replace"
/>
<xsl:param
name=
"by"
/>
<xsl:variable
name=
"changed"
>
<xsl:choose>
<xsl:when
test=
"contains($text,$replace)"
>
<xsl:call-template
name=
"string-replace-all"
>
<xsl:with-param
name=
"text"
select=
"$text"
/>
<xsl:with-param
name=
"replace"
select=
"$replace"
/>
<xsl:with-param
name=
"by"
select=
"$by"
/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"$text"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<xsl:choose>
<xsl:when
test=
"contains($changed,$replace)"
>
<xsl:call-template
name=
"string-replace-caller"
>
<xsl:with-param
name=
"text"
select=
"$changed"
/>
<xsl:with-param
name=
"replace"
select=
"$replace"
/>
<xsl:with-param
name=
"by"
select=
"$by"
/>
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select=
"$changed"
/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"sp:courseUc"
>
<sp:courseUc>
<xsl:variable
name=
"slug"
>
<xsl:call-template
name=
"string-to-slug"
>
<xsl:with-param
name=
"text"
select=
"op:expUc/op:uM/sp:title"
/>
</xsl:call-template>
</xsl:variable>
<xsl:variable
name=
"id"
>
<xsl:value-of
select=
"count(preceding::sp:courseUc)+1"
/>
<xsl:text>
-
</xsl:text>
<xsl:value-of
select=
"$slug"
/>
</xsl:variable>
<xsl:attribute
name=
"data-export-id"
>
<xsl:text>
uoc-
</xsl:text>
<xsl:value-of
select=
"$id"
/>
</xsl:attribute>
<xsl:attribute
name=
"data-export-file"
>
unit-
<xsl:value-of
select=
"$id"
/>
.xml
</xsl:attribute>
<xsl:apply-templates
select=
"@*|node()"
/>
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_opale/addCourseUcReferences.xsl
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:h=
"http://www.utc.fr/ics/hdoc/xhtml"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"1.0"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
xmlns:op=
"utc.fr:ics/opale3"
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
>
<xsl:output
method=
"xml"
indent=
"yes"
encoding=
"UTF-8"
/>
<xsl:template
match=
"@*|node()"
>
<xsl:copy>
<xsl:apply-templates
select=
"@*|node()"
/>
</xsl:copy>
</xsl:template>
<xsl:template
match=
"sp:courseUc"
>
<sp:courseUc>
<xsl:attribute
name=
"sc:refUri"
>
<xsl:value-of
select=
"@data-export-file"
/>
</xsl:attribute>
</sp:courseUc>
</xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_opale/bibtex_to_opale/.wspmeta
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8" ?>
<wspType
defaultCode=
"Opale"
title=
"Opale Advanced 3.5 (fr-FR)"
description=
""
uri=
"Opale3-5_fr-FR_005"
key=
"Opale3-5"
lang=
"fr-FR"
version=
"3.5.005"
><wspUpdate
localAutoUpdate=
"minor"
><res
key=
"Opale3-5.wsp"
/></wspUpdate><systemSpace
space=
"~param/Opale3-5/ss"
><res
key=
"Opale3-5.ss"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/bs"
optional=
"true"
><res
key=
"Opale3-5.bs"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/web"
><res
key=
"Opale3-5.gen.web"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/scormMono"
><res
key=
"Opale3-5.gen.scormMono"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/scormMulti"
><res
key=
"Opale3-5.gen.scormMulti"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/paper"
><res
key=
"Opale3-5.gen.paper"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/pres"
><res
key=
"Opale3-5.gen.pres"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewPresShort"
><res
key=
"Opale3-5.gen.previewPresShort"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewPresStandard"
><res
key=
"Opale3-5.gen.previewPresStandard"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebStandard"
><res
key=
"Opale3-5.gen.previewWebStandard"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebShort"
><res
key=
"Opale3-5.gen.previewWebShort"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebStandardComments"
><res
key=
"Opale3-5.gen.previewWebStandardComments"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebShortComments"
><res
key=
"Opale3-5.gen.previewWebShortComments"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packScorm12"
><res
key=
"Opale3-5.gen.packScorm12"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packScorm2k4"
><res
key=
"Opale3-5.gen.packScorm2k4"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packClaroline"
><res
key=
"Opale3-5.gen.packClaroline"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packGanesha"
><res
key=
"Opale3-5.gen.packGanesha"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packMoodle"
><res
key=
"Opale3-5.gen.packMoodle"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packSyfadis"
><res
key=
"Opale3-5.gen.packSyfadis"
/></systemSpace><editionSheet
pack=
"Opale3-5_fr-FR_005"
brickSelector=
"{Opale3-5.moz;3.5.005;fr-FR}"
/></wspType>
\ No newline at end of file
hdoc_to_opale/bibtex_to_opale/Ant/.wspmeta
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8" ?>
<wspType
defaultCode=
"Opale"
title=
"Opale Advanced 3.5 (fr-FR)"
description=
""
uri=
"Opale3-5_fr-FR_005"
key=
"Opale3-5"
lang=
"fr-FR"
version=
"3.5.005"
><wspUpdate
localAutoUpdate=
"minor"
><res
key=
"Opale3-5.wsp"
/></wspUpdate><systemSpace
space=
"~param/Opale3-5/ss"
><res
key=
"Opale3-5.ss"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/bs"
optional=
"true"
><res
key=
"Opale3-5.bs"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/web"
><res
key=
"Opale3-5.gen.web"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/scormMono"
><res
key=
"Opale3-5.gen.scormMono"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/scormMulti"
><res
key=
"Opale3-5.gen.scormMulti"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/paper"
><res
key=
"Opale3-5.gen.paper"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/pres"
><res
key=
"Opale3-5.gen.pres"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewPresShort"
><res
key=
"Opale3-5.gen.previewPresShort"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewPresStandard"
><res
key=
"Opale3-5.gen.previewPresStandard"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebStandard"
><res
key=
"Opale3-5.gen.previewWebStandard"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebShort"
><res
key=
"Opale3-5.gen.previewWebShort"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebStandardComments"
><res
key=
"Opale3-5.gen.previewWebStandardComments"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/previewWebShortComments"
><res
key=
"Opale3-5.gen.previewWebShortComments"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packScorm12"
><res
key=
"Opale3-5.gen.packScorm12"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packScorm2k4"
><res
key=
"Opale3-5.gen.packScorm2k4"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packClaroline"
><res
key=
"Opale3-5.gen.packClaroline"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packGanesha"
><res
key=
"Opale3-5.gen.packGanesha"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packMoodle"
><res
key=
"Opale3-5.gen.packMoodle"
/></systemSpace><systemSpace
space=
"~param/Opale3-5/gen/packSyfadis"
><res
key=
"Opale3-5.gen.packSyfadis"
/></systemSpace><editionSheet
pack=
"Opale3-5_fr-FR_005"
brickSelector=
"{Opale3-5.moz;3.5.005;fr-FR}"
/></wspType>
\ No newline at end of file
hdoc_to_opale/bibtex_to_opale/Ant/bibtex_to_opale.ant
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8"?>
<project
basedir=
".."
name=
"main"
default=
"convert"
>
<property
name=
"InputPath"
value=
"bib2.bib"
></property>
<property
name=
"OutputPath"
value=
"${basedir}\result\ref.scar"
></property>
<target
name=
"convert"
>
<antcall
target=
"preparation"
/>
<antcall
target=
"BibtexToBibXml"
/>
<antcall
target=
"BibXmlToHdocBib"
/>
<antcall
target=
"HdocToOpale"
/>
<antcall
target=
"zip"
/>
<antcall
target=
"CleanDirectory"
/>
</target>
<target
name=
"convertfrombibxml"
>
<antcall
target=
"preparation"
/>
<antcall
target=
"HdocToOpale"
/>
<antcall
target=
"zip"
/>
<antcall
target=
"CleanDirectory"
/>
</target>
<target
name=
"preparation"
>
<delete
dir=
"${basedir}/result"
></delete>
<mkdir
dir=
"${basedir}/result"
></mkdir>
<mkdir
dir=
"${basedir}/decompressedOpale"
></mkdir>
<mkdir
dir=
"${basedir}/decompressedOpale/ref"
></mkdir>
<mkdir
dir=
"${basedir}/tmp"
></mkdir>
</target>
<target
name=
"CleanDirectory"
>
<delete
dir=
"${basedir}/tmp"
></delete>
<delete
dir=
"${basedir}/java"
></delete>
<delete
dir=
"${basedir}/decompressedOpale"
></delete>
</target>
<target
name=
"BibtexToBibXml"
>
<!-- Convert Bibtex into BibtexXml -->
<java
fork=
"true"
failonerror=
"true"
jar=
"lib/bibtex.jar"
>
<arg
value=
"${InputPath}"
/>
<arg
value=
"${basedir}/tmp"
/>
<arg
value=
"/tmpBibXml.xml"
/>
</java>
</target>
<target
name=
"BibXmlToHdocBib"
>
<!-- Convert from BibXlm to HdocBib -->
<xslt
classpath=
"${basedir}/lib/saxon9he.jar"
in=
"${basedir}\tmp\tmpBibXml.xml"
out=
"${basedir}\tmp\tmpHdocBib.xml"
xslresource=
"${basedir}/XSL/BibToHdoc.xsl"
></xslt>
</target>
<target
name=
"HdocToOpale"
>
<!-- Convert from HdocBib to Opale -->
<xslt
in=
"${basedir}\tmp\tmpHdocBib.xml"
out=
"${basedir}/tmp/tempHdoc.xml"
xslresource=
"${basedir}/XSL/SeparateXmlt.xsl"
>
<param
name=
"in"
expression=
"${basedir}\tmp\tmpHdocBib.xml"
></param>
<param
name=
"out"
expression=
"${basedir}\decompressedOpale\ref"
></param>
</xslt>
<ant
antfile=
"${basedir}/tmp/tempHdoc.xml"
/>
</target>
<target
name=
"zip"
>
<chmod
dir=
"${basedir}/decompressedOpale"
perm=
"777"
></chmod>
<copy
file=
".wspmeta"
todir=
"${basedir}/decompressedOpale"
/>
<zip
basedir=
"decompressedOpale"
destfile=
"${OutputPath}"
encoding=
"UTF-8"
/>
<chmod
dir=
"${OutputPath}"
perm=
"777"
/>
</target>
</project>
\ No newline at end of file
hdoc_to_opale/bibtex_to_opale/XSL/BibToHdoc.xsl
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="iso-8859-1"?>
<!-- This sheet replaces the url of a namespace where needed -->
<xsl:stylesheet
version=
"1.0"
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:oldmods=
"http://bibtexml.sf.net/"
xmlns:myns=
"http://www.utc.fr/ics/hdoc/bibtexXm"
>
<xsl:template
match=
"node()|@*"
priority=
"3"
>
<xsl:copy>
<xsl:apply-templates
select=
"node()|@*"
>
</xsl:apply-templates></xsl:copy>
</xsl:template>
<xsl:template
match=
"
oldmods:file | oldmods:entry |
oldmods:entry/oldmods:article | oldmods:entry/oldmods:book | oldmods:entry/oldmods:booklet | oldmods:entry/oldmods:conference |
oldmods:entry/oldmods:manual | oldmods:entry/oldmods:techreport | oldmods:entry/oldmods:mastersthesis |
oldmods:entry/oldmods:phdthesis | oldmods:entry/oldmods:inbook | oldmods:entry/oldmods:incollection |
oldmods:entry/oldmods:proceedings | oldmods:entry/oldmods:unpublished | oldmods:entry/oldmods:misc |
oldmods:article/oldmods:title | oldmods:article/oldmods:author | oldmods:article/oldmods:journal |
oldmods:article/oldmods:volume | oldmods:article/oldmods:number | oldmods:article/oldmods:pages |
oldmods:book/oldmods:author | oldmods:book/oldmods:editor | oldmods:book/oldmods:title |
oldmods:book/oldmods:publisher | oldmods:book/oldmods:volume | oldmods:book/oldmods:number |
oldmods:book/oldmods:series | oldmods:book/oldmods:address | oldmods:book/oldmods:edition |
oldmods:booklet/oldmods:title | oldmods:booklet/oldmods:author | oldmods:booklet/oldmods:howpublished |
oldmods:booklet/oldmods:address | oldmods:booklet/oldmods:key | oldmods:booklet/oldmods:howpublished |
oldmods:book/oldmods:adress | oldmods:book/oldmods:month | oldmods:book/oldmods:year |
oldmods:inbook/oldmods:chapter | oldmods:inbook/oldmods:pages | oldmods:inbook/oldmods:publisher |
oldmods:inbook/oldmods:series | oldmods:inbook/oldmods:type | oldmods:inbook/oldmods:address |
oldmods:inbook/oldmods:edition |
oldmods:manual/oldmods:title | oldmods:manual/oldmods:author | oldmods:manual/oldmods:editor | oldmods:manual/oldmods:volume |
oldmods:manual/oldmods:number | oldmods:manual/oldmods:series | oldmods:manual/oldmods:pages | oldmods:manual/oldmods:organization |
oldmods:manual/oldmods:address | oldmods:manual/oldmods:edition | oldmods:manual/oldmods:key |
oldmods:techreport/oldmods:author | oldmods:techreport/oldmods:title | oldmods:techreport/oldmods:institution |
oldmods:techreport/oldmods:type | oldmods:techreport/oldmods:number | oldmods:techreport/oldmods:address |
oldmods:techreport/oldmods:key |
oldmods:mastersthesis/oldmods:author | oldmods:mastersthesis/oldmods:title |
oldmods:mastersthesis/oldmods:school | oldmods:mastersthesis/oldmods:year | oldmods:mastersthesis/oldmods:type |
oldmods:mastersthesis/oldmods:address | oldmods:mastersthesis/oldmods:key |
oldmods:phdthesis/oldmods:author | oldmods:phdthesis/oldmods:title |
oldmods:phdthesis/oldmods:school | oldmods:phdthesis/oldmods:year | oldmods:phdthesis/oldmods:type |
oldmods:phdthesis/oldmods:address | oldmods:phdthesis/oldmods:key |
oldmods:inbook/oldmods:author | oldmods:inbook/oldmods:editor | oldmods:inbook/oldmods:title |
oldmods:inbook/oldmods:chapter | oldmods:inbook/oldmods:pages | oldmods:inbook/oldmods:publisher |
oldmods:inbook/oldmods:volume | oldmods:inbook/oldmods:number | oldmods:inbook/oldmods:series |
oldmods:inbook/oldmods:type | oldmods:inbook/oldmods:address | oldmods:inbook/oldmods:edition | oldmods:inbook/oldmods:key |
oldmods:incollection/oldmods:author | oldmods:incollection/oldmods:title | oldmods:incollection/oldmods:booktitle |
oldmods:incollection/oldmods:publisher | oldmods:incollection/oldmods:editor | oldmods:incollection/oldmods:volume |
oldmods:incollection/oldmods:number | oldmods:incollection/oldmods:series | oldmods:incollection/oldmods:type |
oldmods:incollection/oldmods:chapter | oldmods:incollection/oldmods:pages | oldmods:incollection/oldmods:address |
oldmods:incollection/oldmods:edition | oldmods:incollection/oldmods:key |
oldmods:proceedings/oldmods:title | oldmods:proceedings/oldmods:year | oldmods:proceedings/oldmods:editor |
oldmods:proceedings/oldmods:volume | oldmods:proceedings/oldmods:number | oldmods:proceedings/oldmods:series |
oldmods:proceedings/oldmods:address | oldmods:proceedings/oldmods:publisher | oldmods:proceedings/oldmods:organization |
oldmods:proceedings/oldmods:key |
oldmods:unpublished/oldmods:author | oldmods:unpublished/oldmods:title | oldmods:unpublished/oldmods:howpublished |
oldmods:unpublished/oldmods:key |
oldmods:misc/oldmods:author | oldmods:misc/oldmods:title | oldmods:misc/oldmods:howpublished |
oldmods:misc/oldmods:key |
oldmods:conference/oldmods:author | oldmods:conference/oldmods:title | oldmods:conference/oldmods:booktitle |
oldmods:conference/oldmods:editor | oldmods:conference/oldmods:volume | oldmods:conference/oldmods:number |
oldmods:conference/oldmods:series | oldmods:conference/oldmods:pages | oldmods:conference/oldmods:address |
oldmods:conference/oldmods:organization | oldmods:conference/oldmods:publisher | oldmods:conference/oldmods:key |
oldmods:inproceedings/oldmods:author | oldmods:inproceedings/oldmods:title | oldmods:inproceedings/oldmods:booktitle |
oldmods:inproceedings/oldmods:editor | oldmods:inproceedings/oldmods:volume | oldmods:inproceedings/oldmods:number |
oldmods:inproceedings/oldmods:series | oldmods:inproceedings/oldmods:pages | oldmods:inproceedings/oldmods:address |
oldmods:inproceedings/oldmods:organization | oldmods:inproceedings/oldmods:publisher | oldmods:inproceedings/oldmods:key |
*/oldmods:month | */oldmods:year | */oldmods:url"
priority=
"5"
>
<xsl:element
name=
"myns:{local-name()}"
>
<xsl:apply-templates
select=
"node()|@*"
/>
</xsl:element>
</xsl:template>
<xsl:template
match=
"*"
priority=
"4"
>
<xsl:element
name=
"myns:note"
>
<xsl:attribute
name=
"type_of"
><xsl:value-of
select=
"local-name()"
></xsl:value-of></xsl:attribute>
<xsl:value-of
select=
"."
/>
</xsl:element>
</xsl:template>
<xsl:template
match=
"oldmods:metadata"
></xsl:template>
</xsl:stylesheet>
\ No newline at end of file
hdoc_to_opale/bibtex_to_opale/XSL/OneBibXMLToOpaleXml.xsl
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"1.0"
xmlns:bib=
"http://www.utc.fr/ics/hdoc/bibtexXm"
xmlns:op=
"utc.fr:ics/opale3"
>
<xsl:output
encoding=
"UTF-8"
method=
"xml"
indent=
"yes"
/>
<xsl:param
name=
"Position"
/>
<xsl:template
match=
"bib:file"
>
<xsl:for-each
select=
"bib:entry"
>
<xsl:if
test=
"position()=$Position"
>
<sc:item
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<op:bib
xmlns:sp=
"http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:op=
"utc.fr:ics/opale3"
>
<op:bibM>
<sp:id
xmlns=
"http://www.utc.fr/ics/scenari/v3/primitive"
><xsl:value-of
select=
"@id"
></xsl:value-of></sp:id>
<xsl:if
test=
"child::node()/bib:url = true()"
>
<sp:type>
web
</sp:type>
</xsl:if>
<xsl:if
test=
"child::node()/bib:url = false()"
>
<sp:type>
bib
</sp:type></xsl:if>
<sp:desc>
<op:bibTxt>
<sc:para
xml:space=
"preserve"
>
<xsl:apply-templates
select=
"child::node()/bib:author"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:year"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:title"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:booktitle"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:editor"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:publisher"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:address"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:edition"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:url"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:journal"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:series"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:volume"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:number"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:chapter"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:pages"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:type"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:institution"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:organization"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:howpulished"
></xsl:apply-templates>
<xsl:apply-templates
select=
"child::node()/bib:note"
></xsl:apply-templates>
</sc:para>
</op:bibTxt>
</sp:desc>
</op:bibM>
</op:bib>
</sc:item>
</xsl:if>
</xsl:for-each>
</xsl:template>
<xsl:template
match=
"bib:editor | bib:publisher"
>
<sc:textLeaf
role=
"ed"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
><xsl:value-of
select=
"."
/>
<xsl:text>
</xsl:text></sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:editor[last()] | bib:publisher[last()]"
>
<sc:textLeaf
role=
"ed"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<xsl:value-of
select=
"."
/>
</sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:author"
>
<sc:textLeaf
role=
"auth"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<xsl:value-of
select=
"."
/>
<xsl:text>
</xsl:text>
</sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:author[last()]"
>
<sc:textLeaf
role=
"auth"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<xsl:value-of
select=
"."
/>
</sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:year"
>
<sc:textLeaf
role=
"date"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
><xsl:value-of
select=
"../bib:month"
/>
<xsl:text>
</xsl:text><xsl:value-of
select=
"."
/></sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:title | bib:booktitle"
>
<sc:textLeaf
role=
"title"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<xsl:value-of
select=
"."
/>
</sc:textLeaf>
</xsl:template>
<xsl:template
match=
"bib:url"
>
<sc:uLink
role=
"url"
xmlns:sc=
"http://www.utc.fr/ics/scenari/v3/core"
>
<xsl:attribute
name=
"url"
>
<xsl:value-of
select=
"."
/></xsl:attribute>
<xsl:value-of
select=
"."
/>
</sc:uLink>
</xsl:template>
<xsl:template
match=
"bib:volume | bib:number"
>
Volume :
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:chapter"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:series"
>
Series :
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:edition"
>
Edition :
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:address"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:journal"
>
Journal :
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:pages"
>
Pages :
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:type"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:institution"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:organization"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:howpublished"
>
<xsl:value-of
select=
"."
/>
</xsl:template>
<xsl:template
match=
"bib:note"
>
Note :
<xsl:value-of
select=
"."
/>
</xsl:template>
</xsl:stylesheet>
hdoc_to_opale/bibtex_to_opale/XSL/SeparateXmlt.xsl
0 → 100644
View file @
8746e1a1
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
version=
"1.0"
xmlns:bib=
"http://www.utc.fr/ics/hdoc/bibtexXm"
xmlns:op=
"utc.fr:ics/opale3"
>
<xsl:output
encoding=
"UTF-8"
method=
"xml"
indent=
"yes"
/>
<xsl:param
name=
"in"
/>
<xsl:param
name=
"out"
/>
<xsl:template
match=
"bib:file"
>
<project
basedir=
".."
name=
"ref"
>
<xsl:apply-templates
select=
"bib:entry"
></xsl:apply-templates>
</project>
</xsl:template>
<xsl:template
match=
"bib:entry"
>
<xslt
xslresource=
"./XSL/OneBibXMLToOpaleXml.xsl"
>
<xsl:attribute
name=
"in"
><xsl:value-of
select=
"$in"
/></xsl:attribute>
<xsl:attribute
name=
"out"
><xsl:value-of
select=
"$out"
/>
/
<xsl:value-of
select=
"./@id"
/>
.ref
</xsl:attribute>
<param
name=
"Position"
>
<xsl:attribute
name=
"expression"
><xsl:value-of
select=
"count(preceding-sibling::bib:entry) + 1"
/></xsl:attribute>
</param>
</xslt>
</xsl:template>
<xsl:template
match=
"dc:metadata"
xmlns:dc=
"http://purl.org/dc/elements/1.1/"
>
</xsl:template>
</xsl:stylesheet>
hdoc_to_opale/bibtex_to_opale/bib2.bib
0 → 100644
View file @
8746e1a1
@article
{
article
,
author
=
{Peter Adams}
,
title
=
{The title of the work}
,
journal
=
{The name of the journal}
,
year
=
1993
,
number
=
2
,
pages
=
{201-213}
,
month
=
7
,
note
=
{An optional note}
,
volume
=
4
}
@book
{
book
,
author
=
{Peter Babington}
,
title
=
{The title of the work}
,
publisher
=
{The name of the publisher}
,
year
=
1993
,
volume
=
4
,
series
=
10
,
address
=
{The address}
,
edition
=
3
,
month
=
7
,
note
=
{An optional note}
,
isbn
=
{3257227892}
}
@booklet
{
booklet
,
title
=
{The title of the work}
,
author
=
{Peter Caxton}
,
howpublished
=
{How it was published}
,
address
=
{The address of the publisher}
,
month
=
7
,
year
=
1993
,
note
=
{An optional note}
}
@conference
{
conference
,
author
=
{Peter Draper}
,
title
=
{The title of the work}
,
booktitle
=
{The title of the book}
,
year
=
1993
,
editor
=
{The editor}
,
volume
=
4
,
series
=
5
,
pages
=
213
,
address
=
{The address of the publisher}
,
month
=
7
,
organization
=
{The organization}
,
publisher
=
{The publisher}
,
note
=
{An optional note}
}
@inbook
{
inbook
,
author
=
{Peter Eston}
,
title
=
{The title of the work}
,
chapter
=
8
,
pages
=
{201-213}
,
publisher
=
{The name of the publisher}
,
year
=
1993
,
volume
=
4
,
series
=
5
,
address
=
{The address of the publisher}
,
edition
=
3
,
month
=
7
,
note
=
{An optional note}
}
@incollection
{
incollection
,
author
=
{Peter Farindon}
,
title
=
{The title of the work}
,
booktitle
=
{The title of the book}
,
publisher
=
{The name of the publisher}
,
year
=
1993
,
editor
=
{The editor}
,
volume
=
4
,
series
=
5
,
chapter
=
8
,
pages
=
{201-213}
,
address
=
{The address of the publisher}
,
edition
=
3
,
month
=
7
,
note
=
{An optional note}
}
@manual
{
manual
,
title
=
{The title of the work}
,
author
=
{Peter Gainsford}
,
organization
=
{The organization}
,
address
=
{The address of the publisher}
,
edition
=
3
,
month
=
7
,
year
=
1993
,
note
=
{An optional note}
}
@mastersthesis
{
mastersthesis
,
author
=
{Peter Harwood}
,
title
=
{The title of the work}
,
school
=
{The school where the thesis was written}
,
year
=
1993
,
address
=
{The address of the publisher}
,
month
=
7
,
note
=
{An optional note}
}