]> Lady’s Gitweb - Shushe/blob - transforms/asset.xslt
8ed07c4c56068ff5c3bd5b7619a1be85045e0d13
[Shushe] / transforms / asset.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 ⁌ ⛩📰 书社 ∷ transforms/asset.xslt
8
9 © 2023–2024 Lady [@ Ladys 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:exsl="http://exslt.org/common"
17 xmlns:html="http://www.w3.org/1999/xhtml"
18 xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
19 extension-element-prefixes="exsl"
20 version="1.0"
21 >
22 <书社:id>urn:fdc:ladys.computer:20231231:Shu1She4:asset.xslt</书社:id>
23 <template match="html:style|html:object[@type='text/css']"/>
24 <template match="html:object[@type='text/javascript']">
25 <html:script type="{@type}" src="{@data}">
26 <copy-of select="@书社:identifier"/>
27 </html:script>
28 </template>
29 <template match="html:object[starts-with(@type, 'audio/')]">
30 <html:audio controls="" src="{@data}">
31 <copy-of select="@书社:identifier"/>
32 </html:audio>
33 </template>
34 <template match="html:object[starts-with(@type, 'image/') and not(@type='image/svg+xml')]">
35 <html:img src="{@data}">
36 <copy-of select="@书社:identifier"/>
37 </html:img>
38 </template>
39 <template match="html:object[starts-with(@type, 'video/')]">
40 <html:video controls="" src="{@data}">
41 <copy-of select="@书社:identifier"/>
42 </html:video>
43 </template>
44 <template match="书社:id[string(.)='urn:fdc:ladys.computer:20231231:Shu1She4:asset.xslt']" mode="书社:metadata">
45 <for-each select="$书社:expansion//html:object[@type='text/css']">
46 <html:link rel="stylesheet" type="text/css" href="{@data}">
47 <copy-of select="@书社:identifier"/>
48 </html:link>
49 </for-each>
50 <for-each select="$书社:expansion//html:style">
51 <copy-of select="."/>
52 </for-each>
53 </template>
54 </transform>
This page took 0.053174 seconds and 3 git commands to generate.