Re: (dsssl) Doubt

Subject: Re: (dsssl) Doubt
From: Brandon Ibach <bibach@xxxxxxxxxxxxxx>
Date: Thu, 13 Jun 2002 10:24:47 -0500
Quoting Trent Shipley <tcshipley@xxxxxxxxxxxxx>:
> Janny is assuming that the insertion of blank pages is rule driven instead of 
> definition driven.
> 
> Rule:
> (Every chapter must start on an odd numbered page.)
> 
> Definintion:
> <yada>
> blah blah blah.
> <put_blank_page_here/>
> 
   Actually, based on this, I think Jany is assuming the opposite.
He's saying that you can create a blank page every time to encounter a
<put_blank_page_here/> element (or whatever the trigger is).
   If the need for a blank page is "rule driven", as you say, such as
a blank page at the end of a chapter to force the next chapter to
start on an odd page, then it needs to be expressed in terms of flow
objects and/or flow object characteristics, as it must be implemented
by the formatter, not the DSSSL engine, so we just need to express
that requirement to the formatter via the flow object tree.

> During my very brief foray into DSSSL Open-Jade gave me fits whenever I had 
> to play with character content (that is, leaf nodes on the grove 
> representation of the document, that is to say, characters.)  The reason 
> seems to be that that part of the DSSSL model is not well implemented in OJ
> --except as part of the set of primatives defined is the DSSSL standard.
> 
   I'm confused.  What, exactly, were you trying to do that was giving
you fits in OpenJade?  Which part of the DSSSL model are you referring
to, that OJ doesn't implement well (there are several candidates)?

   Back to the issue at hand, in response to needing some content in
the <para> tag in order to generate the blank page, I think you need
to have some content inside the simple-page-sequence in order for it
to generate a page.  If there's nothing in it, it won't generate
anything.  So, try something like this:

(element para
  (if (node-list-empty?            ; Is <para> empty?
        (children (current-node)))
      (make simple-page-sequence   ; Make a page...
        (literal " "))             ; ...with just an invisible space
      (make paragraph              ; Otherwise, make a paragraph...
        (process-children))))      ; ...or whatever

   As Jany said, a little more information would help formulate a
better solution.  For instance, why do you need to generate these
blank pages?  To align chapter start pages?  That can be done
automatically with the right settings.  Please elaborate.

-Brandon :)

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

Current Thread