Commit da86dac8 authored by Decorde Jeffrey's avatar Decorde Jeffrey

Merge branch 'master' of gitlab.utc.fr:crozatst/hdoc

parents 04f76337 ff17acc7
......@@ -4,4 +4,12 @@
wikipedia_to_hdoc/result/*
wikipedia_to_hdoc/tmp/*
wikipedia_to_hdoc/hdoc_to_opale/tmp/*
wikipedia_to_hdoc/output/*
\ No newline at end of file
wikipedia_to_hdoc/output/*
mindmapping_to_opale/result/*
mindmapping_to_opale/tmp/*
mindmapping_to_lexique/result/*
mindmapping_to_lexique/tmp/*
mindmapping_to_optim/result/*
mindmapping_to_optim/tmp/*
mindmapping_to_hdoc/result/*
mindmapping_to_hdoc/tmp/*
\ No newline at end of file
<project name="hdoc_to_optim" default="convert">
<!-- Arguments properties -->
<property name="InputPath" value="input" />
<property name="OutputPath" value="output" />
<property name="OutputScarPath" value="${OutputPath}/result.scar" />
<target name="convert">
<!-- get input hdoc file path -->
<fileset id="fileset_hdoc" dir="${InputPath}" casesensitive="yes">
<include name="*.hdoc"/>
</fileset>
<pathconvert property="HdocPath" pathsep="" refid="fileset_hdoc" />
<!--unzips the hdoc to be converted-->
<unzip dest="hdoc" src ="${InputPath}"/>
<!--gives all rights to avoid bugs-->
<unzip dest="hdoc" src ="${HdocPath}"/>
<!--gives all rights to avoid bugs-->
<chmod dir="hdoc" perm="777"/>
<!--launches the XSLT find_content to retrieve the content path-->
<xslt in="hdoc/META-INF/container.xml" out="get_content.ant" style="find_content.xsl"/>
<!--launches the XSLT find_content to retrieve the content path-->
<xslt in="hdoc/META-INF/container.xml" out="get_content.ant" style="xsl/find_content.xsl"/>
<chmod file="get_content.ant" perm="777"/>
<!--launches the ANT get_content resulting from the previous XSLT in order to launch the conversion-->
<!--launches the ANT get_content resulting from the previous XSLT in order to launch the conversion-->
<ant antfile="get_content.ant"/>
<!--once the conversion is complete, the result is zipped-->
<zip basedir="result" destfile="${OutputPath}"/>
<!--temporary files and folders are deleted-->
<!--once the conversion is complete, the result is zipped-->
<zip basedir="result" destfile="${OutputScarPath}"/>
<!--temporary files and folders are deleted-->
<delete dir="hdoc"/>
<delete dir="result"/>
<delete file="get_content.ant"/>
<delete file="get_ressources.ant"/>
</target>
</project>
\ No newline at end of file
@echo off
set lib=lib
set ant=myantce.ant
set ant=hdoc_to_optim.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
......
#!/bin/sh
lib="lib"
ant="myantce.ant"
ant="hdoc_to_optim.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
......
......@@ -4,14 +4,14 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
xmlns:h="urn:utc.fr:ics:hdoc:container"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xsl:param name="destfile" required="yes" as="xs:string"/>
<!--<xsl:param name="destfile" required="yes" as="xs:string"/>-->
<xsl:output method="xml" indent="yes"/>
<xsl:template match="h:container">
<project name="hdoc_to_optim" default="main">
<target name="main">
<mkdir dir="result"/>
<chmod dir="result" perm="777"/>
<copy file=".wspmeta" todir="result"/>
<copy file="output/.wspmeta" todir="result"/>
<xsl:apply-templates/>
</target>
</project>
......@@ -24,10 +24,10 @@
<xsl:template match="h:rootfile">
<xsl:variable name="path" select="@full-path"/>
<!--the ANT runs the XSLT get_ressources then the ANT created by it-->
<xslt in="hdoc/{$path}" out="get_ressources.ant" style="find_ressources.xsl"/>
<xslt in="hdoc/{$path}" out="get_ressources.ant" style="xsl/find_ressources.xsl"/>
<chmod file="get_ressources.ant" perm="777"/>
<ant antfile="get_ressources.ant"/>
<!--the ANT runs the main XSLT transfo-->
<xslt in="hdoc/{$path}" out="result/content.paper" style="transfo.xsl"/>
<xslt in="hdoc/{$path}" out="result/content.paper" style="xsl/transfo.xsl"/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><map version="0.8.1"><node CREATED="1450312359766" ID="2nngtspni6hi1484pfec44c8lk" MODIFIED="1450312359766" TEXT="MindMapping"><node CREATED="1450312359766" ID="00lp6bpfm6jibhcjrpdonrhoqb" MODIFIED="1450312359766" POSITION="right" TEXT="#1 MindMapping to Hdoc"><node CREATED="1450312359766" ID="3qm1jgu7dfgs328jthlek5fd4e" MODIFIED="1450312359766" TEXT="Prendre en main le projet existant"/><node CREATED="1450312359766" ID="0u38ectmhqqp4p08p5guvgij71" MODIFIED="1450312359766" TEXT="Corriger les bugs existants"/><node CREATED="1450312359766" ID="3b1t9o2te6enh59j4iv48f4mdi" MODIFIED="1450312359766" TEXT="Restructurer le ant"/></node><node CREATED="1450312359766" ID="6lohsep5crh5g3ngj8ld8loei6" MODIFIED="1450312359766" POSITION="right" TEXT="#2 MindMapping to Opale"><node CREATED="1450312359766" ID="5pl3210hq6if3nv7r2chtjstmo" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Opale"/><node CREATED="1450312359766" ID="3haa2fgohe9j4n04ilddco84uh" MODIFIED="1450312359766" TEXT="Permettre la personnalisation de l'organisation du module"/><node CREATED="1450312359766" ID="11k2hbkcu415e1mgk5c5ucr48k" MODIFIED="1450312359766" TEXT="Permettre la personnalisation dy type de noeud (Intro, conclusion etc.)"/><node CREATED="1450312359766" ID="4npf8jpvak3lffn9c1rsogi0sq" MODIFIED="1450312359766" TEXT="Permettre la personnalisation grâce aux couleurs/icônes"/></node><node CREATED="1450312359766" ID="3n8v43p8qb005puq3qiv7aiubc" MODIFIED="1450312359766" POSITION="right" TEXT="#3 MindMapping to Optim"><node CREATED="1450312359766" ID="2bn1la3apnjf1fi8qqfqde226t" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Optim"/></node><node CREATED="1450312359766" ID="3s00si3hquol4pldg7lo9opjd6" MODIFIED="1450312359766" POSITION="right" TEXT="#4 MindMapping to Lexique"><node CREATED="1450312359766" ID="37jlfl25iuaoe6f2cpiv30qksd" MODIFIED="1450312359766" TEXT="Faire la connexion avec le transformateur Hdoc to Lexique"/></node><node CREATED="1450312359767" ID="27gnl6pgottjfiukpa3ulfdjrj" MODIFIED="1450312359767" POSITION="left" TEXT="#5 Prendre d'autres outils de carte mentales en entrée"/><node CREATED="1450312359767" ID="24d41nnnnvvu7fv5m8m4vegu0g" MODIFIED="1450312359767" POSITION="left" TEXT="#intro This converter aims at convert a given MindMapping file into a Hdoc file which then will be imported in Opale (advanced only)."/><node CREATED="1450312359767" ID="6a7pr2b5vvmq6na5964dhf9e13" MODIFIED="1450312359767" POSITION="left" TEXT="#conclu Ma conclusion"/></node></map>
\ No newline at end of file
<map version="1.0.1">
<!-- To view this file, download free mind mapping software FreeMind from http://freemind.sourceforge.net -->
<node CREATED="1449485059502" ID="ID_1970904157" MODIFIED="1449733283013">
<node CREATED="1449486713098" ID="ID_983701334" MODIFIED="1449486715515" TEXT="#intro Une introduction"/>
<node CREATED="1449486720318" ID="ID_737906523" MODIFIED="1449486722975" TEXT="#conclu Une conclusion"/>
<richcontent TYPE="NODE"><html>
<head>
......@@ -36,8 +38,6 @@
</node>
<node CREATED="1449485926526" ID="ID_289476678" MODIFIED="1449486753624" POSITION="left" TEXT="Sc&#xe9;nario">
<node CREATED="1449485946398" ID="ID_596698657" MODIFIED="1449734206316" TEXT="#p Mon personnage bien a&#xee;m&#xe9; attaque tous les monstres alentours pour de l&apos;argent"/>
<node CREATED="1449486713098" ID="ID_983701334" MODIFIED="1449486715515" TEXT="#intro"/>
<node CREATED="1449486720318" ID="ID_737906523" MODIFIED="1449486722975" TEXT="#conclu"/>
<node CREATED="1449486747017" ID="ID_1777634105" MODIFIED="1449486750554" TEXT="#mcq"/>
</node>
</node>
......
......@@ -5,8 +5,10 @@
<!-- This is wrong -> xpath-default-namespace="http://www.utc.fr/ics/hdoc/xhtml"-->
<xsl:output method="xml" indent="yes"/>
<!-- Remove spaces/tabs -->
<xsl:strip-space elements="*"/>
<!-- Entry point -->
<xsl:template match="map">
<xsl:processing-instruction name="oxygen">
RNGSchema="http://scenari.utc.fr/hdoc/schemas/xhtml/hdoc1-xhtml.rng" type="xml"
......@@ -22,10 +24,10 @@
</xsl:template>
<!-- Header in hdoc -->
<xsl:template match="node[1]" mode="header">
<title>
<xsl:value-of select="@TEXT"/>
<xsl:value-of select="utc:string-remove-order(@TEXT)"/>
<xsl:value-of select="richcontent"/>
</title>
<meta charset="utf-8"/>
......@@ -37,11 +39,35 @@
<xsl:element name="section">
<header>
<h1>
<xsl:value-of select="@TEXT"/>
<xsl:value-of select="utc:string-remove-order(@TEXT)"/>
<xsl:value-of select="richcontent"/>
</h1>
</header>
<!--Introduction-->
<xsl:if test="child::*[contains(@TEXT, '#intro')]">
<xsl:element name="section">
<header><h1>Introduction</h1>
<xsl:element name="div">
<xsl:attribute name="data-hdoc-type">introduction</xsl:attribute>
<xsl:value-of select="utc:string-remove-order(utc:string-remove-all(child::*[contains(@TEXT, '#intro')][1]/@TEXT, '#intro '))"/>
</xsl:element>
</header>
</xsl:element>
</xsl:if>
<!-- Process children -->
<xsl:apply-templates select="node"/>
<!--Conclusion-->
<xsl:if test="child::*[contains(@TEXT, '#conclu')]">
<xsl:element name="section">
<header><h1>Conclusion</h1></header>
<footer>
<xsl:element name="div">
<xsl:attribute name="data-hdoc-type">conclusion</xsl:attribute>
<xsl:value-of select="utc:string-remove-order(utc:string-remove-all(child::*[contains(@TEXT, '#conclu')][1]/@TEXT, '#conclu '))"/>
</xsl:element>
</footer>
</xsl:element>
</xsl:if>
</xsl:element>
</xsl:template>
......@@ -49,16 +75,16 @@
<xsl:template
match="node[not(node)]|node[child::*[contains(@TEXT, '#p')]]|node[child::*[contains(@TEXT, '#a')]]"
priority="1">
<xd:doc xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl">
<xd:desc>
<xd:p/>
</xd:desc>
</xd:doc>
<xsl:element name="section">
<xsl:attribute name="data-hdoc-type">unit-of-content</xsl:attribute>
<xsl:if test="child::attribute[@NAME='anchor']">
<xsl:attribute name="id">
<xsl:value-of select="child::attribute[@NAME='anchor'][1]/@VALUE"></xsl:value-of>
</xsl:attribute>
</xsl:if>
<header>
<h1>
<xsl:value-of select="@TEXT"/>
<xsl:value-of select="utc:string-remove-order(@TEXT)"/>
<xsl:value-of select="richcontent"/>
</h1>
</header>
......@@ -66,28 +92,32 @@
</xsl:element>
</xsl:template>
<!-- Paragraph -->
<xsl:template match="node[contains(@TEXT, '#p')]" priority="2">
<xsl:element name="p">
<xsl:value-of select="utc:string-remove-all(@TEXT, '#p ')"/>
<xsl:value-of select="utc:string-remove-order(utc:string-remove-all(@TEXT, '#p '))"/>
</xsl:element>
</xsl:template>
<!-- Link : need to use anchor attribute ? -->
<xsl:template match="node[contains(@TEXT, '#a')]" priority="2">
<xsl:element name="a">
<xsl:attribute name="href">
<xsl:text>#</xsl:text>
<xsl:value-of select="utc:string-remove-all(@TEXT, '#a ')"/>
<xsl:value-of select="utc:string-remove-order(utc:string-remove-all(@TEXT, '#a '))"/>
</xsl:attribute>
<xsl:value-of select="utc:string-remove-all(@TEXT, '#a ')"/>
<xsl:value-of select="utc:string-remove-order(utc:string-remove-all(@TEXT, '#a '))"/>
</xsl:element>
</xsl:template>
<!-- Default behavior for intro and conclu nodes : do nothing -->
<xsl:template match="node[contains(@TEXT, '#intro')] | node[contains(@TEXT, '#conclu')]" priority="3"/>
<xsl:template match="richcontent">
<xsl:value-of select="html/body/p"/>
<xsl:value-of select="utc:string-remove-order(html/body/p)"/>
</xsl:template>
<!-- Utility functions -->
<xsl:function name="utc:string-remove-all" as="xs:string">
<xsl:param name="text" as="xs:string"/>
<xsl:param name="replace" as="xs:string"/>
......@@ -97,7 +127,7 @@
<xsl:with-param name="replace" select="$replace"/>
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$ret"></xsl:value-of>
<xsl:value-of select="$ret"/>
</xsl:function>
<xsl:template name="string-remove-all">
......@@ -116,4 +146,11 @@
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:function name="utc:string-remove-order" as="xs:string">
<xsl:param name="text" as="xs:string?" />
<xsl:variable name="text2" select="string($text)"/>
<xsl:value-of select="replace($text2,'#[1-9][0-9]* ','')"></xsl:value-of>
</xsl:function>
</xsl:stylesheet>
......@@ -81,7 +81,7 @@
<target name="opale_conversion.windows">
<echo>This is a Windows machine.</echo>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input/${hdocName}.hdoc"/>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input"/>
<exec dir="." executable="cmd">
<arg value="${basedir}/../hdoc_to_opale/run.bat"/>
</exec>
......@@ -90,7 +90,7 @@
<target name="opale_conversion.unix">
<echo>This is an Unix machine.</echo>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input/${hdocName}.hdoc"/>
<copy file="${resultFile}/hdoc/${hdocName}.hdoc" todir="${basedir}/../hdoc_to_opale/input"/>
<exec dir="." executable="/bin/sh">
<arg value="${basedir}/../hdoc_to_opale/run.sh"/>
</exec>
......
<project name="ProjetOpale" default="convert">
<!-- Arguments properties -->
<property name="InputPath" value="source.scar" />
<property name="OutputPath" value="result.hdoc" />
<!-- Other properties -->
<property name="UnzipSourcePath" value="UnzipSourcePath" />
<property name="UnzipSourcePath" value="unzipSourcePath" />
<property name="XmlModuleName" value="" />
<property name="TmpPath" value="TmpPath" />
<property name="TmpFile1" value="TmpFile1.xml" />
<property name="TmpPath" value="tmp" />
<property name="TmpFile1" value="tmpFile1.xml" />
<property name="RacineFile" value="content.xml" />
<property name="HdocPath" value="hdoc" />
<property name="OutputPath" value="output" />
<property name="HdocPath" value="${OutputPath}/hdoc" />
<property name="ZipPath" value="${OutputPath}/result.hdoc" />
<!-- Others properties (in another file) currently empty -->
<property file="opale_to_hdoc.properties" />
......@@ -60,7 +58,12 @@
<!-- Unzip scar source file -->
<target name="unzip_scar">
<unzip src="${InputPath}" dest="./${UnzipSourcePath}"/>
<!-- get scar file path -->
<fileset id="fileset_scar" dir="input" casesensitive="yes">
<include name="*.scar"/>
</fileset>
<pathconvert property="scar.path" pathsep="" refid="fileset_scar" />
<unzip src="${scar.path}" dest="./${UnzipSourcePath}"/>
</target>
<!-- Create the hdoc structure -->
......@@ -70,8 +73,8 @@
<touch file="${HdocPath}/META-INF/container.xml" />
<touch file="${HdocPath}/mimetype" />
<echo message="application/x-hdoc+zip" file="${HdocPath}/mimetype" />
<echoxml file="${HdocPath}/META-INF/container.xml">
<container version="1.0">
<echoxml file="${HdocPath}/META-INF/container.xml" namespacePolicy="elementsOnly">
<container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0">
<rootfiles>
<rootfile full-path="${HdocPath}/${RacineFile}" media-type="text/xml" />
</rootfiles>
......@@ -89,18 +92,18 @@
<pathconvert property="xml.path" pathsep="" refid="fileset_source_xml" />
<!-- xsl -->
<xslt style="opale_to_hdoc_regle1.xsl" in="${xml.path}" out="./${TmpPath}/${TmpFile1}">
<xslt style="xsl/opale_to_hdoc_regle1.xsl" in="${xml.path}" out="./${TmpPath}/${TmpFile1}">
</xslt>
</target>
<!-- Create content.xml -->
<target name="content_xml">
<xslt style="opale_to_hdoc_regle2.xsl" in="./${TmpPath}/${TmpFile1}" out="./${HdocPath}/${RacineFile}" />
<xslt style="xsl/opale_to_hdoc_regle2.xsl" in="./${TmpPath}/${TmpFile1}" out="./${HdocPath}/${RacineFile}" />
</target>
<!-- Zip Hdoc -->
<target name="zip">
<zip destfile="${OutputPath}" basedir="${HdocPath}"/>
<zip destfile="${ZipPath}" basedir="${HdocPath}"/>
</target>
</project>
\ No newline at end of file
@echo off
set lib=lib
set ant=myantce.ant
set ant=opale_to_hdoc.ant
set antparam=-Dprogram.param=%1
set scJarList=%lib%\*
......
#!/bin/sh
lib="lib"
ant="myantce.ant"
ant="opale_to_hdoc.ant"
antparam="-Dprogram.param=$1"
#Recherche de java et controle que se soit une version SUN
......
Usage
-----
Put `.scar` files in the input folder, run `run.bat` or `run.sh` and get results in output folder (one folder and zip per .scar).
Put `.scar` files in the input folder, run `run.bat` or `run.sh` and get results in output folder (one folder and a .hdoc per .scar).
Todo list
......@@ -11,9 +11,9 @@ Todo list
- add schema validation
- clean output of optim source files
- resolve bugs
- test the entier process from optim to opale
- the level of unit of content for the Opal conversion if basically set to sections witch doesn't contains any section but some could need it to be set to another level. Create a selection of this level could be a next step for this project.
Bugs
----
......
......@@ -72,7 +72,7 @@
<sequential>
<local name="folder_name"/>
<basename property="folder_name" file="@{folder}"/>
<zip destfile="${out}/${folder_name}.zip" basedir="@{folder}" ></zip>
<zip destfile="${out}/${folder_name}.hdoc" basedir="@{folder}" ></zip>
</sequential>
</for>
......
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:of="scpf.org:office"
xmlns:sp="http://www.utc.fr/ics/scenari/v3/primitive"
xmlns:sc="http://www.utc.fr/ics/scenari/v3/core"
......@@ -17,8 +17,8 @@
<xsl:apply-templates select="node()|@*">
<xsl:with-param name="src" select="$src"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:copy>
</xsl:template>
<xsl:template match="/">
<xsl:variable name="src"><xsl:value-of select="$currentDir"/>/</xsl:variable>
......@@ -26,8 +26,8 @@
<xsl:apply-templates select="node()|@*">
<xsl:with-param name="src" select="$src"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:copy>
</xsl:template>
<xsl:template match="sp:main[@sc:refUri]" priority="1">
<xsl:param name="src" />
......@@ -52,7 +52,7 @@
<xsl:template match="sp:sec[@sc:refUri]" priority="1">
<xsl:param name="src" />
<xsl:variable name="refUri" select="@sc:refUri" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refUriWithoutLastPart">
<xsl:call-template name="removeLastPart">
<xsl:with-param name="value" select="$refUri" />
......@@ -70,7 +70,7 @@
<xsl:template match="sp:subPage[@sc:refUri]" priority="1">
<xsl:param name="src" />
<xsl:variable name="refUri" select="@sc:refUri" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refUriWithoutLastPart">
<xsl:call-template name="removeLastPart">
<xsl:with-param name="value" select="$refUri" />
......@@ -88,7 +88,7 @@
<xsl:template match="sp:page[@sc:refUri]" priority="1">
<xsl:param name="src" />
<xsl:variable name="refUri" select="@sc:refUri" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refUriWithoutLastPart">
<xsl:call-template name="removeLastPart">
<xsl:with-param name="value" select="$refUri" />
......@@ -108,7 +108,7 @@
<xsl:template match="sp:frag" priority="1">
<xsl:param name="src" />
<xsl:variable name="refUri" select="@sc:refUri" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="totalUri">
<xsl:value-of select="concat($src, $refUri)" />
</xsl:variable>
......@@ -128,7 +128,6 @@
<xsl:with-param name="src" select="$totalUri"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="sc:uLink[@role='ref' and contains(@sc:refUri, '.section')]" priority="2">
<xsl:param name="src" />
......@@ -191,7 +190,7 @@
<xsl:template match="sp:gallery[@sc:refUri]">
<xsl:param name="src" />
<xsl:variable name="refUri" select="@sc:refUri" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refDoc" select="document($refUri)" />
<xsl:variable name="refUriWithoutLastPart">
<xsl:call-template name="removeLastPart">
<xsl:with-param name="value" select="$refUri" />
......@@ -239,8 +238,8 @@
<xsl:apply-templates select="node()|@*">
<xsl:with-param name="src" select="$src"/>
</xsl:apply-templates>
</xsl:copy>
</xsl:template>
</xsl:copy>
</xsl:template>
<!--Retracer le bon lien pour tous les refUri...-->
......
<?xml version="1.0"?>
<?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml" ?>
<container version="1.0" xmlns="urn:utc.fr:ics:hdoc:container">
<rootfiles>
<rootfile full-path="content.xml" media-type="text/xml"/>
</rootfiles>
</container>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml" ?>
<html xmlns="http://www.utc.fr/ics/hdoc/xhtml">
<head>
<title>Hello world</title>
<meta charset="utf-8"/>
<meta name="author" content="Stéphane Crozat"/>
</head>
<body>
<section>
<header>
<h1>First section</h1>
</header>
<div>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
</div>
</section>
<section>
<header>
<h1>Second section</h1>
</header>
<div>
<p>Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
</div>
</section>
</body>
</html>
\ No newline at end of file
application/x-hdoc+zip
<?xml version="1.0"?>
<?oxygen RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml" ?>
<container version="1.0" xmlns="urn:utc.fr:ics:hdoc:container">
<rootfiles>
<rootfile full-path="content.xml" media-type="text/xml"/>
</rootfiles>
</container>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?oxygen RNGSchema="http://hdoc.crzt.fr/schemas/xhtml/hdoc1-xhtml.rng" type="xml" ?>
<html xmlns="http://www.utc.fr/ics/hdoc/xhtml">
<head>
<title>Chaînes éditoriales et rééditorialisation de contenus numériques</title>
<meta charset="utf-8"/>
<meta name="generator" content="HdocConverter/Optim1.2"/>
<meta name="author" content="Stéphane Crozat"/>
</head>
<body>
<section>
<header>
<h1>Préambule</h1>
</header>
<div>
<p>Texte présenté originellement lors du séminaire INRIA "Le document numérique à
l'heure du web de données"</p>
<ul>
<li>
<p>Site du séminaire : <a href="http://hal.inria.fr/IST2012">http://hal.inria.fr/IST2012</a></p>
</li>
<li>
<p>Article (PDF) : <a href="http://hal.inria.fr/hal-00740268">http://hal.inria.fr/hal-00740268</a></p>
</li>
</ul>
</div>
</section>
<section>
<header>
<h1>As we may write</h1>
<div data-hdoc-type="author">Stéphane Crozat</div>
</header>
<div>
<h6>Introduction</h6>
<p>Pendant la seconde guerre mondiale [...] le numérique est aussi devenu le support
d'une autre façon de <em>produire</em> du document [...]</p>
</div>
<section>
<header>
<h1>Raison graphique et raison computationnelle</h1>
</header>
<section>
<header>
<h1>L'invention de l'écriture a donné naissance à la rationalité moderne :
la raison graphique</h1>
</header>
<div>
<p>Goody (1979) a montré que [...]</p>
<object type="application/vnd.oasis.opendocument.spreadsheet" data="res/tab01.ods"/>
<table>
<caption>Ceci est un tableau à deux colonnes et deux lignes</caption>
<tr><td><p>A</p></td><td><p>B</p></td></tr>
<tr><td><p>A</p></td><td><p>2</p></td></tr>
</table>
</div>
</section>
<section>
<header>
<h1>Le numérique est le ferment d'une nouvelle rationalité en construction :
la raison computationnelle</h1>
</header>
<div>
<h6>L'écrit</h6>
<p>De même que l'écrit a permis le passage [...]</p>
</div>
<div data-hdoc-type="emphasis">
<h6>Les supports</h6>
<p>Il y a une relation fondamentale entre les supports [...]</p>
</div>
</section>
</section>
<footer>
<div data-hdoc-type="tags">
<span>raison graphique</span>
<span>raison computationnelle</span>
<span>support</span>
</div>
</footer>
</section>
<section>
<header>
<h1>La domestication de la rééditorialisation sauvage</h1>
</header>
<div>
<p>[...]</p>
</div>
</section>
</body>
</html>
\ No newline at end of file
application/x-hdoc+zip
<?xml version="1.0" encoding="UTF-8"?>
<grammar
xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="urn:utc.fr:ics:hdoc:container"
>
<a:documentation>This schema describes the META-INF/container.xml file for hdoc format</a:documentation>
<a:documentation>This schema is a derivation of http://www.idpf.org/epub/30/schema/ocf-container-30.rnc
from EPUB Open Container Format (http://www.idpf.org/epub/30/spec/epub30-ocf.html)
</a:documentation>
<start>
<element name="container">
<attribute name="version">
<value>1.0</value>
</attribute>
<element name="rootfiles">
<element name="rootfile">
<attribute name="full-path">
<data type="anyURI"/>
</attribute>
<attribute name="media-type">
<value>text/xml</value>
</attribute>
</element>
</element>
</element>
</start>
</grammar>
This diff is collapsed.
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns="http://relaxng.org/ns/structure/1.0"
xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0"
datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes"
ns="http://www.utc.fr/ics/hdoc/xhtml">
<a:documentation>Last update : 2014-12-04</a:documentation>
<a:documentation>Changes since last update :
In order to manage quiz :
- Adding multiple-choice-question and fill-in-the-blank to section
- Adding question, choice-correct, choice-uncorrect and explanation to div
- Adding blank to span
- Externalizing ObjectType and VideoType from main schema
</a:documentation>
<!-- Type Microdata -->
<define name="SectionType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<value>introduction</value>
<value>conclusion</value>
<value>unit-of-content</value>
<value>multiple-choice-question</value>
<value>fill-in-the-blank</value>
</choice>
</attribute>
</optional>
</define>
<define name="DivType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<!-- block management -->
<value>emphasis</value>
<value>complement</value>
<value>definition</value>
<value>example</value>
<value>remark</value>
<value>warning</value>
<value>advice</value>
<!-- quiz management -->
<value>question</value>
<value>choice-correct</value>
<value>choice-incorrect</value>
<value>explanation</value>
</choice>
</attribute>
</optional>
</define>
<define name="SpanType">
<optional>
<attribute name="data-hdoc-type">
<choice>
<value>syntax</value>
<value>latex</value>
<!-- quiz management -->
<value>blank</value>
</choice>
</attribute>
</optional>
</define>
<define name="ObjectType">
<attribute name="type">
<choice>
<value>application/vnd.oasis.opendocument.graphics </value>