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] RE: [docbook] TOC / document function


The reason for the empty TOC line is because a chapter element is processed 
with a different template with mode="toc" to generate the TOC entry.  Those 
templates are found in fo/autotoc.xsl.  In other parts of the stylesheet, a 
chapter element may also be processed in mode="title.markup", 
mode="object.title.markup", mode="label.markup", etc.  None of those 
templates will be aware of the @file attribute unless you customize them as 
well.  As Mauritz suggested, generally it is best to assemble your content 
using XInclude and let the stock stylesheets handle it.

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobs@sagehill.net


----- Original Message ----- 
From: "Mauritz Jeanson" <mj@johanneberg.com>
To: "'Joe Hines'" <jhines@pattieng.com>; 
<docbook-apps@lists.oasis-open.org>
Sent: Tuesday, November 20, 2007 10:39 AM
Subject: [docbook-apps] RE: [docbook] TOC / document function


>> -----Original Message-----
>> From: Joe Hines
>>
>> I'm trying to import a docbook chapter from an external
>> docbook formatted XML file and am having some trouble with
>> the table of contents.
>>
>> I have the following template in my customization layer:
>>
>> <xsl:template match="chapter[@file]">
>>   <xsl:variable name="chapterfile" select="document(@file)"/>
>>   <xsl:apply-templates select="$chapterfile//*"/>
>>  </xsl:template>
>>
>> And in my XML document have the following line:
>>
>> <chapter file="testdoc.xml"/>
>
>
> [moving this over to the docbook-apps list where tool/stylesheet issues 
> are
> discussed]
>
>
> I realize that this is not an answer to your question, but unless you 
> have a
> very good reason for doing the inclusion in XSLT, I would suggest using
> XInclude instead.
>
> The details are here: http://www.sagehill.net/docbookxsl/ModularDoc.html.
>
> /MJ
>
>
>
> ---------------------------------------------------------------------
> 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]