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
ccaf64f1
Commit
ccaf64f1
authored
Dec 17, 2015
by
qaomia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix xsl
parent
112cef1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
18 deletions
+30
-18
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
+1
-1
etherpad_to_hdoc/antce/xsl/html2xhtmlv2.xsl
etherpad_to_hdoc/antce/xsl/html2xhtmlv2.xsl
+16
-0
etherpad_to_hdoc/antce/xsl/xhtml2hdoc.xsl
etherpad_to_hdoc/antce/xsl/xhtml2hdoc.xsl
+13
-17
No files found.
etherpad_to_hdoc/antce/xsl/html2xhtml.xsl
View file @
ccaf64f1
...
...
@@ -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=
"'../input/
pad
.html'"
/>
<xsl:param
name=
"text-uri"
as=
"xs:string"
select=
"'../input/
test
.html'"
/>
<xsl:template
name=
"text2xml"
>
<xsl:variable
name=
"text"
select=
"unparsed-text($text-uri, $text-encoding)"
/>
...
...
etherpad_to_hdoc/antce/xsl/html2xhtmlv2.xsl
View file @
ccaf64f1
...
...
@@ -15,6 +15,11 @@
<xsl:apply-templates
select=
"key('bits', generate-id())"
/>
</p>
</xsl:template>
<xsl:template
match=
"li/br"
>
<p>
<xsl:apply-templates
select=
"key('bits', generate-id())"
/>
</p>
</xsl:template>
<xsl:template
match=
"strong"
>
<em>
<xsl:apply-templates
select=
"@*|node()"
/>
...
...
@@ -30,6 +35,17 @@
<xsl:apply-templates
select=
"@*|node()"
/>
</em>
</xsl:template>
<xsl:template
match=
"ul"
>
<ul>
<xsl:apply-templates
select=
"*"
/>
</ul>
</xsl:template>
<xsl:template
match=
"ol"
>
<ol>
<xsl:apply-templates
select=
"*"
/>
</ol>
</xsl:template>
<xsl:template
match=
"page"
>
<xsl:apply-templates
select=
"@*|node()"
/>
...
...
etherpad_to_hdoc/antce/xsl/xhtml2hdoc.xsl
View file @
ccaf64f1
...
...
@@ -22,39 +22,35 @@
</body>
</html>
</xsl:template>
<xsl:template
match=
"
/html/body/div
"
priority=
"1"
>
<xsl:template
match=
"
div/p | div/p
"
priority=
"1"
>
<xsl:choose>
<xsl:when
test=
"p/ul"
>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"*"
/>
</xsl:element>
<xsl:when
test=
"ul"
>
<xsl:apply-templates/>
</xsl:when>
<xsl:when
test=
"p/ol"
>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"*"
/>
</xsl:element>
<xsl:when
test=
"ol"
>
<xsl:apply-templates/>
</xsl:when>
<xsl:otherwise>
<p>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"node() | @*"
/>
</xsl:element>
</p>
<p><xsl:apply-templates
select=
"@* | node()"
/></p>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"li"
priority =
"1"
>
<li><p><xsl:apply-templates
select=
"@* | node()"
/></p></li>
</xsl:template>
<!--
<xsl:template
match=
"@* | node()"
>
<xsl:copy>
<xsl:apply-templates
select=
"@* | node()"
/>
</xsl:copy>
</xsl:template>
-->
<!--
<xsl:template match="/">
<xsl:apply-templates select="*"></xsl:apply-templates>
</xsl:template>
-->
<!-- Namespace substitution for hdoc elements -->
<xsl:template
match=
"*"
>
...
...
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