- From: Arved Sandstrom <asandstrom2@eastlink.ca>
- Date: Fri, 22 Mar 2013 07:37:52 -0300
- To: public-ppl@w3.org
On 03/22/2013 06:50 AM, Tony Graham wrote: > On Fri, March 22, 2013 2:47 am, Arved Sandstrom wrote: >> On 03/21/2013 08:14 PM, Tony Graham wrote: > ... >>> I could use a xsl:message to output the height of the viewport, but I >>> couldn't easily get the size of any of the created fo:block. When I >>> added >>> an @id to the source and modified the stylesheet to copy it into the FO, >>> it didn't show in the intermediate format file, which is going to make >>> things difficult since I've been figuring that one of the ways to avoid >>> having to do XPaths of the form: >>> >>> document($url)/if:document/if:page-sequence[1]/if:page[1]/if:content[1]/if:viewport[1]/@height >>> >>> will be to insert IDs into the FO and use key() to look up based on the >>> ID. > ... >> OK, so what I'll do is examine how to get an ID out into the rendered >> area tree. I agree that having to do what you just described is >> horrendous. Nice project for the weekend. > I would have thought that FOP would already be preserving IDs, otherwise > they'd have trouble with, e.g., fo:basic-link [2] with a FO document > that's written out to IF XML [1] and then read back in again. > > Regards, > > > Tony. > > [1] http://xmlgraphics.apache.org/fop/1.0/intermediate.html > [2] http://www.w3.org/TR/xsl11/#fo_basic-link > > I just tried an experiment where I switched from rendering with FOP's MimeConstants.MIME_FOP_IF to using MimeConstants.MIME_FOP_AREA_TREE. I put an id attribute on a source element (a "paragraph" in my example XML), and as you, made sure that the stylesheet placed it on the target FO, in this case an fo:block. The attribute does come across when using this more verbose lower-level area tree format. Arved
Received on Friday, 22 March 2013 10:38:19 UTC