]> Lady’s Gitweb - Shushe/blobdiff - lib/catalog2parser.xslt
Track catalog & magic prereqs and diff for changes
[Shushe] / lib / catalog2parser.xslt
index 0b66c4ef1812b9d0382e9b3353d8fb0b2d63a0a1..97800132ed13e98e7eaa95339e8ce599f6def6e4 100644 (file)
@@ -23,9 +23,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        <template match="/">
                <xslt:transform version="1.0">
                        <xslt:param name="BUILDTIME" select="'1972-12-31T00:00:00Z'"/>
+                       <xslt:param name="CKSUM" select="false"/>
+                       <xslt:param name="GENERATOR" select="false"/>
+                       <xslt:param name="SRCREV" select="false"/>
                        <xslt:param name="SRCTIME" select="'1972-12-31T00:00:00Z'"/>
                        <xslt:param name="VERSION" select="false"/>
-                       <xslt:param name="SRCREV" select="false"/>
                        <xslt:variable name="书社:parsers">
                                <html:dl>
                                        <for-each select="//catalog:uri">
@@ -98,7 +100,24 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                </xslt:for-each>
                        </xslt:template>
                        <xslt:template match="/">
-                               <xslt:apply-templates select="node()" mode="书社:parse"/>
+                               <xslt:variable name="parsedroot">
+                                       <xslt:apply-templates select="node()" mode="书社:parse"/>
+                               </xslt:variable>
+                               <xslt:for-each select="exsl:node-set($parsedroot)/node()">
+                                       <xslt:choose>
+                                               <xslt:when test="self::*">
+                                                       <xslt:copy>
+                                                               <xslt:attribute name="书社:cksum">
+                                                                       <xslt:value-of select="$CKSUM"/>
+                                                               </xslt:attribute>
+                                                               <xslt:copy-of select="@*|node()"/>
+                                                       </xslt:copy>
+                                               </xslt:when>
+                                               <xslt:otherwise>
+                                                       <xslt:copy-of select="."/>
+                                               </xslt:otherwise>
+                                       </xslt:choose>
+                               </xslt:for-each>
                        </xslt:template>
                        <xslt:template match="@*|node()" priority="-1">
                                <xslt:copy>
This page took 0.0274 seconds and 4 git commands to generate.