]> Lady’s Gitweb - Shushe/blob - lib/catalog2destinations.xslt
411c454f1f1215bbe92b2e4d3d3a86d2c7d15c1e
[Shushe] / lib / catalog2destinations.xslt
1 <?xml version="1.0"?>
2 <!--
3 SPDX-FileCopyrightText: 2023, 2024 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
5 -->
6 <!--
7 ⁌ ⛩️📰 书社 ∷ lib/catalog2destinations.xslt
8
9 © 2024 Lady [@ Lady’s 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 <transform
15 xmlns="http://www.w3.org/1999/XSL/Transform"
16 xmlns:catalog="urn:oasis:names:tc:entity:xmlns:xml:catalog"
17 xmlns:exslstr="http://exslt.org/strings"
18 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
19 extension-element-prefixes="exslstr"
20 version="1.0"
21 >
22 <template match="/">
23 <for-each select="//catalog:uri[starts-with(@name, 'about:shushe?source=')]">
24 <choose>
25 <when test="substring-after(@uri, '#')='xml'">
26 <variable name="destination" select="document(substring-before(@uri, '#'), .)/*/@书社:destination"/>
27 <value-of select="@name"/>
28 <text>|</text>
29 <choose>
30 <when test="$destination">
31 <value-of select="$destination"/>
32 </when>
33 <otherwise>
34 <value-of select="substring-after(@name, 'about:shushe?source=')"/>
35 </otherwise>
36 </choose>
37 <text>&#xA;</text>
38 </when>
39 <otherwise>
40 <value-of select="@name"/>
41 <text>|</text>
42 <value-of select="substring-after(@name, 'about:shushe?source=')"/>
43 <text>&#xA;</text>
44 </otherwise>
45 </choose>
46 </for-each>
47 </template>
48 <output method="text" encoding="UTF-8"/>
49 </transform>
This page took 0.050451 seconds and 3 git commands to generate.