Re: [xsl] Displaying Icon in Page Margin

Subject: Re: [xsl] Displaying Icon in Page Margin
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Sep 2011 11:46:02 -0400
At 2011-09-15 10:31 -0500, Brian Popp wrote:
> If your writers are not using numbered table columns, then you could
> predictably put a ghost first cell on every row, of zero width, with empty
> blocks in it, where the empty block has the float outside the margin. You'd
> have to be careful about table borders if the writer has control over the
> cell border interaction with the table border.

Interesting idea. That would work, but I don't think I could rely on
our writers remembering to do this and wouldn't want to try and
maintain it. I'm gonna keep hacking w/ absolute positioning. I think
that's my only hope at this point. I just need to figure out some way
to make it use absolute positioning for the x axis and relative
positioning for the y axis.

I wasn't asking your authors to add the ghost column. I was suggesting that as you process your author's tables, *you* insert the ghost column on every row. That way it is predictable and maintainable.

I see these kinds of comments in the classroom. Not all input has to come from the authors ... some of it can come from you. The stylesheet writer has the flexibility to make the end XSL-FO result contain *anything* they need to get the job done, such that they can add *whatever* supplemental information gives them the result they need.

So, in your situation, your stylesheet gets a table from the author. As you process the author's rows, *you* inject a first row cell every time you create the row and before you process the author's cells for that row. You make that first cell zero size and you handle all of the floats for that row, your authors think their first column is the first column in the result because they can't see your ghost cells.

But your stylesheet has put one on every row and they just can't see it.

That was why I warned you about the impacts of the ghost cell on your author's expectations. If your author controls the interaction between their first cell border and the table border, you've interfered with that with your ghost cell. If your author is using column numbering approaches, you've interfered with that with your ghost cell. There might be other interactions based on your vocabulary, but those come to mind off the top of my head.

So it isn't a panacea, but if you can use it it isn't an obligation on your authors. If you can inject that ghost cell without interfering with your author's interactions with the row or table, then in the end result your author doesn't realize you've added it.

I hope this helps.

. . . . . . . . . . . . Ken

-- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: Legal business disclaimers:

Current Thread