]> Lady’s Gitweb - Caudex/blob - transforms/entry.xslt
Make repository REUSE‐compliant
[Caudex] / transforms / entry.xslt
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
5 -->
6 <!--
7 ⁌ 🪾📰 Caudex ∷ transforms/entry.xslt
8
9 © 2024 Lady [@ Ladys Computer]
10
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/>.
13 -->
14 <!DOCTYPE transform [
15 <!ENTITY Caudex "urn:fdc:ladys.computer:20240204:Caudex:">
16 <!ENTITY LesML "urn:fdc:ladys.computer:20240512:LesML:">
17 <!ENTITY 书社 "urn:fdc:ladys.computer:20231231:Shu1She4:">
18 ]>
19 <transform
20 xmlns="http://www.w3.org/1999/XSL/Transform"
21 xmlns:Caudex="urn:fdc:ladys.computer:20240204:Caudex"
22 xmlns:exsl="http://exslt.org/common"
23 xmlns:html="http://www.w3.org/1999/xhtml"
24 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
25 exclude-result-prefixes="exsl Caudex"
26 version="1.0"
27 >
28 <书社:id>&Caudex;entry.xslt</书社:id>
29 <template match="/html:div[@书社:parsed-by='&Caudex;catalog.xslt'][@class='entry']">
30 <html:body>
31 <for-each select="@*[namespace-uri()!='urn:fdc:ladys.computer:20231231:Shu1She4']">
32 <copy/>
33 </for-each>
34 <for-each select="html:div[@id='@']/html:article[@书社:parsed-by='&LesML;parser.xslt']">
35 <variable name="metadata" select="html:footer[@class='head']/html:dl[1]"/>
36 <html:meta itemprop="&书社;title">
37 <attribute name="content">
38 <value-of select="$metadata//html:dt[string()='TITLE']/following-sibling::html:dd"/>
39 <if test="$metadata//html:dt[string()='TITLE'] and $metadata//html:dt[string()='ENTRY']">
40 <text> </text>
41 </if>
42 <if test="$metadata//html:dt[string()='ENTRY']">
43 <text>(</text>
44 <value-of select="$metadata//html:dt[string()='ENTRY']/following-sibling::html:dd"/>
45 <text>)</text>
46 </if>
47 </attribute>
48 </html:meta>
49 <html:article>
50 <if test="$metadata//html:dt[string()='TITLE']">
51 <html:h1>
52 <value-of select="$metadata//html:dt[string()='TITLE']/following-sibling::html:dd"/>
53 </html:h1>
54 </if>
55 <apply-templates select="node()[not(self::html:footer[@class='head'])]"/>
56 </html:article>
57 </for-each>
58 </html:body>
59 </template>
60 </transform>
This page took 0.05185 seconds and 5 git commands to generate.