Changeset c4cf6de


Ignore:
Timestamp:
09/27/2005 06:08:05 PM (19 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
0.2, 1.0, 2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
dc2fee8
Parents:
63b2859
Message:

Dump shell scripts now.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • dump-commands.xsl

    r63b2859 rc4cf6de  
    1212
    1313  <xsl:template match="sect1">
    14       <!-- The dirs names -->
    15     <xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
    16     <xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
    17     <xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
    18     <xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
    19       <!-- The file names -->
    20     <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
    21     <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
    22     <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
    23       <!-- The build order -->
    24     <xsl:variable name="position" select="position()"/>
    25     <xsl:variable name="order">
    26       <xsl:choose>
    27         <xsl:when test="string-length($position) = 1">
    28           <xsl:text>00</xsl:text>
    29           <xsl:value-of select="$position"/>
    30         </xsl:when>
    31         <xsl:when test="string-length($position) = 2">
    32           <xsl:text>0</xsl:text>
    33           <xsl:value-of select="$position"/>
    34         </xsl:when>
    35         <xsl:otherwise>
    36           <xsl:value-of select="$position"/>
    37         </xsl:otherwise>
    38       </xsl:choose>
    39     </xsl:variable>
    40       <!-- Creating dirs and files -->
    41     <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
    42       <xsl:text>#!/bin/sh&#xA;&#xA;</xsl:text>
    43       <xsl:apply-templates select=".//screen"/>
    44     </exsl:document>
     14    <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
     15      count(descendant::screen/userinput) &gt; count(descendant::screen[@role='nodump'])">
     16        <!-- The dirs names -->
     17      <xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
     18      <xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
     19      <xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
     20      <xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
     21        <!-- The file names -->
     22      <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
     23      <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
     24      <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
     25        <!-- The build order -->
     26      <xsl:variable name="position" select="position()"/>
     27      <xsl:variable name="order">
     28        <xsl:choose>
     29          <xsl:when test="string-length($position) = 1">
     30            <xsl:text>00</xsl:text>
     31            <xsl:value-of select="$position"/>
     32          </xsl:when>
     33          <xsl:when test="string-length($position) = 2">
     34            <xsl:text>0</xsl:text>
     35            <xsl:value-of select="$position"/>
     36          </xsl:when>
     37          <xsl:otherwise>
     38            <xsl:value-of select="$position"/>
     39          </xsl:otherwise>
     40        </xsl:choose>
     41      </xsl:variable>
     42        <!-- Creating dirs and files -->
     43      <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
     44        <xsl:text>#!/bin/sh&#xA;&#xA;</xsl:text>
     45        <xsl:apply-templates select=".//screen"/>
     46      </exsl:document>
     47    </xsl:if>
    4548  </xsl:template>
    4649
     
    5154        <xsl:otherwise>
    5255          <xsl:apply-templates select="userinput"/>
     56          <xsl:if test="position() != last()">
     57            <xsl:text> &amp;&amp;</xsl:text>
     58          </xsl:if>
     59          <xsl:text>&#xA;</xsl:text>
    5360        </xsl:otherwise>
    5461      </xsl:choose>
     
    5865  <xsl:template match="userinput">
    5966    <xsl:apply-templates/>
    60     <xsl:text> &amp;&amp;&#xA;</xsl:text>
    6167  </xsl:template>
    6268
Note: See TracChangeset for help on using the changeset viewer.