Bob, Here's my chunk template:
<xsl:template name="chunk"> <xsl:param name="node" select="."/> <!-- returns 1 if $node is a chunk --> <xsl:choose> <xsl:when test="not($node/parent::*)">1</xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='sect1' and ($chunk.first.sections != 0 or count($node/preceding-sibling::sect1) > 0)"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='commandlineprogramdef' and ($chunk.first.sections != 0 or count($node/preceding-sibling::commandlineprogramdef) > 0)"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='guiprogramdef' and ($chunk.first.sections != 0 or count($node/preceding-sibling::guiprogramdef) > 0)"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='apidef' and ($chunk.first.sections != 0 or count($node/preceding-sibling::apidef) > 0)"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='envardef' and ($chunk.first.sections != 0 or count($node/preceding-sibling::envardef) > 0)"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="$chunk.sections != 0 and name($node)='section' and count($node/parent::section) = 0 and ($chunk.first.sections != 0 or count($node/preceding-sibling::section))>0"> <xsl:text>1</xsl:text> </xsl:when> <xsl:when test="name($node)='preface'">1</xsl:when> <xsl:when test="name($node)='chapter'">1</xsl:when> <xsl:when test="name($node)='appendix'">1</xsl:when> <xsl:when test="name($node)='article'">1</xsl:when> <xsl:when test="name($node)='part'">1</xsl:when> <xsl:when test="name($node)='reference'">1</xsl:when> <xsl:when test="name($node)='refentry'">1</xsl:when> <xsl:when test="name($node)='index' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='bibliography' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='glossary' and (name($node/parent::*) = 'article' or name($node/parent::*) = 'book')">1</xsl:when> <xsl:when test="name($node)='colophon'">1</xsl:when> <xsl:when test="name($node)='book'">1</xsl:when> <xsl:when test="name($node)='set'">1</xsl:when> <xsl:when test="name($node)='setindex'">1</xsl:when> <!--/xsl:when--> <xsl:otherwise>0</xsl:otherwise> </xsl:choose> </xsl:template> Do you see anything odd? TIA, Gershon ---------------------------------------------------------------- To subscribe or unsubscribe from this elist use the subscription manager: <http://lists.oasis-open.org/ob/adm.pl>