OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] chunking only the last section in each chapter


Hello. The example data that I provided below in my previous post is pretty
bad. I just need to figure out the maximum id of the sections in a any given
chapter and only chunk that section.

So far I have something like this:

    <xsl:for-each select="section[@id]">
          <xsl:sort data-type="text" order="descending" />
          <xsl:if test="position() = 1">
            <xsl:message>found <xsl:value-of select="@id"/></xsl:message>
		<xsl:apply-templates select="."/>
          </xsl:if>
    </xsl:for-each>

Which finds the maximum ID for the sections, but I'm stuck as to where to
put this, and how to control which section gets processed. I tried putting
it in the chunk code for match="chapter" (from chunk-code.xsl). But that
didn't work, it's processing all the sections.

Hope that makes sense?

LN

-----Original Message-----
From: Webmaster
Sent: Monday, June 26, 2006 7:52 PM
To: apps docbook
Subject: [docbook-apps] chunking only the last section in each chapter


I know this may seem like a silly request, but how would I go about only
getting the chunking out the last section in each chapter? (ignore the rest
of the sections)

So If I had:

chapter 1
        section id=A
        section id=B
        section id=C
chapter 2
        section id=A
        section id=B
        section id=C
chapter 3
        section id=A
        section id=B
        section id=C

The resulting html chunks would be of only the following.

chapter 1
        section id=C
chapter 2
        section id=C
chapter 3
        section id=C

Thanks!

LN

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


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]