Commit 200a4aaf authored by Jean Vintache's avatar Jean Vintache

remove local schemas and docx file

parent b1b3d9c2
......@@ -4,6 +4,6 @@ tmp = ${basedir}/tmp
xsl = ${basedir}/xsl
lib = ${basedir}/lib
log = ${basedir}/log
schema = ${basedir}/schema
schema = ../schemas
rootfilename = content.xml
\ No newline at end of file
<?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>
<?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>This schema describes the content file for hdoc format</a:documentation>
<a:documentation>This schema is a restriction of XHTML (it validates XHTML
schema, if namespace is changed to http://www.w3.org/1999/xhtml)</a:documentation>
<a:documentation>Last update : 2014-12-22</a:documentation>
<a:documentation>Changes since last update :
Adding biblio management via a href='' data-hdoc-type='bibtexml'
</a:documentation>
<start>
<element name="html">
<ref name="Head"/>
<ref name="Body"/>
</element>
</start>
<define name="Head">
<element name="head">
<!-- mandatory : document title -->
<element name="title">
<text/>
</element>
<!-- mandatory : charset=utf-8 -->
<element name="meta">
<attribute name="charset">
<value>utf-8</value>
</attribute>
</element>
<!-- optional : hdoc source generator -->
<optional>
<element name="meta">
<attribute name="name">
<value>generator</value>
</attribute>
<attribute name="content">
<choice>
<value>SimpleOptim</value>
<value>HdocConverter/SimpleChain</value>
<value>SimpleChain</value>
<value>HdocConverter/Etherpad</value>
<value>HdocConverter/Opale3.4</value>
<value>HdocConverter/Dokiel4.0</value>
<value>HdocConverter/Optim1.2</value>
<value>HdocConverter/Topaze1.3</value>
<value>HdocConverter/wikipedia</value>
<value>HdocConverter/Wordpress</value>
<value>HdocConverter/OpenDocumentText</value>
<value>HdocConverter/LaTeX</value>
<value>HdocConverter/OPML</value>
<value>HdocConverter/DITA</value>
</choice>
</attribute>
</element>
</optional>
<!-- optional : metadata about content ; TODO : date...-->
<zeroOrMore>
<element name="meta">
<attribute name="name">
<choice>
<value>description</value>
<value>keywords</value>
<value>author</value>
<value>rights</value>
<value>date</value>
</choice>
</attribute>
<attribute name="content">
<text/>
</attribute>
</element>
</zeroOrMore>
</element>
</define>
<define name="Body">
<element name="body">
<ref name="Structure"/>
</element>
</define>
<define name="Structure">
<oneOrMore>
<ref name="Section"/>
</oneOrMore>
</define>
<!-- Recursive and hierachical organization of the document -->
<define name="Section">
<element name="section">
<!-- optional typing -->
<ref name="SectionType"/>
<!-- mandatory : title (header > h1) -->
<element name="header">
<element name="h1">
<text/>
</element>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>author</value>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>date</value>
</attribute>
<data type="date"/>
</element>
</optional>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>rights</value>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>introduction</value>
</attribute>
<text/>
</element>
</optional>
</element>
<!-- optional content of the section-->
<optional>
<ref name="Content"/>
</optional>
<!-- optional internal sub-structrure -->
<optional>
<ref name="Structure"/>
</optional>
<!-- optional footer -->
<optional>
<element name="footer">
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>conclusion</value>
</attribute>
<text/>
</element>
</optional>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>tags</value>
</attribute>
<oneOrMore>
<element name="span">
<text/>
</element>
</oneOrMore>
</element>
</optional>
<optional>
<element name="div">
<attribute name="data-hdoc-type">
<value>categories</value>
</attribute>
<oneOrMore>
<element name="span">
<text/>
</element>
</oneOrMore>
</element>
</optional>
</element>
</optional>
</element>
</define>
<!-- A content is a sequence of blocs -->
<define name="Content">
<oneOrMore>
<element name="div">
<!-- optional typing attribute -->
<ref name="DivType"/>
<!-- Optional title of a div -->
<optional>
<element name="h6">
<text/>
</element>
</optional>
<ref name="Flow"/>
</element>
</oneOrMore>
</define>
<!-- A flow is a sequence of media : text, table, image, audio, video, others -->
<define name="Flow">
<oneOrMore>
<choice>
<ref name="Text"/>
<ref name="Table"/>
<ref name="Image"/>
<ref name="Audio"/>
<ref name="Video"/>
<ref name="Object"/>
</choice>
</oneOrMore>
</define>
<!-- Text -->
<define name="Text">
<oneOrMore>
<choice>
<ref name="P"/>
<ref name="L"/>
</choice>
</oneOrMore>
</define>
<!-- Paragraphe -->
<define name="P">
<element name="p">
<ref name="Inline"/>
</element>
</define>
<!-- Inline elements -->
<define name="Inline">
<!-- TODO : cite, code, sub, sup... -->
<zeroOrMore>
<choice>
<text/>
<element name="em">
<ref name="Inline"/>
</element>
<element name="i">
<ref name="Inline"/>
</element>
<element name="q">
<ref name="Inline"/>
</element>
<element name="sub">
<ref name="Inline"/>
</element>
<element name="sup">
<ref name="Inline"/>
</element>
<element name="a">
<attribute name="href">
<data type="anyURI"/>
</attribute>
<optional>
<!-- Biblio reference management -->
<attribute name="data-hdoc-type">
<value>bibtexml</value>
</attribute>
</optional>
<ref name="Inline"/>
</element>
<element name="span">
<ref name="SpanType"/>
<ref name="Inline"/>
</element>
</choice>
</zeroOrMore>
</define>
<!-- List -->
<define name="L">
<choice>
<element name="ul">
<ref name="I"/>
</element>
<element name="ol">
<ref name="I"/>
</element>
</choice>
</define>
<!-- List item -->
<define name="I">
<oneOrMore>
<element name="li">
<ref name="Text"/>
</element>
</oneOrMore>
</define>
<!-- Table -->
<define name="Table">
<element name="table">
<optional>
<element name="caption"><text/></element>
</optional>
<oneOrMore>
<element name="tr">
<oneOrMore>
<element name="td">
<ref name="Text"></ref>
</element>
</oneOrMore>
</element>
</oneOrMore>
</element>
</define>
<!-- Image -->
<define name="Image">
<element name="img">
<attribute name="src">
<data type="anyURI"/>
</attribute>
<attribute name="alt">
<text/>
</attribute>
</element>
</define>
<!-- Audio -->
<define name="Audio">
<element name="audio">
<attribute name="src">
<data type="anyURI"/>
</attribute>
</element>
</define>
<!-- Vidéo -->
<define name="Video">
<element name="video">
<attribute name="src">
<data type="anyURI"/>
</attribute>
<ref name="VideoType"/>
</element>
</define>
<!-- Other external resources -->
<define name="Object">
<element name="object">
<ref name="ObjectType"/>
<attribute name="data">
<data type="anyURI"/>
</attribute>
<empty/>
</element>
</define>
<!-- Microdata and other Types -->
<include href="type.rng"/>
</grammar>
<?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>
<value>application/vnd.oasis.opendocument.spreadsheet</value>
<value>application/pdf</value>
</choice>
</attribute>
</define>
<define name="VideoType">
<attribute name="type">
<choice>
<value>video/mp4</value>
<value>video/ogg</value>
<value>video/webm</value>
</choice>
</attribute>
</define>
</grammar>
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