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