Subject: Re: [xsl] Displaying Icon in Page Margin From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Thu, 15 Sep 2011 15:44:38 -0400 |
> 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.
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.
<xsl:template match="tbl"> <fo:table> <xsl:apply-templates/> </fo:table> </xsl:template>
<xsl:template match="row"> <fo:table-row> <!--first inject the ghost cell with the float--> <fo:table-cell> <fo:block> <fo:float ...> <fo:block> ... </fo:block> </fo:float> </fo:block> </fo:table-cell> <!--now process the authored cells--> <xsl:apply-templates/> </fo:table-row> </xsl:template>
<xsl:template match="col"> <fo:table-cell> <xsl:apply-templates/> </fo:table-cell> </xsl:template>
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.
-- Contact us for world-wide XML consulting and instructor-led training Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Google+ profile: https://plus.google.com/116832879756988317389/about Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Displaying Icon in Page M, Tony Graham | Thread | Re: [xsl] Displaying Icon in Page M, Brian Popp |
Re: [xsl] Displaying Icon in Page M, Eliot Kimber | Date | Re: [xsl] Displaying Icon in Page M, Tony Graham |
Month |