This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] HTML Formatting Procedure Steps



On Thursday, April 10, 2003, at 06:32 PM, Scott Anguish wrote:


Formatting Procedure Steps differently.



Answering my own question here...


Adding this in my custom .xsl file.. gives me what I needed.. it'd be nice to be able to just param out the OL/UL from Procedure..

<xsl:template match="step">
  <div class="step">
	<h3>Step <xsl:number level="any" from="article"/></h3>
	<div class="stepcontents">
    <xsl:call-template name="anchor"/>
    <xsl:apply-templates/>
  </div>
  </div>
</xsl:template>

<xsl:template match="procedure">
<xsl:variable name="param.placement"
select="substring-after(normalize-space($formal.title.placement),
concat(local-name(.), ' '))"/>


  <xsl:variable name="placement">
    <xsl:choose>
      <xsl:when test="contains($param.placement, ' ')">
        <xsl:value-of select="substring-before($param.placement, ' ')"/>
      </xsl:when>
      <xsl:when test="$param.placement = ''">before</xsl:when>
      <xsl:otherwise>
        <xsl:value-of select="$param.placement"/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:variable>

  <xsl:variable name="preamble"
                select="*[not(self::step or self::title)]"/>

  <div class="{name(.)}">
    <xsl:call-template name="anchor"/>

    <xsl:if test="title and $placement = 'before'">
      <xsl:call-template name="formal.object.heading"/>
    </xsl:if>

<xsl:apply-templates select="$preamble"/>

<xsl:choose>
<xsl:when test="count(step) = 1">
<xsl:apply-templates select="step"/>
</xsl:when>
<xsl:otherwise>
<xsl:attribute name="type">
<xsl:value-of select="substring($procedure.step.numeration.formats,1,1)"/>
</xsl:attribute>
<xsl:apply-templates select="step"/>
</xsl:otherwise>
</xsl:choose>


    <xsl:if test="title and $placement != 'before'">
      <xsl:call-template name="formal.object.heading"/>
    </xsl:if>
  </div>
</xsl:template>


--------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe at lists dot oasis-open dot org For additional commands, e-mail: docbook-apps-help at lists dot oasis-open dot org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]