[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] xsl/xhtml customization layer question
----- Original Message ----- From: <Michael_Piastro@harte-hanks.com> To: <docbook-apps@lists.oasis-open.org> Sent: Friday, July 11, 2003 7:29 AM Subject: [docbook-apps] xsl/xhtml customization layer question > I am trying to construct a documentation web site using docbook - this > documentation is for consumption by our clients, therefore the look and > feel of the HTML layout needs to be tailored to internal design specs set > by our creative department. I am trying to do the following using a > customization layer: > > 1. Have my "main navigation" correspond to all available <chapter>'s in > the <book> I'm writing. Navigation items should be able to be wrapped in > arbitrary xhtml (in this specific case, trying to simulate a horizontal > row of tabs). > 2. Have my subnavigation correspond to all available <section>'s in a > specific <chapter>. > 3. Do (1) and (2) **WHILE** only displaying the <chapter> content for 1 > select chapter OR section (i.e. using 'rootid' while still getting main > navigation associated with all the chapters in the book. > 4. Ideally, be able to apply different HTML style based on the currently > selected chapter and section. > > Is this possible using a customization layer on top of existing DocBook > xsl, or do I need to write a custom stylesheet? As far as I understand this, you want to chunk your output so each page shows a chapter or section, and add a page header to each page that shows tabs for all the chapters or sections. And highlight the currently selected chapter or section, right? You can use the 'suppress.navigation' parameter to turn off the standard chunking navigational headers and footers. Then write a customized 'user.header.navigation' xsl:template to generate your tabs. That template will be called at the start of each new chunk, and its context node is the chapter or section for that chunk. In that template, you could select all its sibling elements with an XPath statement, and then do a xsl:for-each to process them into a set of tabs, with a special case for the node matching the current one. Make a call to the named template 'href.target' to generate the URL for each item, and apply templates in 'titleabbrev.markup' mode to get the title string. If your chunks have a titleabbrev element in addition to a title element, then the titleabbrev will be used in the tab. That might help with getting them to fit. Hope this helps. Bob Stayton Sagehill Enterprises bobs@sagehill.net
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]