Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Stephane Crozat
hdoc
Commits
ccaf64f1
Commit
ccaf64f1
authored
Dec 17, 2015
by
qaomia
Browse files
fix xsl
parent
112cef1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
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
Supports
Markdown
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