LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 03-13-2005, 08:17 PM   #1
wapcaplet
LQ Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Docbook-to-HTML: can I get H1 for chapter heading?


A puzzle for any DocBook gurus that may be lurking around:

I'm using DocBook XML (with an XSL stylesheet) for documenting a moderately large software project, containing several specialized components (tovid, link in my sig).

I want the DocBook structure to be a "book" containing several "chapter"s. I'm putting all of the documentation in a single .xml file, for now.

I use xmlto to generate HTML output:

Code:
xmlto -m tovid_documentation.xsl html tovid_documentation.xml
I have this definition in my XSL:

Code:
<!-- Chunking (one chunk per chapter) -->
<xsl:param name="chunk.section.depth" select="0"/>
My HTML output looks good, but for some reason H2-level headings are being used for chapter titles. H2-level headings are also being used for sub-chapter section titles.

This is a known issue. Googling found suggestions like this to style the H2s with CSS. These suggestions imply "it looks the way you want without actually being correct" - they also note that you can customize the XSL to make it correct, but why bother.

Also a post from Norman Walsh himself, from almost four years ago, that he thought it was a problem and should be fixed somehow. But again, no hint how to accomplish it. Further Googling has been essentially fruitless, except for a few groans that HTML heading levels aren't deep enough to fully support DocBook anyway. (Really, if you need more than 6-deep headings in a single HTML file, you should think about reorganizing).

It all boils down to this: Can anyone tell me how I can get my XSL stylesheet to cause correct heading generation? I want chapter titles to generate H1s, instead of H2s that I have to kludge with CSS for correct appearance.

Thanks in advance!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java install help (heading towards tomcat) twistedrhymes Ubuntu 4 08-16-2010 11:55 AM
Charset in html-output from DocBook? BoonZie Linux - Software 0 12-14-2004 03:59 PM
remove URL heading when printing in mozilla? Rhatlinux Linux - Software 3 10-27-2004 11:10 AM
Need help installing docbook-xsl [docbook xsl stylesheet kmguy Linux - Software 0 09-10-2004 12:14 AM
Edting a heading of a post NSKL LQ Suggestions & Feedback 2 12-01-2003 02:10 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:50 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration