X-Git-Url: https://git.ladys.computer/Shushe/blobdiff_plain/ee9a8dfd2a43ea23ede57da28aebc3c2162edf51..ca7be60f15de191e25f8cc1890e13dc499576ec4:/parsers/tsv.xslt?ds=sidebyside diff --git a/parsers/tsv.xslt b/parsers/tsv.xslt index 5b3cc68..90e156e 100644 --- a/parsers/tsv.xslt +++ b/parsers/tsv.xslt @@ -11,11 +11,14 @@ SPDX-License-Identifier: MPL-2.0 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/>. --> +<!DOCTYPE transform [ + <!ENTITY xhtml 'http://www.w3.org/1999/xhtml'> +]> <transform xmlns="http://www.w3.org/1999/XSL/Transform" xmlns:exsl="http://exslt.org/common" xmlns:exslstr="http://exslt.org/strings" - xmlns:html="http://www.w3.org/1999/xhtml" + xmlns:html="&xhtml;" xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4" extension-element-prefixes="exsl exslstr" version="1.0" @@ -31,22 +34,25 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one <with-param name="separator" select="'	'"/> </call-template> </variable> - <html:table> + <element name="table" namespace="&xhtml;"> <for-each select="$lines[starts-with(., '#') and following-sibling::*[generate-id(.)=generate-id($head)]]"> <comment> <value-of select="substring-after(., '#')"/> </comment> </for-each> - <html:thead> - <html:tr> + <element name="thead" namespace="&xhtml;"> + <element name="tr" namespace="&xhtml;"> <for-each select="exsl:node-set($headcols)/*"> - <html:th scope="col"> + <element name="th" namespace="&xhtml;"> + <attribute name="scope"> + <text>col</text> + </attribute> <value-of select="."/> - </html:th> + </element> </for-each> - </html:tr> - </html:thead> - <html:tbody> + </element> + </element> + <element name="tbody" namespace="&xhtml;"> <for-each select="$head/following-sibling::*[normalize-space(.)!='']"> <choose> <when test="starts-with(., '#')"> @@ -61,9 +67,9 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one <with-param name="separator" select="'	'"/> </call-template> </variable> - <html:tr> + <element name="tr" namespace="&xhtml;"> <for-each select="exsl:node-set($cols)/*[count(exsl:node-set($headcols)/*)>=position()]"> - <html:td> + <element name="td" namespace="&xhtml;"> <attribute name="data-tsv-header"> <value-of select="exsl:node-set($headcols)/*[count(current()/preceding-sibling::*)+1]"/> </attribute> @@ -74,16 +80,16 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one <value-of select="."/> </for-each> </if> - </html:td> + </element> </for-each> <for-each select="exsl:node-set($headcols)/*[position()>count(exsl:node-set($cols)/*)]"> - <html:td/> + <element name="td" namespace="&xhtml;"/> </for-each> - </html:tr> + </element> </otherwise> </choose> </for-each> - </html:tbody> - </html:table> + </element> + </element> </template> </transform>