3 SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
7 ⁌ 📰 Caudex ∷ parsers/catalog.xslt
9 © 2024 Lady [@ Ladys Computer]
11 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
12 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/>.
15 xmlns="http://www.w3.org/1999/XSL/Transform"
16 xmlns:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
17 xmlns:catalog="urn:oasis:names:tc:entity:xmlns:xml:catalog"
18 xmlns:html="http://www.w3.org/1999/xhtml"
19 xmlns:xlink="http://www.w3.org/1999/xlink"
20 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
21 exclude-result-prefixes="catalog"
24 <书社:id>urn:fdc:ladys.computer:20240204:Caudex:catalog.xslt</书社:id>
25 <template match="/catalog:catalog">
26 <html:div class="{substring-after(catalog:uri[@name='?']/@uri, 'about:')}" 书社:parsed-by="urn:fdc:ladys.computer:20240204:Caudex:catalog.xslt">
27 <if test="catalog:uri[@name='.']">
28 <attribute name="书社:destination">
29 <value-of select="catalog:uri[@name='.']/@uri"/>
32 <apply-templates select="catalog:uri[not(@name='?' or @name='.')]"/>
35 <template match="catalog:uri[not(@name='?' or @name='.')]">
36 <html:div id="{@name}">
37 <if test="contains(@uri, '?cksum=')">
38 <attribute name="Caudex:cksum">
39 <value-of select="substring-after(@uri, '?cksum=')"/>
42 <书社:link xlink:show="embed">
43 <attribute name="xlink:href">
44 <text>about:shushe?include=</text>
46 <when test="contains(@uri, '?')">
47 <value-of select="substring-before(@uri, '?')"/>
50 <value-of select="@uri"/>