]> Lady’s Gitweb - Shushe/blobdiff - parsers/tsv.xslt
Redirect messages to stderr & support disabling
[Shushe] / parsers / tsv.xslt
index ae721e4e8565424d81df15b6303752d492e620c8..94a7395ce99aa369952981331577e580a9019ed7 100644 (file)
@@ -1,8 +1,12 @@
 <?xml version="1.0"?>
 <!--
+SPDX-FileCopyrightText: 2023, 2024 Lady <https://www.ladys.computer/about/#lady>
+SPDX-License-Identifier: MPL-2.0
+-->
+<!--
 ⁌ ⛩️📰 书社 ∷ parsers/tsv.xslt
 
-© 2023–2024 Lady [@ Lady’s Computer]
+© 2023–2024 Lady [@ Lady’s Computer].
 
 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
 If a copy of the M·P·L was not distributed with this file, You can obtain one at <https://mozilla.org/MPL/2.0/>.
@@ -13,7 +17,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        xmlns:exslstr="http://exslt.org/strings"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
-       exclude-result-prefixes="exsl exslstr"
+       extension-element-prefixes="exsl exslstr"
        version="1.0"
 >
        <import href="../lib/split.xslt"/>
@@ -47,11 +51,14 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                </call-template>
                                        </variable>
                                        <html:tr>
-                                               <for-each select="exsl:node-set($cols)/*[count(exsl:node-set($headcols)/*)>position()]">
+                                               <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:*">
+                                                                       <for-each select="following-sibling::*">
                                                                                <text>&#x9;</text>
                                                                                <value-of select="."/>
                                                                        </for-each>
This page took 0.022824 seconds and 4 git commands to generate.