]> Lady’s Gitweb - Shushe/blobdiff - transforms/asset.xslt
Support pagination
[Shushe] / transforms / asset.xslt
index a85c891c3dbbedfd0da5ddc0a9c58f5a215559b7..f7636c2f2b255298d162c2c39c354d85314507eb 100644 (file)
@@ -1,29 +1,55 @@
 <?xml version="1.0"?>
 <!--
 <?xml version="1.0"?>
 <!--
+SPDX-FileCopyrightText: 2023, 2024 Lady <https://www.ladys.computer/about/#lady>
+SPDX-License-Identifier: MPL-2.0
+-->
+<!--
 ⁌ ⛩️📰 书社 ∷ transforms/asset.xslt
 
 ⁌ ⛩️📰 书社 ∷ transforms/asset.xslt
 
-© 2023 Lady [@ Lady’s Computer]
+© 2023–2024 Lady [@ Lady’s Computer].
 
 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
 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/>.
 -->
 <transform
        xmlns="http://www.w3.org/1999/XSL/Transform"
 
 This Source Code Form is subject to the terms of the Mozilla Public License, v 2.0.
 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/>.
 -->
 <transform
        xmlns="http://www.w3.org/1999/XSL/Transform"
+       xmlns:exsl="http://exslt.org/common"
        xmlns:html="http://www.w3.org/1999/xhtml"
        xmlns:html="http://www.w3.org/1999/xhtml"
+       xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
        xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
        xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
-       exclude-result-prefixes="书社"
+       extension-element-prefixes="exsl"
        version="1.0"
 >
        version="1.0"
 >
-       <template match="html:object[@type='text/css']">
-               <comment>
-                       <text>[书社:CSS] </text>
-                       <value-of select="@data"/>
-               </comment>
+       <书社:id>urn:fdc:ladys.computer:20231231:Shu1She4:asset.xslt</书社:id>
+       <template match="html:style|html:object[@type='text/css']"/>
+       <template match="html:object[@type='text/javascript']">
+               <html:script type="{@type}" src="{@data}">
+                       <copy-of select="@书社:identifier"/>
+               </html:script>
        </template>
        </template>
-       <template match="comment()[starts-with(., '[书社:CSS] ')]" mode="书社:metadata">
-               <html:link rel="stylesheet" type="text/css" href="{substring-after(., '[书社:CSS] ')}"/>
+       <template match="html:object[starts-with(@type, 'audio/')]">
+               <html:audio controls="" src="{@data}">
+                       <copy-of select="@书社:identifier"/>
+               </html:audio>
        </template>
        </template>
-       <template match="html:object[@type='text/javascript']">
-               <html:script type="{@type}" src="{@data}"/>
+       <template match="html:object[starts-with(@type, 'image/') and not(@type='image/svg+xml')]">
+               <html:img src="{@data}">
+                       <copy-of select="@书社:identifier"/>
+               </html:img>
+       </template>
+       <template match="html:object[starts-with(@type, 'video/')]">
+               <html:video controls="" src="{@data}">
+                       <copy-of select="@书社:identifier"/>
+               </html:video>
+       </template>
+       <template match="xslt:include[@书社:id='urn:fdc:ladys.computer:20231231:Shu1She4:asset.xslt']" mode="书社:metadata">
+               <for-each select="exsl:node-set($书社:expansion)//html:object[@type='text/css']">
+                       <html:link rel="stylesheet" type="text/css" href="{@data}">
+                               <copy-of select="@书社:identifier"/>
+                       </html:link>
+               </for-each>
+               <for-each select="exsl:node-set($书社:expansion)//html:style">
+                       <copy-of select="."/>
+               </for-each>
        </template>
 </transform>
        </template>
 </transform>
This page took 0.024615 seconds and 4 git commands to generate.