Commit f2ffa949 authored by Mar60's avatar Mar60

get images associated with definitions

parent 1fa4b6a6
......@@ -13,12 +13,13 @@ In order to use this converter, follow those steps :
3. You will find the result into the output directory.
##User documentation
For each definition in the content.xml a .term is generated and for each source that is referenced in a definition the image associated (with its meta and props files) is copied into the output file with the definition.
##Known bugs
>- Cannot put multiple input files
##TODO
>- Change the name of the file (.term) to the definition associated
>- Change the name of the file (.term) to have a name without special character
>- Manage multiple input files (e.g. see lexique_to_opale)
>- list of element to convert :
>>- src url
......@@ -27,8 +28,8 @@ In order to use this converter, follow those steps :
>>- type (female, male,...) and (abbreviation, expanded,...)
>>- array
>>- multimedia
>-Do not generate the content.term or use it to generate an index instead (currently content.term is generated but useless)
##Technical notes
>- The converter have to respect the same schema as the lexique_to_hdoc converter for the xslt
##Capitalisation
......@@ -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
......@@ -22,10 +22,19 @@
<xsl:template match="h:section">
<xsl:apply-templates select="h:div"/>
<xsl:apply-templates select="h:section"/>
<xsl:apply-templates select="h:p"/>
</xsl:template>
<xsl:template match="h:div">
<xsl:apply-templates select="h:section"/>
<xsl:apply-templates select="h:p"/>
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
</xsl:template>
<xsl:template match="h:p">
<xsl:apply-templates select="h:p"/>
<xsl:apply-templates select="h:img"/>
<xsl:apply-templates select="h:object"/>
<xsl:apply-templates select="h:audio"/>
......@@ -33,17 +42,19 @@
<xsl:template match="h:img">
<xsl:variable name="src" select="@src"/>
<copy file="${srcdir}/${nameInputsId}/{$src}" tofile="${outdir}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}" tofile="${{outdir}}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}/../meta.xml" tofile="${{outdir}}/{$src}/../meta.xml"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}/../props.xml" tofile="${{outdir}}/{$src}/../props.xml"/>
</xsl:template>
<xsl:template match="h:object">
<xsl:variable name="data" select="@data"/>
<copy file="${srcdir}/${nameInputsId}/{$data}" tofile="${outdir}/{$data}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$data}" tofile="${{outdir}}/{$data}"/>
</xsl:template>
<xsl:template match="h:audio">
<xsl:variable name="src" select="@src"/>
<copy file="${srcdir}/${nameInputsId}/{$src}" tofile="${outdir}/{$src}"/>
<copy file="${{srcdir}}/${{nameInputsId}}/{$src}" tofile="${{outdir}}/{$src}"/>
</xsl:template>
</xsl:stylesheet>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment