DSSSL to HTML questions

1. How do I generate chunked output?
2. How do I change the appearance of <emphasis>?
3. Bibliography on new page
4. Render revhistory in DSSSL
5. sect1 render as heading 1, dsssl
1.

How do I generate chunked output?

In general you switch between chunked and nochunked output by setting the variable nochunks to #t or #f. This can be achieved in your customization stylesheet or simply by adding

-V nochunks

on the (open)jade command line.

2.

How do I change the appearance of <emphasis>?

The <emphasis> tag is rendered by the default HTML stylesheet as italic (<I>). If you want to change the appearance you have to do this in your customization layer. Jirka Kosek proposed the following solution recently on DocBook-Apps ML:

(element emphasis
(if (equal? (normalize "bold") (attribute-string (normalize "role")))
    ($bold-seq$)                                                     
    ($italic-seq$)))

This solution looks at the role attribute and uses the <B> HTML tag to render <emphasis> if this attribute is set to bold.

3.

Bibliography on new page

Rory Hunter



For ages I've wanted a bibliography to start on a seperate page, using print DSSSL. It turns out that what's required is to change

(element bibliography
...
     (make sequence
       (make paragraph
	...

to

(element bibliography
...
     (make display-group
       break-before: 'page
       (make paragraph
	...
4.

Render revhistory in DSSSL

Norm Walsh



| Hi all -- I'm using a standard RedHat 7.1 box 
| (openjade, modular style sheets,
| blah, blah) to format some docbook sgml. The <revhistory> info for an
| article is not being rendered. Anyone know why this would be?

The list of metadata elements that should be rendered on a titlepage is highly personal. If you make a customization stylesheet and add

(normalize "revhistory")

To the appropriate:

(define (<<<element you want to use>>>-titlepage-recto-elements)
  (list (normalize "title")
	(normalize "subtitle")
	(normalize "graphic")
	(normalize "mediaobject")
	(normalize "corpauthor")
	(normalize "authorgroup")
	(normalize "author")
	(normalize "editor")
	(normalize "copyright")
	(normalize "legalnotice")))

list, then it'll be rendered.

5.

sect1 render as heading 1, dsssl

Norm Walsh



| Well, I was hoping to force sect1s to render as heading 1, and so on.

You'll have to tweak the section heading definition in your customization layer:

(define ($section-title$)
  (let* ((sect (current-node))
	 (info (info-element))
	 (exp-children (if (node-list-empty? info)
			   (empty-node-list)
			   (expand-children (children info) 
					    (list (normalize "bookbiblio") 
						  (normalize "bibliomisc")
						  (normalize "biblioset")))))
	 (parent-titles (select-elements (children sect) (normalize "title")))
	 (info-titles   (select-elements exp-children (normalize "title")))
	 (titles        (if (node-list-empty? parent-titles)
			    info-titles
			    parent-titles))
	 (subtitles     (select-elements exp-children (normalize "subtitle")))
	 (renderas (inherited-attribute-string (normalize "renderas") sect))
	 ;; the apparent section level
	 (hlevel
	  ;; if not real section level, then get the apparent level
	  ;; from "renderas"
	  (if renderas
	      (section-level-by-gi #f (normalize renderas))
	      ;; else use the real level
	      (SECTLEVEL)))
	 (hs (HSIZE (- 4 hlevel))))
    (make sequence
      (make paragraph
	font-family-name: %title-font-family%
	font-weight:  (if (< hlevel 5) 'bold 'medium)
	font-posture: (if (< hlevel 5) 'upright 'italic)
	font-size: hs
	line-spacing: (* hs %line-spacing-factor%)
	space-before: (* hs %head-before-factor%)
	space-after: (if (node-list-empty? subtitles)
			 (* hs %head-after-factor%)
			 0pt)
	start-indent: (if (or (>= hlevel 3)
			      (member (gi) (list (normalize "refsynopsisdiv") 
						 (normalize "refsect1") 
						 (normalize "refsect2") 
						 (normalize "refsect3"))))
			  %body-start-indent%
			  0pt)
	first-line-start-indent: 0pt
	quadding: %section-title-quadding%
	keep-with-next?: #t
	heading-level: (if %generate-heading-level% (+ hlevel 1) 0)
	;; SimpleSects are never AUTO numbered...they aren't hierarchical
	(if (string=? (element-label (current-node)) "")
	    (empty-sosofo)
	    (literal (element-label (current-node)) 
		     (gentext-label-title-sep (gi sect))))
	(element-title-sosofo (current-node)))
      (with-mode section-title-mode
	(process-node-list subtitles))
      ($proc-section-info$ info))))