3 SPDX-FileCopyrightText: 2024 Lady <https://www.ladys.computer/about/#lady>
4 SPDX-License-Identifier: MPL-2.0
7 ⁌ ⛩📰 书社 ∷ lib/literally.xslt
9 © 2024 Lady [@ Ladys Computer].
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/>.
15 xmlns="http://www.w3.org/1999/XSL/Transform"
16 xmlns:xslt="http://www.w3.org/1999/XSL/TransformAlias"
17 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
20 <template match="node()" mode="书社:literally">
21 <param name="extension-element-namespaces"/>
23 <when test="self::* and contains(concat(' http://www.w3.org/1999/XSL/Transform ', normalize-space($extension-element-namespaces), ' '), concat(' ', namespace-uri(), ' '))">
24 <xslt:element name="{name()}" namespace="{namespace-uri()}">
25 <for-each select="@*">
26 <xslt:attribute name="{name()}" namespace="{namespace-uri()}">
28 <value-of select="."/>
32 <apply-templates mode="书社:literally"/>
36 <element name="{name()}" namespace="{namespace-uri()}">
37 <for-each select="@*[not(contains(., '{') or contains(., '}'))]">
38 <attribute name="{name()}" namespace="{namespace-uri()}">
39 <value-of select="."/>
42 <for-each select="@*[contains(., '{') or contains(., '}')]">
43 <xslt:attribute name="{name()}" namespace="{namespace-uri()}">
45 <value-of select="."/>
49 <apply-templates mode="书社:literally"/>
52 <when test="self::text()">
54 <value-of select="."/>
57 <when test="self::processing-instruction()">
58 <xslt:processing-instruction name="{local-name()}">
60 <value-of select="."/>
62 </xslt:processing-instruction>
64 <when test="self::comment()">
67 <value-of select="."/>
72 <apply-templates mode="书社:literally"/>