]> Lady’s Gitweb - Shushe/blobdiff - parsers/record-jar.xslt
Use <书社:apply-attributes-to-root> to add version
[Shushe] / parsers / record-jar.xslt
index 6255147014513d28e3af5d2f36902caea8b2ff9f..abaf08c04e450c09331cc81e3d55722448cc1ae6 100644 (file)
@@ -4,9 +4,9 @@ SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
 SPDX-License-Identifier: MPL-2.0
 -->
 <!--
-⁌ ⛩📰 书社 ∷ parsers/record-jar.xslt
+⁌ ⛩📰 书社 ∷ parsers/record-jar.xslt
 
-© 2024 Lady [@ Ladys Computer].
+© 2024 Lady [@ Ladys 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/>.
@@ -17,13 +17,18 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        xmlns:exslstr="http://exslt.org/strings"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
-       exclude-result-prefixes="exsl exslstr"
+       extension-element-prefixes="exsl exslstr"
        version="1.0"
 >
        <书社:id>urn:fdc:ladys.computer:20231231:Shu1She4:record-jar.xslt</书社:id>
        <template match="html:script[@type='text/record-jar']">
                <variable name="lines" select="exslstr:tokenize(., '&#xA;')"/>
                <html:div>
+                       <if test="starts-with($lines[1], '%%') and substring-after($lines[1], '%%')!=''">
+                               <comment>
+                                       <value-of select="substring-after($lines[1], '%%')"/>
+                               </comment>
+                       </if>
                        <for-each select="$lines[not(position()=1) and starts-with(., '%%')]">
                                <variable name="end" select="."/>
                                <variable name="start" select="preceding-sibling::*[starts-with(., '%%')][1]"/>
@@ -76,6 +81,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                </for-each>
                                        </html:dl>
                                </if>
+                               <if test="substring-after(., '%%')!=''">
+                                       <comment>
+                                               <value-of select="substring-after(., '%%')"/>
+                                       </comment>
+                               </if>
                        </for-each>
                </html:div>
        </template>
This page took 0.022831 seconds and 4 git commands to generate.