]> Lady’s Gitweb - Shushe/commitdiff
Add @data-tsv-header to TSV data cells
authorLady <redacted>
Thu, 2 May 2024 03:05:51 +0000 (23:05 -0400)
committerLady <redacted>
Thu, 2 May 2024 03:07:22 +0000 (23:07 -0400)
This produces pretty verbose output, but gzipping should be able to
significantly compress it as the attributes will be repeated verbatim
every row.

parsers/tsv.xslt

index 9018beaf6280fe7d27d28d51c6c1d17702ff1785..94a7395ce99aa369952981331577e580a9019ed7 100644 (file)
@@ -53,6 +53,9 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                        <html:tr>
                                                <for-each select="exsl:node-set($cols)/*[count(exsl:node-set($headcols)/*)>=position()]">
                                                        <html:td>
+                                                               <attribute name="data-tsv-header">
+                                                                       <value-of select="exsl:node-set($headcols)/*[count(current()/preceding-sibling::*)+1]"/>
+                                                               </attribute>
                                                                <value-of select="."/>
                                                                <if test="position()=count(exsl:node-set($headcols)/*)">
                                                                        <for-each select="following-sibling::*">
This page took 0.026167 seconds and 4 git commands to generate.