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