]> Lady’s Gitweb - Shushe/blobdiff - lib/expandmetadata.xslt
Generate dependencies & destinations with metadata
[Shushe] / lib / expandmetadata.xslt
index e35e2c831b1ad21dce157e4039a0ae3b52ffc198..3d46c82873b05e0aff27da0076c3dc5e6d673008 100644 (file)
@@ -151,6 +151,38 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        </for-each>
                </copy>
        </template>
+       <template match="/">
+               <variable name="result-fragment">
+                       <apply-templates/>
+               </variable>
+               <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]">
+                               <value-of select="@rdf:about"/>
+                               <text>&#xA;</text>
+                               <for-each select="书社vocab:hasRecursiveDependencyOn/@rdf:resource">
+                                       <text>&#x9;</text>
+                                       <text>-</text>
+                                       <value-of select="."/>
+                                       <text>&#xA;</text>
+                               </for-each>
+                               <for-each select="书社vocab:hasDependencyOn/@rdf:resource">
+                                       <text>&#x9;</text>
+                                       <value-of select="."/>
+                                       <text>&#xA;</text>
+                               </for-each>
+                       </for-each>
+               </exsl:document>
+               <exsl:document href="destinations" method="text" encoding="UTF-8">
+                       <for-each select="$result//书社vocab:SourceFile">
+                               <value-of select="@rdf:about"/>
+                               <text>|</text>
+                               <value-of select="@书社vocab:destination"/>
+                               <text>&#xA;</text>
+                       </for-each>
+               </exsl:document>
+       </template>
        <template match="@*|node()">
                <copy>
                        <apply-templates select="@*|node()"/>
@@ -167,4 +199,5 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                        </call-template>
                </if>
        </template>
+       <output method="xml" encoding="UTF-8"/>
 </transform>
This page took 0.050633 seconds and 4 git commands to generate.