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
f37db780
Commit
f37db780
authored
Dec 15, 2015
by
Jean Vintache
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaner insertion of namespace into container
parent
6c10dfff
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
12 deletions
+46
-12
etherpad_to_hdoc/antce/myantce.ant
etherpad_to_hdoc/antce/myantce.ant
+11
-11
etherpad_to_hdoc/antce/xsl/addNamespaceToContainer.xsl
etherpad_to_hdoc/antce/xsl/addNamespaceToContainer.xsl
+34
-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 @
f37db780
...
...
@@ -30,10 +30,8 @@
<!-- Apply Xslt -->
<target
name=
"apply-xslt"
>
<!-- <replaceregexp file="${in}/pad.html" match="<br>" replace="<br />" flags="g" /> -->
<htmlcleaner
src=
"${in}/pad.html"
dest=
"${tmp}/aaaa.xml"
/>
<xslt
classpath=
"lib\saxon9he.jar"
in=
"${xsl}/html2xhtml.xsl"
out=
"${tmp}/tmpPad.xhtml"
style=
"${xsl}/html2xhtml.xsl"
/>
<htmlcleaner
src=
"${in}/pad.html"
dest=
"${tmp}/pad-clean.xml"
/>
<xslt
in=
"${xsl}/html2xhtml.xsl"
out=
"${tmp}/tmpPad.xhtml"
style=
"${xsl}/html2xhtml.xsl"
/>
<xslt
in=
"${tmp}/tmpPad.xhtml"
out=
"${tmp}/tozip/content.xml"
style=
"${xsl}/xhtml2hdoc.xsl"
/>
</target>
...
...
@@ -44,13 +42,14 @@
<!-- container -->
<touch
file=
"${tmp}/tozip/META-INF/container.xml"
/>
<echo
file=
"${tmp}/tozip/META-INF/container.xml"
>
<
container xmlns="urn:utc.fr:ics:hdoc:container" version="1.0"
>
<
rootfiles
>
<
rootfile full-path="${rootfilename}" media-type="text/xml" /
>
<
/rootfiles
>
<
/container
>
</echo>
<echoxml
file=
"${tmp}/tozip/META-INF/container.xml"
>
<container
version=
"1.0"
>
<rootfiles>
<rootfile
full-path=
"${rootfilename}"
media-type=
"text/xml"
/>
</rootfiles>
</container>
</echoxml>
<xslt
classpath=
"lib/saxon9he.jar"
in=
"${tmp}/tozip/META-INF/container.xml"
out=
"${tmp}/META-INF/container.xml"
style=
"${xsl}/addNamespaceToContainer.xsl"
/>
<!-- mimetype -->
<touch
file=
"${tmp}/mimetype"
/>
...
...
@@ -74,6 +73,7 @@
<antcall
target=
"construct_hdoc"
></antcall>
<antcall
target=
"jing-hdoc"
></antcall>
<antcall
target=
"zip"
></antcall>
<antcall
target=
"clean-tmp"
></antcall>
</target>
</project>
\ No newline at end of file
etherpad_to_hdoc/antce/xsl/addNamespaceToContainer.xsl
0 → 100644
View file @
f37db780
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl=
"http://www.w3.org/1999/XSL/Transform"
xmlns:xs=
"http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes=
"xs"
version=
"2.0"
xmlns=
"urn:utc.fr:ics:hdoc:container"
>
<xsl:output
method=
"xml"
indent=
"yes"
/>
<!-- Identity transformation -->
<xsl:template
match=
"node()|@*"
>
<xsl:copy>
<xsl:apply-templates
select=
"node()|@*"
/>
</xsl:copy>
</xsl:template>
<!-- Namespace substitution for hdoc elements -->
<xsl:template
match=
"*"
priority=
"1"
>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"node()|@*"
/>
</xsl:element>
</xsl:template>
<xsl:template
match=
"container"
priority=
"2"
>
<xsl:processing-instruction
name=
"oxygen"
>
RNGSchema="http://scenari.utc.fr/hdoc/schemas/container/hdoc1-container.rng" type="xml"
</xsl:processing-instruction>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"node()|@*"
/>
</xsl:element>
</xsl:template>
<!-- Suppress processing-instructions -->
<xsl:template
match=
"processing-instruction()"
priority=
"1"
/>
</xsl:stylesheet>
\ No newline at end of file
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
View file @
f37db780
...
...
@@ -8,7 +8,7 @@
<xsl:strip-space
elements=
"*"
/>
<xsl:param
name=
"text-encoding"
as=
"xs:string"
select=
"'utf-8'"
/>
<xsl:param
name=
"text-uri"
as=
"xs:string"
select=
"'../tmp/
aaaa
.xml'"
/>
<xsl:param
name=
"text-uri"
as=
"xs:string"
select=
"'../tmp/
pad-clean
.xml'"
/>
<xsl:template
name=
"text2xml"
>
<xsl:variable
name=
"text"
select=
"unparsed-text($text-uri, $text-encoding)"
/>
...
...
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