(dsssl) Undesired paragraph breaks in generated HTML

Subject: (dsssl) Undesired paragraph breaks in generated HTML
From: John Kimball <jkimball@xxxxxxxxxxxxxxxxx>
Date: Fri, 5 Jan 2001 15:05:04 -0600 (CST)
Please excuse a question from a puzzled newbie!

We have a local extension to Docbook which we're using to generate RTF- and
HTML-formatted documentation for a project.  The person who did the bulk of
the extension is no longer around.  I need to revise a construction rule.

The problem is that the construction rule is supposed to concatenate
together several chunks of text to yield the output, but the last part is
being placed in a separate paragraph.

Here is (1) What the input looks like, (2) What the desired output and the
undesired actual output looks like, and (3) The code that's doing the dirty

    <!-- Sample .sgm input: example regrule: ========================== -->
      <para>All aardvarks must be leashed.</para>

    <!-- The desired output (.html) should look like this: ============ -->
    <blockquote> {AR005} All aardvarks must be leashed. </blockquote>

    <!-- Current undesired output looks something like this: ========== -->
    <blockquote> {AR005} <p>All aardvarks must be leashed.</p> </blockquote>

    ;; The .dsl code driving jade looks like this: ;;;;;;;;;;;;;;;;;;;;;;;;
    (element (regrule)
      (let  ((ruleid (select-elements (children (current-node)) 
				      (normalize "ruleid")))
	     (description (select-elements (children (current-node)) 
					   (normalize "description")))
      (make element 
	gi: "blockquote"
	(make sequence
	  (literal " {") 
	  (process-node-list ruleid) 
	  (literal  "} ") 
	  (process-node-list description))))

It looks like the basic problem is that the contents of
<description></description> are within (a sequence of one or more)
<para></para>s.  But I'm leery of trying to fix this at the DTD level,
since the original author was careful to insist on <para></para> in places
like this, to allow a variety of kinds of text to be used in a description.

It is possible to do (literal (data description)) instead of
(process-node-list description); that gets rid of the undesired paragraphs,
but then things like <xref>s get stripped out, too.

I poked around to find a way to insert those three chunks -- " {", ruleid,
and "} " -- into the front of the contents of <description></description>,
within the <para></para>, but I don't understand this stuff well enough to
do that.

What's the best way to handle this?


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist

Current Thread