Changeset e967368
- Timestamp:
- 05/12/2018 11:29:29 AM (6 years ago)
- Branches:
- 2.4
- Parents:
- 56a5508
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
common/chroot.xsl
r56a5508 re967368 15 15 <xsl:template match="sect1"> 16 16 <xsl:if 17 test="descendant::screen/userinput[starts-with(string(),'chroot')]"> 17 test="descendant::screen/userinput[contains(string(),'
chroot') or 18 starts-with(string(),'chroot')]"> 18 19 <!-- The file names --> 19 20 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/> … … 40 41 <exsl:document href="{$order}-{$filename}" method="text"> 41 42 <xsl:text>#!/bin/bash
</xsl:text> 42 <xsl:apply-templates select=".//userinput[starts-with(string(),'chroot')]"/> 43 <xsl:apply-templates 44 select=".//userinput[contains(string(),'
chroot') or 45 starts-with(string(),'chroot')]"/> 43 46 <xsl:text>exit
</xsl:text> 44 47 </exsl:document> … … 47 50 48 51 <xsl:template match="userinput"> 49 <xsl:apply-templates/> 50 <xsl:text>
</xsl:text> 52 <xsl:call-template name="extract-chroot"> 53 <xsl:with-param name="instructions" select="string()"/> 54 </xsl:call-template> 55 </xsl:template> 56 57 <xsl:template name="extract-chroot"> 58 <xsl:param name="instructions" select="''"/> 59 <xsl:choose> 60 <xsl:when test="not(starts-with($instructions,'
chroot')) and 61 contains($instructions, '
chroot')"> 62 <xsl:call-template name="extract-chroot"> 63 <xsl:with-param name="instructions" 64 select="substring(substring-after($instructions, 65 substring-before($instructions, 66 '
chroot')),2)"/> 67 </xsl:call-template> 68 </xsl:when> 69 <xsl:when test="contains($instructions,'\
')"> 70 <xsl:copy-of select="substring-before($instructions,'\
')"/> 71 <xsl:text>\ 72 </xsl:text> 73 <xsl:call-template name="extract-chroot"> 74 <xsl:with-param name="instructions" 75 select="substring-after($instructions,'\
')"/> 76 </xsl:call-template> 77 </xsl:when> 78 <xsl:when test="contains($instructions,'
')"> 79 <xsl:copy-of select="substring-before($instructions,'
')"/> 80 <xsl:text> 81 </xsl:text> 82 </xsl:when> 83 <xsl:otherwise> 84 <xsl:copy-of select="$instructions"/> 85 <xsl:text> 86 </xsl:text> 87 </xsl:otherwise> 88 </xsl:choose> 51 89 </xsl:template> 52 90 </xsl:stylesheet>
Note:
See TracChangeset
for help on using the changeset viewer.