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
bd4d1451
Commit
bd4d1451
authored
Dec 17, 2015
by
haroldcb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ajout traitement listes dans tableaux, corrections bugs
parent
47227d6f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl
wikipedia_to_hdoc/xslt/wiki_to_hdoc.xsl
+19
-8
No files found.
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"
>
<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