Hi again,
Found a rather simple solution, for DITA to PDF (FOP), which others
might want to use as well:
Inserted the following in table.xsl, section: <!-- row
=============================================================== --> (Or
a customisation file of this), after this line:
<xsl:param name="bodyLayout" select="()"/>
this block, which defines the different colors:
<!-- Define background colors -->
<xsl:variable name="backgroundColor">
<xsl:choose>
<xsl:when test="position() mod 2=0">white</xsl:when>
<xsl:otherwise>#d3dfee</xsl:otherwise>
</xsl:choose>
</xsl:variable>
And then replaced this line:
<fo:table-row xsl:use-attribute-sets="row">
with:
<fo:table-row background-color="{$backgroundColor}">
The result is alternated background colours in any table in a PDF output.
Hope it makes sense.
Best regards,
Claus
Den 22-04-2013 16:30, Hussein Shafie skrev:
On 04/22/2013 02:35 PM, Claus Poulsen wrote:
Is there any configurational options in Xmlmind for support for
alternate background colors in tables, e.g. first row is white, next
grey, then white etc. for a PDF output?
- or is it a matter of customising the xslt (in tables.xsl?) ?
(I don't know the document type you are using.)
* XHTML, DITA: I'm sorry but there is no way to do this without
modifying the XSLT stylesheets by hand. I mean, there is no XSLT
stylesheet parameter or attribute-set which would allow to do this
easily, from within XMLmind XML Editor.
* DocBook: I'm sorry but I don't know. please refer to:
DocBook XSL: The Complete Guide by Bob Stayton
http://www.sagehill.net/docbookxsl/
and to:
DocBook: DocBook XSL Stylesheet Reference Documentation by Norman Walsh
http://www.sagehill.net/docbookxsl/
If it is the latter, can you give any advice on how to do this, and if
possible, where?
I'm sorry but, as explained in,
http://www.xmlmind.com/xmleditor/support.html#xmleditor_support_policy
we cannot help you in customizing the XSLT stylesheets. This is out of
the scope of the support we provide to our customers.
--
Claus Poulsen
Cand.scient.bibl. (MLISc)
Atira A/S
Niels Jernes Vej 10
9220 Aalborg Øst
Denmark
Web: http://www.atira.dk
E-mail: [email protected] <mailto:[email protected]>
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support