Re: [xep-support] retrieve-position used for 'foo (continued)' label

From: Brian Sheppard <bsheppard@library.wisc.edu>
Date: Thu Jul 26 2007 - 13:57:49 PDT

Thanks Ken. This works beautifully. I knew I had to undefine the
marker, but I never would have thought to use an empty block.
Best,
Brian

On July 26, at 1:25 PM, G. Ken Holman wrote:

> At 2007-07-26 10:29 -0500, Brian Sheppard wrote:
>> I'm using a retrieve-marker in an xsl-region-before in the hope of
>> showing a 'section X continued' label when page breaks occur within
>> certain blocks or block-containers. Since there's no such thing as a
>> "first-within-carryover" value for the retrieve-position attribute,
>> is there any way to do this without sometimes grabbing the first
>> marker in the current page?
>
> It sounds like you are not "undoing" the marker at the beginning
> and end of your sensitive blocks or containers.
>
>> As it is, I'm using "first-including-carryover" so if the page break
>> occurs between blocks, there is no carryover and the first marker in
>> the current page displays. As it should, per the spec, but not per my
>> intent. Does anyone know of a workaround?
>
> Yes, but doing it for a header is not as straightforward as doing
> it for a footer.
>
> Here is an example from my XSL-FO training material (reminder: I've
> confirmed the running of a publicly-subscribed XSL class in San
> Francisco in September) where I'm putting "continued..." at the
> bottom of a page in a footer:
>
> <block>
> <marker marker-class-name="section">Section One - 1.</marker>
> <marker marker-class-name="continued">(continued...)</marker>
> <block>1. Section One</block>
> <block space-before="1em">This is a test</block>
> ...
> <block space-before="1em">This is a test</block>
> </block>
> <block>
> <marker marker-class-name="continued"></marker>
> </block>
>
> <block space-before="2em">
> <marker marker-class-name="section">Section Two - 2.</marker>
> <marker marker-class-name="continued">(continued...)</marker>
> <block>2. Section Two</block>
> <block space-before="1em">This is a test</block>
> ...
> <block space-before="1em">This is a test</block>
> </block>
> <block>
> <marker marker-class-name="continued"></marker>
> </block>
>
> In fact this undoing of the marker would be important for you
> regardless, because what if the block you have ends right at the
> very bottom of the page? There is always room for an empty block
> at the bottom of the page. If your table ends right at the bottom,
> then you don't want the marker defined for the bottom of that page
> or the top of the next.
>
> BTW, the kind of retrieval you need for a footer is the last within
> the page:
>
> <static-content flow-name="frame-after">
> <block text-align="end" font-style="italic" font-size="12pt">
> <retrieve-marker retrieve-class-name="continued"
> retrieve-position="last-starting-within-page"/>
> </block>
> </static-content>
>
> But what you need is a marker retrieved into the header and that is
> more subtle. First, you have to be prepared for a block starting
> at the very top of the page (where you do not want it to show),
> which means you have to both make sure it is not defined (that is,
> defined as empty) as the first block on the page, and then define
> it as part of the block. *Then* you have to undefine it at the end
> again so that the definition isn't lying around to be retrieved on
> the next page.
>
> Here is code that works for "...continued" in the header:
>
> <static-content flow-name="frame-before">
> <block text-align="end" font-style="italic" font-size="12pt">
> <retrieve-marker retrieve-class-name="continued"
> retrieve-position="first-including-carryover"/>
> </block>
> </static-content>
> ...
> <block keep-with-next="always">
> <marker marker-class-name="continued"></marker>
> </block>
> <block>
> <marker marker-class-name="section">Section One - 1.</marker>
> <marker marker-class-name="continued">(...continued)</marker>
> <block>1. Section One</block>
> <block space-before="1em">This is a test</block>
> <block space-before="1em">This is a test</block>
> ...
> <block space-before="1em">This is a test</block>
> <block space-before="1em">This is a test</block>
> </block>
> <block keep-with-previous="always">
> <marker marker-class-name="continued"></marker>
> </block>
>
> Note how my use of keeps will ensure the empty definition is on the
> same page and before the non-empty definition, thus ensuring the
> first one on the page is the empty definition.
>
> Since you are pulling into the header, your use of "first including
> carryover" is appropriate since the marker would have been undone
> if the table ended on the page before.
>
> I hope this helps!
>
> . . . . . . . . . . . . . Ken
>
> --
> Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1
> World-wide corporate, govt. & user group XML, XSL and UBL training
> RSS feeds: publicly-available developer resources and training
> G. Ken Holman mailto:gkholman@CraneSoftwrights.com
> Crane Softwrights Ltd. http://www.CraneSoftwrights.com/f/
> Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995)
> Male Cancer Awareness Jul'07 http://www.CraneSoftwrights.com/f/bc
> Legal business disclaimers: http://www.CraneSoftwrights.com/legal

--------------------------------------------------
Brian Sheppard
University of Wisconsin Digital Collections Center
bsheppard@library.wisc.edu (608) 262-3349

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html
Received on Thu Jul 26 14:41:06 2007

This archive was generated by hypermail 2.1.8 : Thu Jul 26 2007 - 14:41:07 PDT