https://github.com/transpect/htmltables
Replace colspan and rowspan with virtual cells
https://github.com/transpect/htmltables
html tables
Last synced: 4 months ago
JSON representation
Replace colspan and rowspan with virtual cells
- Host: GitHub
- URL: https://github.com/transpect/htmltables
- Owner: transpect
- License: other
- Created: 2015-11-20T09:37:37.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2025-10-07T10:11:55.000Z (9 months ago)
- Last Synced: 2025-10-07T11:23:22.014Z (9 months ago)
- Topics: html, tables
- Language: XSLT
- Homepage:
- Size: 585 KB
- Stars: 1
- Watchers: 3
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# htmltables
Library for normalizing HTML tables (adding “physical grid” coordinates to each cell). Requires xslt-util
## Description
This implements Andrew J Welch's [Table Normalization in XSLT 2.0](http://andrewjwelch.com/code/xslt/table/table-normalization.html) in an XSLT function:
```xslt
```
Consider an XML or XHTML document containing HTML tables
```xhtml
a
b
c
d
```
Applying the XSLT function `htmltable:normalize()` will add virtual cells for each colspan and rowspan.
```
------------- -------------
| a | b | | a | b |
------- - -------------
| c | | --> | c | b |
------------- -------------
| d | | d | d |
------------- -------------
```
After the normalization, each cell contains `data` attributes which state the former position in the original table.
```xhtml
a
b
c
b
d
d
```