]> Lady’s Gitweb - Shushe/blobdiff - lib/expandmetadata.xslt
Support parsed metadata
[Shushe] / lib / expandmetadata.xslt
index f2efd18209177db3a846d1053cf16955ed2a74f8..027aaa74d4b2ae67dd131efc179c9d7ca6ca8f1b 100644 (file)
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
 <?xml version="1.0"?>
 <!--
-SPDX-FileCopyrightText: 2023, 2024 Lady <https://www.ladys.computer/about/#lady>
+SPDX-FileCopyrightText: 2023, 2024, 2025 Lady <https://www.ladys.computer/about/#lady>
 SPDX-License-Identifier: MPL-2.0
 -->
 <!--
 ⁌ ⛩📰 书社 ∷ lib/expandmetadata.xslt
 
 SPDX-License-Identifier: MPL-2.0
 -->
 <!--
 ⁌ ⛩📰 书社 ∷ lib/expandmetadata.xslt
 
-© 2023–2024 Lady [@ Ladys Computer].
+© 2023–2025 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/>.
 
 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/>.
@@ -78,6 +78,14 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        </otherwise>
                </choose>
        </template>
                        </otherwise>
                </choose>
        </template>
+       <template match="nie:interpretedAs/*" priority="1">
+               <copy>
+                       <apply-templates select="@*|node()"/>
+                       <for-each select="../../书社vocab:hasParsedFileWithMetadata">
+                               <copy-of select="document(@nfo:fileUrl)/书社:parsed/书社:metadata/rdf:RDF/rdf:Description/node()"/>
+                       </for-each>
+               </copy>
+       </template>
        <template match="//书社vocab:SourceFile[not(nie:interpretedAs/nfo:PlainTextDocument)]" priority="1">
                <copy>
                        <apply-templates select="@*"/>
        <template match="//书社vocab:SourceFile[not(nie:interpretedAs/nfo:PlainTextDocument)]" priority="1">
                <copy>
                        <apply-templates select="@*"/>
@@ -133,6 +141,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        </for-each>
                </copy>
        </template>
                        </for-each>
                </copy>
        </template>
+       <template match="书社vocab:hasParsedFileWithMetadata" priority="1"/>
        <template match="/">
                <variable name="result-fragment">
                        <apply-templates/>
        <template match="/">
                <variable name="result-fragment">
                        <apply-templates/>
This page took 0.306165 seconds and 4 git commands to generate.