This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: Can I turn off numbering for Sections 3-5?
- From: Brian Burridge <maillist at burridge dot net>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: DocBookApps <docbook-apps at lists dot oasis-open dot org>
- Date: Thu, 27 Feb 2003 11:12:03 -0500
- Subject: RE: DOCBOOK-APPS: Can I turn off numbering for Sections 3-5?
- Organization:
- References: <E08C8F26F6901D42B1201763D125853815B580@ntdevexc.win.ansys.com>
Bob's solution worked. Thanks.
Brian
On Thu, 2003-02-27 at 11:09, Jeff Beal wrote:
> I just tested this. It doesn't work. So, either the template doesn't do
> what I thought it should, or there are other templates involved. I'm
> curious now, though, so I'll poke around at this one for a bit more before I
> give up.
>
> -----Original Message-----
> From: Jeff Beal [mailto:jeff dot beal at ansys dot com]
> Sent: Thursday, February 27, 2003 10:55 AM
> To: 'Brian Burridge'; DocBookApps
> Subject: RE: DOCBOOK-APPS: Can I turn off numbering for Sections 3-5?
>
>
> There's no parameter or other easy method for doing this, but I was just
> looking through the labelling code and found this template:
>
> <xsl:template name="label.this.section">
> <xsl:param name="section" select="."/>
> <xsl:value-of select="$section.autolabel"/>
> </xsl:template>
>
> My guess is that if you change that to this:
>
> <xsl:template name="label.this.section">
> <xsl:param name="section" select="."/>
> <xsl:variable name="elementname" select="local-name($section)"/>
> <xsl:choose>
> <xsl:when test="$elementname = sect1">
> <xsl:value-of select="$section.autolabel"/>
> </xsl:when>
> <xsl:when test="$elementname = sect2">
> <xsl:value-of select="$section.autolabel"/>
> </xsl:when>
> <xsl:when test="$elementname = section">
> <xsl:choose>
> <xsl:when test="count($section/ancestor::section > 2)">
> <xsl:value-of select="$section.autolabel"/>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="false()"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:when>
> <xsl:otherwise>
> <xsl:value-of select="false()"/>
> </xsl:otherwise>
> </xsl:choose>
> </xsl:template>
>
> you will get what you want.
>
> Jeff
>
> -----Original Message-----
> From: Brian Burridge [mailto:maillist at burridge dot net]
> Sent: Wednesday, February 26, 2003 5:32 PM
> To: DocBookApps
> Subject: DOCBOOK-APPS: Can I turn off numbering for Sections 3-5?
>
>
>
>
> I have a situation where I'm numbering the chapters and sections 1-2,
> but now one of my "sect2"'s contains a huge amount of text that has
> subsections, and I don't want them numbered (as the numbering gets a bit
> ridiculous, 1.1.1.1.1.2).
>
> Or is there a another tag that will allow my to have something like
> sections but without numbering?
>
> Brian