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
bd4d1451
Commit
bd4d1451
authored
Dec 17, 2015
by
haroldcb
Browse files
ajout traitement listes dans tableaux, corrections bugs
parent
47227d6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl
View file @
bd4d1451
...
...
@@ -309,14 +309,11 @@
</xsl:if>
</xsl:template>
<!-- <xsl:template match="span" mode="textOnly">
<xsl:apply-templates/>
</xsl:template>-->
<!-- Simple Tables -->
<xsl:template
match=
"table"
mode=
"textOnly"
>
<xsl:choose>
<!-- Tables that doesn't contain colspan, rowspan or included tables -->
<xsl:when
test=
"not(descendant::td/@colspan | descendant::td/@rowspan | descendant::table)"
>
<table>
<xsl:apply-templates
select=
"node()"
mode=
"textOnly"
/>
...
...
@@ -328,6 +325,7 @@
</xsl:choose>
</xsl:template>
<!-- Complexe Tables : create extern Ods files and copy content in it-->
<xsl:template
name=
"TableComplexe"
>
<xsl:variable
name=
"tableId"
>
<xsl:number
level=
"any"
count=
"table"
/>
...
...
@@ -352,10 +350,17 @@
</xsl:template>
<xsl:template
match=
"td | th"
mode=
"textOnly"
>
<td><p><xsl:apply-templates
select=
"."
mode=
"table"
/></p></td>
<xsl:choose>
<xsl:when
test=
"not(ul|ol)"
>
<td><p><xsl:apply-templates
select=
"."
mode=
"table"
/></p></td>
</xsl:when>
<xsl:otherwise>
<td><xsl:apply-templates
select=
"."
mode=
"table"
/></td>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template
match=
"b"
mode=
"table"
>
<xsl:template
match=
"b"
mode=
"table"
priority=
"1"
>
<!-- b is not allowed, however em is allowed: replacing all b by em -->
<xsl:element
name=
"em"
namespace=
"http://www.utc.fr/ics/hdoc/xhtml"
>
<xsl:apply-templates
select=
"node()"
mode=
"textOnly"
/>
...
...
@@ -364,13 +369,19 @@
<!-- Balises pour les abbréviations -->
<xsl:template
match=
"abbr"
mode=
"table"
priority=
"1"
>
<xsl:
value-of
select=
".
"
/>
<xsl:
apply-templates
select=
"node()"
mode=
"textOnly
"
/>
</xsl:template>
<xsl:template
match=
"sup"
mode=
"table"
priority=
"1"
>
<xsl:template
match=
"
abbr/
sup"
mode=
"table"
priority=
"1"
>
<sup><xsl:value-of
select=
"."
/></sup>
</xsl:template>
<xsl:template
match=
"ul|ol"
mode=
"table"
priority=
"1"
>
<xsl:element
name=
"{local-name()}"
>
<xsl:apply-templates
select=
"node()"
mode=
"textOnly"
/>
</xsl:element>
</xsl:template>
<!-- Images -->
...
...
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