Changeset 7860781 for stylesheets/xhtml


Ignore:
Timestamp:
May 10, 2006, 4:36:57 PM (19 years ago)
Author:
Jim Gifford <clfs@…>
Children:
e510c7f
Parents:
3d23af3
Message:

r3374@server (orig r1557): manuel | 2006-05-10 15:51:37 -0700
Updated stylesheets to match current LFS features.

Location:
stylesheets/xhtml
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • stylesheets/xhtml/lfs-sections.xsl

    r3d23af3 r7860781  
    5454  <xsl:param name="section.label.includes.component.label" select="1"/>
    5555
    56     <!-- Skip numeraration for sections with empty title -->
     56    <!-- Use lowercase roman numbers for sect1 in preface -->
     57  <xsl:template match="sect1" mode="label.markup">
     58    <!-- if the parent is a component, maybe label that too -->
     59    <xsl:variable name="parent.is.component">
     60      <xsl:call-template name="is.component">
     61        <xsl:with-param name="node" select=".."/>
     62      </xsl:call-template>
     63    </xsl:variable>
     64    <xsl:variable name="component.label">
     65      <xsl:if test="$section.label.includes.component.label != 0
     66                    and $parent.is.component != 0">
     67        <xsl:variable name="parent.label">
     68          <xsl:apply-templates select=".." mode="label.markup"/>
     69        </xsl:variable>
     70        <xsl:if test="$parent.label != ''">
     71          <xsl:apply-templates select=".." mode="label.markup"/>
     72          <xsl:apply-templates select=".." mode="intralabel.punctuation"/>
     73        </xsl:if>
     74      </xsl:if>
     75    </xsl:variable>
     76    <xsl:choose>
     77      <xsl:when test="@label">
     78        <xsl:value-of select="@label"/>
     79      </xsl:when>
     80      <xsl:when test="$section.autolabel != 0">
     81        <xsl:copy-of select="$component.label"/>
     82        <xsl:choose>
     83          <xsl:when test="ancestor::preface">
     84            <xsl:number format="i" count="sect1"/>
     85          </xsl:when>
     86          <xsl:otherwise>
     87            <xsl:number format="1" count="sect1"/>
     88          </xsl:otherwise>
     89        </xsl:choose>
     90      </xsl:when>
     91    </xsl:choose>
     92  </xsl:template>
     93
     94    <!-- Skip numeration for sect2 with empty title -->
    5795  <xsl:template match="sect2|sect3|sect4|sect5" mode="label.markup">
    5896    <xsl:if test="string-length(title) > 0">
  • stylesheets/xhtml/lfs-titles.xsl

    r3d23af3 r7860781  
    7979          </xsl:if>
    8080          <h2 class="{name(.)}">
    81             <xsl:apply-templates select="." mode="label.markup"/>
    82             <xsl:text>. </xsl:text>
     81            <xsl:if test="not(ancestor::preface)">
     82              <xsl:apply-templates select="." mode="label.markup"/>
     83              <xsl:text>. </xsl:text>
     84            </xsl:if>
    8385            <xsl:value-of select="title"/>
    8486          </h2>
Note: See TracChangeset for help on using the changeset viewer.