]> Lady’s Gitweb - Caudex/blob - parsers/codex-entry.xslt
Always build catalogs when non·extant
[Caudex] / parsers / codex-entry.xslt
1 <?xml version="1.0"?>
2 <!--
3 ⁌ 🪾📰 Caudex ∷ parsers/codex-entry.xslt
4
5 © 2024 Lady [@ Lady’s Computer]
6
7 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
8 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/>.
9 -->
10 <transform
11 xmlns="http://www.w3.org/1999/XSL/Transform"
12 xmlns:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
13 xmlns:exsl="http://exslt.org/common"
14 xmlns:html="http://www.w3.org/1999/xhtml"
15 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
16 exclude-result-prefixes="exsl Caudex"
17 version="1.0"
18 >
19 <import href="../lib/split.xslt"/>
20 <书社:id>urn:fdc:ladys.computer:20240204:Caudex:codex-entry.xslt</书社:id>
21 <template match="html:script[@type='text/x.codex-entry']">
22 <variable name="lines">
23 <call-template name="Caudex:split">
24 <with-param name="source" select="string()"/>
25 </call-template>
26 </variable>
27 <variable name="linespans" select="exsl:node-set($lines)/*"/>
28 <variable name="record-end" select="$linespans[starts-with(., '%%')][last()]"/>
29 <variable name="text-start" select="$record-end/following-sibling::*[string()!=''][1]"/>
30 <html:div>
31 <html:script type="text/record-jar">
32 <for-each select="$record-end/preceding-sibling::*|$record-end">
33 <value-of select="."/>
34 <text>&#xA;</text>
35 </for-each>
36 </html:script>
37 <html:script type="text/plain">
38 <for-each select="$text-start|$text-start/following-sibling::*">
39 <value-of select="."/>
40 <text>&#xA;</text>
41 </for-each>
42 </html:script>
43 </html:div>
44 </template>
45 </transform>
This page took 0.0601 seconds and 5 git commands to generate.