]> Lady’s Gitweb - Shushe/blobdiff - lib/expandmetadata.xslt
Get destinations from “with metadata” parsed file
[Shushe] / lib / expandmetadata.xslt
index 727d58a084bc4d9cb7f06969bd4db0dcb50189f0..df790f9830374436d6e3380b787b371ede001092 100644 (file)
@@ -1,12 +1,12 @@
 <?xml version="1.0"?>
 <!--
 <?xml version="1.0"?>
 <!--
-SPDX-FileCopyrightText: 2023, 2024, 2025 Lady <https://www.ladys.computer/about/#lady>
+SPDX-FileCopyrightText: 2023, 2024, 2025, 2026 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–2025 Lady [@ Ladys Computer].
+© 2023–2026 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/>.
@@ -28,9 +28,9 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        <variable name="files" select="//书社vocab:SourceFile|//书社vocab:IncludeFile"/>
        <variable name="stated-dependencies-fragment">
                <for-each select="$files[nie:interpretedAs/nfo:PlainTextDocument]">
        <variable name="files" select="//书社vocab:SourceFile|//书社vocab:IncludeFile"/>
        <variable name="stated-dependencies-fragment">
                <for-each select="$files[nie:interpretedAs/nfo:PlainTextDocument]">
-                       <variable name="uri" select="书社vocab:hasParsedFile/@nfo:fileUrl"/>
+                       <variable name="uri" select="书社vocab:hasParsedFileWithMetadata/@nfo:fileUrl"/>
                        <书社:Dependencies for="{@rdf:about}">
                        <书社:Dependencies for="{@rdf:about}">
-                               <for-each select="document($uri)//书社:link">
+                               <for-each select="document($uri)/书社:parsed/书社:result//书社:link">
                                        <variable name="spaced-show">
                                                <choose>
                                                        <when test="@xlink:show">
                                        <variable name="spaced-show">
                                                <choose>
                                                        <when test="@xlink:show">
@@ -170,7 +170,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                </copy>
        </template>
        <template match="//书社vocab:SourceFile[nie:interpretedAs/nfo:PlainTextDocument]" priority="1">
                </copy>
        </template>
        <template match="//书社vocab:SourceFile[nie:interpretedAs/nfo:PlainTextDocument]" priority="1">
-               <variable name="parsed" select="document(书社vocab:hasParsedFile/@nfo:fileUrl)"/>
+               <variable name="parsed" select="document(书社vocab:hasParsedFileWithMetadata/@nfo:fileUrl)/书社:parsed/书社:result"/>
                <variable name="provided-destinations" select="normalize-space($parsed/*/@书社:destination)"/>
                <variable name="destinations-fragment">
                        <if test="$provided-destinations!=''">
                <variable name="provided-destinations" select="normalize-space($parsed/*/@书社:destination)"/>
                <variable name="destinations-fragment">
                        <if test="$provided-destinations!=''">
@@ -241,7 +241,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                <variable name="result" select="exsl:node-set($result-fragment)"/>
                <copy-of select="$result/*"/>
                <exsl:document href="dependencies" method="text" encoding="UTF-8">
                <variable name="result" select="exsl:node-set($result-fragment)"/>
                <copy-of select="$result/*"/>
                <exsl:document href="dependencies" method="text" encoding="UTF-8">
-                       <for-each select="$result/rdf:RDF/*[nie:interpretedAs/nfo:PlainTextDocument]">
+                       <for-each select="$result/rdf:RDF/*[self::书社vocab:SourceFile|self::书社vocab:IncludeFile]">
                                <value-of select="@rdf:about"/>
                                <text>&#xA;</text>
                                <for-each select="书社vocab:hasRecursiveDependencyOn/@rdf:resource">
                                <value-of select="@rdf:about"/>
                                <text>&#xA;</text>
                                <for-each select="书社vocab:hasRecursiveDependencyOn/@rdf:resource">
@@ -262,7 +262,7 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        </for-each>
                </exsl:document>
                <exsl:document href="destinations" method="text" encoding="UTF-8">
                        </for-each>
                </exsl:document>
                <exsl:document href="destinations" method="text" encoding="UTF-8">
-                       <for-each select="$result//书社vocab:SourceFile">
+                       <for-each select="$result/rdf:RDF/书社vocab:SourceFile">
                                <value-of select="@rdf:about"/>
                                <text>|</text>
                                <for-each select="书社vocab:destination">
                                <value-of select="@rdf:about"/>
                                <text>|</text>
                                <for-each select="书社vocab:destination">
This page took 0.26149 seconds and 4 git commands to generate.