Hi Robert,
I was not refering to two-pass profiling, I was refering to the two files that are needed for customizing chunked HTML.

In the chunking stylesheet, there are two templates for each element: one for chunking and one for formatting the content of the chunk. The chunking templates have higher import precedence than the content-formatting templates. When you process the document, for each element, it first applies the chunking template to create the wrapper for the content, and inside that it does xsl:apply-imports, which causes the stylesheet to reach down in the import precedence to the original formatting template for that element.

If you were to just put an element-formatting template in a stylesheet that imports chunk.xsl, your template will overwrite the chunking template for that element and break the output. Instead, your formatting template needs to be at a lower import precedence, and that set up is described in my book.

Regarding the table of contents, you could add another template:

<xsl:template match="d:appendix[@role = 'endnotes']" mode="object.title.markup">
 <xsl:apply-templates select="." mode="title.markup"/>
</xsl:template>

The 'object.title.markup' mode generates "Appendix A: Endnotes", while 'title.markup' mode generates just "Endnotes". I haven't tested this, but something like it should work.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Robert Nagle" <[email protected]>
To: <[email protected]>; "Jason Zech" <[email protected]>
Sent: Monday, July 11, 2011 10:21 AM
Subject: Re: [docbook-apps] endnotes section in ePub


I am somewhat interested in the method for customizing chunking
described here because I face similar scenarios.


YOU SAID: In this case, you want the standard chunking behavior for an
appendix, but you want to alter its content.  Therefore, your custom
template just needs to handle the content and not try to deal with the
chunking process.  That means it needs to be in the "mydocbook.xsl"
part of the customization described in that doc.

If you were doing two pass profiling, then the first pass will create
the content for the appendix while the second pass will make the chunk
URL work with the html output? Is that what you mean? Or am I
confusing 2 different things?

Also, how would you instruct the HTML TOC not to omit  the label
APPENDIX but not the others?

Thanks.


--
Robert Nagle
6121 Winsome Ln #56C, Houston TX 77057-5581
(H) 713 893 3424/ (W) 832-251-7522 Carbon Neutral Since Jan 2010
http://www.robertnagle.info

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to