[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
At 2011-09-15 09:14 -0500, Brian Popp wrote:
Syntactically you can make this more concise as:
... because in the predicate the current node is <entry> so the self axis will not contain <limit> and "//" looks for descendants.
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.
I hope this helps.
. . . . . . . . . . Ken
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 10:52:17 -0400 |
At 2011-09-15 09:14 -0500, Brian Popp wrote:
Thanks for the suggestions. I'm a little happy to hear that I didn't waste a day on a trivial problem, but I'd gladly take a hit to my pride in order to find a good solution. I actually started with the negative margin technique, and it somewhat worked, but it was fragile. For example, in order to get the icon to the left of the table, I had to do something like:
<xsl:template match="entry[position()=1 and (descendant-or-self::limit/@origin='fdx' or following-sibling::entry/descendant-or-self::limit/@origin='fdx')]">
Syntactically you can make this more concise as:
entry[position()=1 and ( . | following-sibling::entry)//limit/@origin = 'fdx' ]
... because in the predicate the current node is <entry> so the self axis will not contain <limit> and "//" looks for descendants.
Basically, I'm putting a rule on the first cell of each row that looks for the attribute being set in itself or any of its siblings and then I push an icon out to the left of it. That works in almost every case. The problem (aside from it being ugly) is that sometimes that first cell spans multiple rows. If the third row within the span happens to have the marker, the icon doesn't display next to the correct row and instead draws next to the start of the span. D*mn creative writers and their fancy straddles. :)
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.
I hope this helps.
. . . . . . . . . . Ken
-- 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, Brian Popp | Thread | Re: [xsl] Displaying Icon in Page M, Brian Popp |
Re: [xsl] Displaying Icon in Page M, Tony Graham | Date | Re: [xsl] Displaying Icon in Page M, Brian Popp |
Month |
Keywords