This is the mail archive of the
docbook-apps@lists.oasis-open.org
mailing list .
RE: Vertical Tables
- From: Giuseppe Greco <giuseppe dot greco at bluewin dot ch>
- To: Jeff Beal <jeff dot beal at ansys dot com>
- Cc: DocBook Apps <docbook-apps at lists dot oasis-open dot org>
- Date: Sat, 28 Dec 2002 14:57:30 +0100
- Subject: RE: DOCBOOK-APPS: Vertical Tables
- Organization: Agamura Corp.
- References: <E08C8F26F6901D42B1201763D125853815B3E8@ntdevexc.win.ansys.com>
Jeff,
Thank you very much for your support!
Have a nice day.
Giuseppe.
On Fri, 2002-12-27 at 17:05, Jeff Beal wrote:
> When you use the <xsl:attribute/> element, it inserts the attribute into
> whatever element is currently open in the XSL result tree. In your case,
> the <fo:table-cell/> element isn't yet open, so the attribute is inserted
> into a higher-level element (probably an fo:table-row, but it could be the
> <fo:table/>).
>
> To do the level of customization you want, you'll have to make a copy of the
> template you are trying to customize and be sure that you insert the
> <xsl:attribute/> inside of the <fo:table-cell/> element.
> <xsl:apply-imports/> will not work in this case.
>
> Jeff Beal
>
> -----Original Message-----
> From: Giuseppe Greco [mailto:giuseppe.greco@bluewin.ch]
> Sent: Friday, December 27, 2002 11:26 AM
> To: DocBook Apps
> Subject: DOCBOOK-APPS: Vertical Tables
>
>
> Hallo guys,
>
> I need to generate a vertical table like this:
>
> +--------+--------+
> | HEAD 1 | text 1 |
> +--------+--------+
> | HEAD 2 | text 2 |
> +--------+--------+
>
> HEADs should be rendered in bold, while texts in
> normal.
>
> To solve the problem, I modified my row entries like
> this:
>
> ...
> <row>
> <entry role="tablehead">HEAD 1</entry>
> <entry>text 1</entry>
> </row>
> <row>
> <entry role="tablehead">HEAD 2</entry>
> <entry>text 2</entry>
> </row>
> ...
>
> and I wrote a stylesheet like this:
>
> ...
> <xsl:template match="entry" name="entry">
> <xsl:if test="parent:row and @role='tablehead'">
> <xsl:attribute name="font-weight">bold<xsl:attribute>
> </xsl:if>
> <xsl:apply:imports/>
> </xsl:template>
> ...
>
> Well, the result is that HEADs as well as texts are
> rendered in bold.
>
> Have I forgotten something?
>
> Thanks,
--
Giuseppe Greco <giuseppe.greco@bluewin.ch>
Agamura Corp.