This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]