From: Lady Date: Mon, 1 Apr 2024 20:45:42 +0000 (-0400) Subject: Improve (fix) the T·S·V parser X-Git-Tag: 0.7.0~5 X-Git-Url: https://git.ladys.computer/Shushe/commitdiff_plain/872c70923f2c19e4c9abad7ea1c2f5be1ffd3e65?ds=sidebyside;hp=f5f0fe051ba87bf53467803037f2cb210e9b47b2 Improve (fix) the T·S·V parser Although `exslstr:tokenize()` is fast, it should not be used when splitting the columns of a T·S·V file, as it will collapse empty columns. Introduce a new transform in `lib/` for splitting, and import it into the T·S·V parser. This transform was largely copied from Caudex and is likely to be useful downstream as well. Continue using `exslstr:tokenize()` for splitting the _rows_ of the T·S·V, as empty rows _should_ be collapsed. --- diff --git a/lib/split.xslt b/lib/split.xslt new file mode 100644 index 0000000..13c79ed --- /dev/null +++ b/lib/split.xslt @@ -0,0 +1,36 @@ + + + + + diff --git a/parsers/tsv.xslt b/parsers/tsv.xslt index a3dd927..ae721e4 100644 --- a/parsers/tsv.xslt +++ b/parsers/tsv.xslt @@ -16,15 +16,22 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one exclude-result-prefixes="exsl exslstr" version="1.0" > + <书社:id>urn:fdc:ladys.computer:20231231:Shu1She4:tsv.xslt