]> Lady’s Gitweb - Shushe/blobdiff - lib/metadata2destinations.xslt
Simplify metadata using new 书社vocab terms
[Shushe] / lib / metadata2destinations.xslt
index ef2d5a6a12038c07c54a3b5f92446b3b1e0d69a5..e82aa0b36cdd1e6857a7593853fcf56e40e0eed7 100644 (file)
@@ -6,46 +6,23 @@ SPDX-License-Identifier: MPL-2.0
 <!--
 ⁌ ⛩📰 书社 ∷ lib/metadata2destinations.xslt
 
-© 2024 Lady [@ Ladys Computer].
+© 2024 Lady [@ Ladys 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"
-       xmlns:dct="http://purl.org/dc/terms/"
-       xmlns:exslstr="http://exslt.org/strings"
-       xmlns:nie="http://www.semanticdesktop.org/ontologies/2007/01/19/nie#"
-       xmlns:nfo="http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#"
        xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-       xmlns:书社="urn:fdc:ladys.computer:20231231:Shu1She4"
-       extension-element-prefixes="exslstr"
+       xmlns:书社vocab="urn:fdc:ladys.computer:20231231:Shu1She4:vocab:"
        version="1.0"
 >
        <template match="/">
-               <for-each select="/rdf:RDF/nfo:LocalFileDataObject[starts-with(@rdf:about, 'about:shushe?source=')]">
-                       <choose>
-                               <when test="nie:interpretedAs/nfo:PlainTextDocument and dct:hasFormat/*/nie:interpretedAs/*[@nie:mimeType='application/xml']">
-                                       <variable name="destination" select="document(dct:hasFormat/*[nie:interpretedAs/*[@nie:mimeType='application/xml']]/@nfo:fileUrl[1])/*/@书社:destination"/>
-                                       <value-of select="@rdf:about"/>
-                                       <text>|</text>
-                                       <choose>
-                                               <when test="$destination">
-                                                       <value-of select="$destination"/>
-                                               </when>
-                                               <otherwise>
-                                                       <value-of select="substring-after(@rdf:about, 'about:shushe?source=')"/>
-                                               </otherwise>
-                                       </choose>
-                                       <text>&#xA;</text>
-                               </when>
-                               <otherwise>
-                                       <value-of select="@rdf:about"/>
-                                       <text>|</text>
-                                       <value-of select="substring-after(@rdf:about, 'about:shushe?source=')"/>
-                                       <text>&#xA;</text>
-                               </otherwise>
-                       </choose>
+               <for-each select="//书社vocab:SourceFile">
+                       <value-of select="@rdf:about"/>
+                       <text>|</text>
+                       <value-of select="@书社vocab:destination"/>
+                       <text>&#xA;</text>
                </for-each>
        </template>
        <output method="text" encoding="UTF-8"/>
This page took 0.153143 seconds and 4 git commands to generate.