]> Lady’s Gitweb - Shushe/blobdiff - lib/split.xslt
Improve (fix) the T·S·V parser
[Shushe] / lib / split.xslt
diff --git a/lib/split.xslt b/lib/split.xslt
new file mode 100644 (file)
index 0000000..13c79ed
--- /dev/null
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+⁌ ⛩️📰 书社 ∷ lib/split.xslt
+
+© 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/>.
+-->
+<transform
+       xmlns="http://www.w3.org/1999/XSL/Transform"
+       xmlns:html="http://www.w3.org/1999/xhtml"
+       xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
+       version="1.0"
+>
+       <template name="书社:split">
+               <param name="source"/>
+               <param name="separator" select="'&#xA;'"/>
+               <choose>
+                       <when test="contains($source, $separator)">
+                               <html:span>
+                                       <value-of select="substring-before($source, $separator)"/>
+                               </html:span>
+                               <call-template name="书社:split">
+                                       <with-param name="source" select="substring-after($source, $separator)"/>
+                                       <with-param name="separator" select="$separator"/>
+                               </call-template>
+                       </when>
+                       <otherwise>
+                               <html:span>
+                                       <value-of select="$source"/>
+                               </html:span>
+                       </otherwise>
+               </choose>
+       </template>
+</transform>
This page took 0.024687 seconds and 4 git commands to generate.