]> Lady’s Gitweb - Shushe/blob - lib/catalog2destinations.xslt
Allow injecting raw output in X·M·L serialization
[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:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
18 version="1.0"
19 >
20 <template match="/">
21 <for-each select="//catalog:uri[starts-with(@name, 'about:shushe?source=')]">
22 <choose>
23 <when test="substring-after(@uri, '#')='xml'">
24 <variable name="destination" select="document(substring-before(@uri, '#'), .)/*/@书社:destination"/>
25 <value-of select="@name"/>
26 <text>|</text>
27 <choose>
28 <when test="$destination">
29 <value-of select="$destination"/>
30 </when>
31 <otherwise>
32 <value-of select="substring-after(@name, 'about:shushe?source=')"/>
33 </otherwise>
34 </choose>
35 <text>&#xA;</text>
36 </when>
37 <otherwise>
38 <value-of select="@name"/>
39 <text>|</text>
40 <value-of select="substring-after(@name, 'about:shushe?source=')"/>
41 <text>&#xA;</text>
42 </otherwise>
43 </choose>
44 </for-each>
45 </template>
46 <output method="text" encoding="UTF-8"/>
47 </transform>
This page took 0.090747 seconds and 5 git commands to generate.