]> Lady’s Gitweb - Shushe/blob - transforms/metadata.xslt
d4be49327dc6013e32413878d9fb0e9159c3d8aa
[Shushe] / transforms / metadata.xslt
1 <?xml version="1.0"?>
2 <!--
3 ⁌ ⛩️📰 书社 ∷ transforms/metadata.xslt
4
5 © 2023 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 <transform
11 xmlns="http://www.w3.org/1999/XSL/Transform"
12 xmlns:html="http://www.w3.org/1999/xhtml"
13 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
14 exclude-result-prefixes="书社"
15 version="1.0"
16 >
17 <template match="html:*[@itemscope][1]//html:meta[not(@name) and starts-with(@itemprop, 'urn:fdc:ladys.computer:20231231:Shu1She4:')]">
18 <comment>
19 <text>[书社:META] </text>
20 <value-of select="substring-after(@itemprop, 'urn:fdc:ladys.computer:20231231:Shu1She4:')"/>
21 <text>: </text>
22 <value-of select="@content"/>
23 </comment>
24 </template>
25 <template match="comment()[starts-with(., '[书社:META] ')]" mode="书社:metadata">
26 <variable name="property" select="substring-before(substring-after(., '[书社:META] '), ': ')"/>
27 <variable name="value" select="substring-after(., concat('[书社:META] ', $property, ': '))"/>
28 <choose>
29 <when test="$property='title'">
30 <html:title>
31 <value-of select="$value"/>
32 </html:title>
33 </when>
34 </choose>
35 </template>
36 </transform>
This page took 0.091875 seconds and 3 git commands to generate.