Skip to content

Commit 4aaba0d

Browse files
committed
update the table extraction logic
1 parent e8b6093 commit 4aaba0d

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

elsevier_coordinate_extraction/stylesheets/elsevier_table_extraction.xsl

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
44
xmlns:ce="http://www.elsevier.com/xml/common/dtd"
55
xmlns:cals="http://www.elsevier.com/xml/common/cals/dtd"
6-
exclude-result-prefixes="ce cals">
6+
xmlns:tb="http://www.elsevier.com/xml/common/table/dtd"
7+
exclude-result-prefixes="ce cals tb">
78

89
<xsl:output method="xml" indent="no" encoding="UTF-8"/>
910
<xsl:strip-space elements="*"/>
@@ -36,43 +37,43 @@
3637
</original-table>
3738
<transformed-table>
3839
<table>
39-
<xsl:apply-templates select="cals:tgroup" mode="html"/>
40+
<xsl:apply-templates select="cals:tgroup | ce:tgroup | tb:tgroup" mode="html"/>
4041
</table>
4142
</transformed-table>
4243
</extracted-table>
4344
</xsl:template>
4445

45-
<xsl:template match="cals:tgroup" mode="html">
46-
<xsl:apply-templates select="cals:thead" mode="html"/>
47-
<xsl:apply-templates select="cals:tbody" mode="html"/>
48-
<xsl:apply-templates select="cals:tfoot" mode="html"/>
46+
<xsl:template match="cals:tgroup | ce:tgroup | tb:tgroup" mode="html">
47+
<xsl:apply-templates select="cals:thead | ce:thead | tb:thead" mode="html"/>
48+
<xsl:apply-templates select="cals:tbody | ce:tbody | tb:tbody" mode="html"/>
49+
<xsl:apply-templates select="cals:tfoot | ce:tfoot | tb:tfoot" mode="html"/>
4950
</xsl:template>
5051

51-
<xsl:template match="cals:thead" mode="html">
52+
<xsl:template match="cals:thead | ce:thead | tb:thead" mode="html">
5253
<thead>
53-
<xsl:apply-templates select="cals:row" mode="html"/>
54+
<xsl:apply-templates select="cals:row | ce:row | tb:row" mode="html"/>
5455
</thead>
5556
</xsl:template>
5657

57-
<xsl:template match="cals:tbody" mode="html">
58+
<xsl:template match="cals:tbody | ce:tbody | tb:tbody" mode="html">
5859
<tbody>
59-
<xsl:apply-templates select="cals:row" mode="html"/>
60+
<xsl:apply-templates select="cals:row | ce:row | tb:row" mode="html"/>
6061
</tbody>
6162
</xsl:template>
6263

63-
<xsl:template match="cals:tfoot" mode="html">
64+
<xsl:template match="cals:tfoot | ce:tfoot | tb:tfoot" mode="html">
6465
<tfoot>
65-
<xsl:apply-templates select="cals:row" mode="html"/>
66+
<xsl:apply-templates select="cals:row | ce:row | tb:row" mode="html"/>
6667
</tfoot>
6768
</xsl:template>
6869

69-
<xsl:template match="cals:row" mode="html">
70+
<xsl:template match="cals:row | ce:row | tb:row" mode="html">
7071
<tr>
71-
<xsl:apply-templates select="cals:entry" mode="html"/>
72+
<xsl:apply-templates select="cals:entry | ce:entry | tb:entry" mode="html"/>
7273
</tr>
7374
</xsl:template>
7475

75-
<xsl:template match="cals:entry" mode="html">
76+
<xsl:template match="cals:entry | ce:entry | tb:entry" mode="html">
7677
<xsl:variable name="namest" select="@namest"/>
7778
<xsl:variable name="nameend" select="@nameend"/>
7879
<xsl:variable name="morerows" select="@morerows"/>

0 commit comments

Comments
 (0)