Re: [xsl] Displaying Icon in Page Margin

Subject: Re: [xsl] Displaying Icon in Page Margin
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Thu, 15 Sep 2011 14:42:13 -0500
You could insert a preprocess step to add the ghost cells to the source
table as part of base FO-generating XSLT--no need to do it with a separate
XSLT. Where the table gets passed to the template that generates the FO
table, just do:

<xsl:variable name="hackedTable" as="element()">
 <xsl:apply-templates mode="hackTable" select="."/>

<xsl:apply-templates select="hackedTable"/>

Or you could override the row-generation template and add the zero-size FO
table cell there.

But if you're using XEP, I think the "modify the XEP intermediate file"
approach suggested by Kevin on the DITA User's list might be the easier and
more reliable solution, unfortunately.

It seems little like a bug in the FO spec that side floats apply to the
nearest containing reference area and not to the containing flow's reference
area (e.g., xsl-region-body). I can't think of a case where I'd want the
side float anchored in a table to be relative to the table cell's reference
area and not to the overall flow's reference area.



On 9/15/11 2:30 PM, "Brian Popp" <bpopp@xxxxxxxxx> wrote:

>> I wasn't asking your authors to add the ghost column.  I was suggesting
>> as you process your author's tables, *you* insert the ghost column on
>> row.  That way it is predictable and maintainable.
> True. It still seems kinda messy, though, because I'd have to
> preprocess each file through that XSL script (to add the column)
> before it goes through the normal XSL translation to FO. That's not
> unmanageable and I'm happy to have something to fall back on, but it
> just seems like there has to be a better way.
> Another issue I found with using the negative margins is that I end up
> having to write very complicated rules that mirror the  styling
> attributes of the affected elements. For example, to draw the icon
> aligned to the left of a nested list, I have to know what level I'm at
> and what the indent is for each level. Again, not undoable, but it's
> overly complex and would be difficult to maintain.
> This is a very clever solution, though, and I do very much appreciate
> the responses. I'm very impressed with this list and have learned a
> lot  in the short time I've been reading it.
> -bpopp

Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 512.554.9368

Current Thread