[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

Re: [xsl] RE: Seperating Heading from Content

Subject: Re: [xsl] RE: Seperating Heading from Content
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 08 Nov 2011 12:27:10 -0500

Dear Ken,

Well in this case I'm glad I raised the question, since to introduce a solution of (a) insert the marker followed directly by (b) insert another marker to provide for a blank where it appears is considerably more sophisticated (if you don't mind my saying) than the canonical application of markers, which (as you know) provides them as a mechanism for repeated appearances of content within static-content, such as dictionary head words etc.

It's also a very sneaky workaround (not in a bad way) to what would arguably be the more normal (and more generalizable) approach, namely a new page sequence for the new section -- even if in this case, Toon may (as you say) have to get down with for-each-group[@group-starting-with] to get around missing a proper 'div' wrapper.

Then too, if he doesn't already know how to make page sequences with conditional page masters (including conditional-page-master-reference[@page-position='first']), he'll probably want to eventually. So it doesn't do any harm to know that's an alternative now.

Just my $0.02. :-)


On 11/8/2011 12:02 PM, G. Ken Holman wrote:
At 2011-11-08 11:54 -0500, Wendell Piez wrote:
Just to clarify: the mechanism Ken described will give you your
heading on every page, until a new heading replaces it (on every page).

Actually, Wendell, no it won't in my posted example. I would have attached my test PDF showing no heading on the second and subsequent pages of each virtual section, but I know attachments are verbotten on this list.

It wasn't clear to me from your original description whether you
wanted your h2 to appear on every page, or only on the first page of
the section, occupying a reserved space.

I understood his requirement to only show the H2 on the first of the pages, with subsequent pages starting at the same height of the page as the text of the page with the H2 content.

Come to think of it, I wonder if you couldn't fake this by placing an
empty marker directly after each marker generated for an h2.


At 2011-11-07 13:28 -0500, I wrote:
In order to suppress the marker from subsequent pages of content of
the same H2, you immediately define the marker to be empty after
defining the marker to have content.

At 2011-11-08 11:54 -0500, Wendell Piez wrote:
I can think of a few people who could speak to this better (including

You'll see this fragment in my posted code:

<!--empty the header for any page breaks before the next header-->
<block><marker marker-class-name="h2"/></block>

Yet at the same time (if this is the case), it seems that the
"correct" solution would be to use a new page sequence for every
section, with a special geometry on the first page. Unfortunately, in
your case this would seem to present an overlap problem, since your
sections do not (do they?) have natural wrappers in the source
document, which would map to page-sequence elements in the FO. Yet at
the same time, XSLT 2.0 offers solutions to this.

I avoided talking about separate page sequences for this very reason of having to go into xsl:for-each-group with the starting-with= strategy.

If you want your heading to appear on every page until a new header
replaces it, that's what FO markers are for.

Unless the marker is strategically emptied out.

-- ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================

Current Thread