]> Lady’s Gitweb - Shushe/blobdiff - parsers/record-jar.xslt
Preserve comments in Record‐Jar and T·S·V formats
[Shushe] / parsers / record-jar.xslt
index bd047305f6d4d12376c2183579264bce40555ff0..abaf08c04e450c09331cc81e3d55722448cc1ae6 100644 (file)
@@ -24,6 +24,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
        <template match="html:script[@type='text/record-jar']">
                <variable name="lines" select="exslstr:tokenize(., '&#xA;')"/>
                <html:div>
+                       <if test="starts-with($lines[1], '%%') and substring-after($lines[1], '%%')!=''">
+                               <comment>
+                                       <value-of select="substring-after($lines[1], '%%')"/>
+                               </comment>
+                       </if>
                        <for-each select="$lines[not(position()=1) and starts-with(., '%%')]">
                                <variable name="end" select="."/>
                                <variable name="start" select="preceding-sibling::*[starts-with(., '%%')][1]"/>
@@ -76,6 +81,11 @@ If a copy of the M·P·L was not distributed with this file, You can obtain one
                                                </for-each>
                                        </html:dl>
                                </if>
+                               <if test="substring-after(., '%%')!=''">
+                                       <comment>
+                                               <value-of select="substring-after(., '%%')"/>
+                                       </comment>
+                               </if>
                        </for-each>
                </html:div>
        </template>
This page took 0.038014 seconds and 4 git commands to generate.