El Jueves, 5 de Julio de 2007 18:58, [EMAIL PROTECTED] escribió:
> I usually like my documents structures as recursive sections,
> but in a specific one, I would actually prefer some sections not to carry a
> number, as that makes it otherwise look confusing (-> year numbers in the
> section title itself).
In LFS we have a customization to skip the label for <sect2> sections that
have an empty title, and to skip the label in Preface, among other things:
<!-- sect2.titlepage:
Uses h2 and removed a lot of unneeded code.
Skip empty titles.
No label in preface. -->
<!-- The original template is in
{docbook-xsl}/xhtml/titlepage.templates.xsl -->
<xsl:template name="sect2.titlepage">
<xsl:choose>
<xsl:when test="string-length(title) = 0"/>
<xsl:otherwise>
<h2 class="{name(.)}">
<xsl:if test="@id">
<a id="[EMAIL PROTECTED]" name="[EMAIL PROTECTED]"/>
</xsl:if>
<xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
<xsl:apply-templates select="." mode="label.markup"/>
<xsl:text>. </xsl:text>
</xsl:if>
<xsl:value-of select="title"/>
</h2>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
That main part for you is:
<xsl:if test="not(ancestor::preface) and $section.autolabel != 0">
<xsl:apply-templates select="." mode="label.markup"/>
<xsl:text>. </xsl:text>
</xsl:if>
You could change the "not(ancestor::preface)" to "not(@role='no_label')", for
example.
--
Manuel Canales Esparcia
Usuario de LFS nº2886: http://www.linuxfromscratch.org
LFS en castellano: http://www.escomposlinux.org/lfs-es http://www.lfs-es.info
TLDP-ES: http://es.tldp.org
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]