This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [docbook-apps] Customizing applethelp.xsl: A few questions


You're in luck. All those things are controled by params or PIs. applethelp.xsl is a minor customization of the htmlhelp xsls (which in turn is a customization of the chunked html xsls :), so all the normal params will work.

> 1. Control the names of the HTML files that are created. Ideally, I'd 
> like them to have the same name as the top-level heading in the file. 
> For example, if the highest level headnig is "Section 1," I'd 
> like the 
> filename to be Section 1.html. (Hm. Would the space prove 
> problematic?)

You have two options: 
1. Turn on use.id.as.filename and make the section ids the desired filenames (so you could manually create ids that are derived from the title, but without spaces) http://docbook.sourceforge.net/release/xsl/current/doc/html/use.id.as.filename.html
2. Use the processing-instruction that's supported by the xsls to define the filenames: <section> <?dbhtml filename="Creating_Motive_Accounts.html"?>
I suspect you could put spaces if you did it this way, but I'd avoid that. 

> 2. Control when new HTML files are created. For example, I'd like to 
> create new HTML pages for both Section 1 headings and Section 2 
> headings. (Right now, it appears it creates a new page for 
> every Section 
> 1 heading only).

There are some params that let you control chunking:
http://docbook.sourceforge.net/release/xsl/current/doc/html/chunk.section.depth.html
http://docbook.sourceforge.net/release/xsl/current/doc/html/chunk.first.sections.html
http://docbook.sourceforge.net/release/xsl/current/doc/html/chunk.tocs.and.lots.html

> 3. Create buttons that lead users to the home page, as well as allow 
> them to navigate either to the previous page or the next 
> page. If #2 is 
> not feasible, these buttons might have to be in a separate frame, so 
> they remain visible to the user... or perhaps they could just 
> be added 
> above each heading somehow...

The following params let you control header and footer navigation. Normally they'd be on by default, but (for no good reason) they're turned off in the htmlhelp-common.xsl that's provided with applethelp.xsl. 

http://docbook.sourceforge.net/release/xsl/current/doc/html/suppress.navigation.html
http://docbook.sourceforge.net/release/xsl/current/doc/html/suppress.header.navigation.html
http://docbook.sourceforge.net/release/xsl/current/doc/html/suppress.footer.navigation.html

So you could just use this customization layer to applethelp.xsl:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet 
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0">
  <!-- Adjust this path as necessary: -->
  <xsl:import href="applethelp.xsl"/>
  <!-- ============= -->
  <xsl:param name="chunk.section.depth" select="100"/>
  <xsl:param name="chunk.first.sections" select="1"/>
  <xsl:param name="suppress.navigation" select="0"/>

</xsl:stylesheet>


David

To unsubscribe from this list, send a post to docbook-apps-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]