-<?xml version="1.0"?>
-<!--
-β πͺΎπ° Caudex β· parsers/codex-entry.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:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
- xmlns:exsl="http://exslt.org/common"
- xmlns:html="http://www.w3.org/1999/xhtml"
- xmlns:δΉ¦η€Ύ="urn:fdc:ladys.computer:20231231:Shu1She4"
- exclude-result-prefixes="exsl Caudex"
- version="1.0"
->
- <import href="../lib/split.xslt"/>
- <δΉ¦η€Ύ:id>urn:fdc:ladys.computer:20240204:Caudex:codex-entry.xslt</δΉ¦η€Ύ:id>
- <template match="html:script[@type='text/x.codex-entry']">
- <variable name="lines">
- <call-template name="Caudex:split">
- <with-param name="source" select="string()"/>
- </call-template>
- </variable>
- <variable name="linespans" select="exsl:node-set($lines)/*"/>
- <variable name="record-end" select="$linespans[starts-with(., '%%')][last()]"/>
- <variable name="text-start" select="$record-end/following-sibling::*[string()!=''][1]"/>
- <html:div>
- <html:script type="text/record-jar">
- <for-each select="$record-end/preceding-sibling::*|$record-end">
- <value-of select="."/>
- <text>
</text>
- </for-each>
- </html:script>
- <html:script type="text/plain">
- <for-each select="$text-start|$text-start/following-sibling::*">
- <value-of select="."/>
- <text>
</text>
- </for-each>
- </html:script>
- </html:div>
- </template>
-</transform>