Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
H
hdoc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Stephane Crozat
hdoc
Commits
14b1e695
Commit
14b1e695
authored
Dec 10, 2015
by
Jean Vintache
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
jing implementation
parent
e74603a0
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
490 additions
and
2 deletions
+490
-2
etherpad_to_hdoc/antce/myantce.ant
etherpad_to_hdoc/antce/myantce.ant
+15
-1
etherpad_to_hdoc/antce/schema/container/hdoc1-container.rng
etherpad_to_hdoc/antce/schema/container/hdoc1-container.rng
+32
-0
etherpad_to_hdoc/antce/schema/xhtml/hdoc1-xhtml.rng
etherpad_to_hdoc/antce/schema/xhtml/hdoc1-xhtml.rng
+357
-0
etherpad_to_hdoc/antce/schema/xhtml/type.rng
etherpad_to_hdoc/antce/schema/xhtml/type.rng
+85
-0
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
+1
-1
No files found.
etherpad_to_hdoc/antce/myantce.ant
View file @
14b1e695
...
...
@@ -42,11 +42,25 @@
<echo
message=
"application/x-hdoc+zip"
file=
"${tmp}/tozip/mimetype"
/>
</target>
<target
name=
"jing-hdoc"
>
<taskdef
name=
"jing"
classname=
"com.thaiopensource.relaxng.util.JingTask"
>
<classpath>
<pathelement
location=
"lib/jing.jar"
/>
</classpath>
</taskdef>
<jing
file=
"${tmp}/tozip/content.xml"
rngfile=
"schema/xhtml/hdoc1-xhtml.rng"
></jing>
<echo>
content.xml respecte le schema hdoc1-xhtml.rng
</echo>
</target>
<!-- Zip Hdoc container -->
<target
name=
"zip"
>
<zip
basedir=
"${tmp}/tozip/"
destfile=
"${out}/output.hdoc"
/>
</target>
<target
name=
"main"
depends=
"start,apply-xslt,construct_hdoc,zip"
/>
<target
name=
"main"
depends=
"start,apply-xslt,construct_hdoc,jing-hdoc,zip"
>
</target>
</project>
\ No newline at end of file
etherpad_to_hdoc/antce/schema/container/hdoc1-container.rng
0 → 100644
View file @
14b1e695
<?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>
etherpad_to_hdoc/antce/schema/xhtml/hdoc1-xhtml.rng
0 → 100644
View file @
14b1e695
This diff is collapsed.
Click to expand it.
etherpad_to_hdoc/antce/schema/xhtml/type.rng
0 → 100644
View file @
14b1e695
<?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>
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
View file @
14b1e695
...
...
@@ -13,7 +13,7 @@
<xsl:template
name=
"text2xml"
>
<xsl:variable
name=
"text"
select=
"unparsed-text($text-uri, $text-encoding)"
/>
<xsl:analyze-string
select=
"$text"
regex=
".*title.(.*).title.\n.*\n.*\n.*\n.*\n.*\n.*.body.(.*br.*)..body."
>
<xsl:matching-substring>
<xsl:matching-substring>
<head>
<title>
<xsl:value-of
select=
"normalize-space(regex-group(1))"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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