xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Joslin" <andy.jos...@ri3k.com>
Subject RE: XPath expression
Date Thu, 15 May 2003 09:54:30 GMT
Hi Torsten
 
It is probably worth you looking at the XSL List and the XSLT FAQ.
 
http://www.mulberrytech.com/xsl/xsl-list/
http://www.dpawson.co.uk/xsl/xslfaq.html
http://www.dpawson.co.uk/xsl/sect2/N961.html
 
This is a frequently asked question, and the same logic applies whether
you are using XSL to transform to PDF or to HTML
 
You want to do something like this (within the row match):
 
<xsl:variable name="bgcolor">
<xsl:choose><xsl:when test="position() mod 2 =
0">#e6e6e6</xsl:when><xsl:otherwise>#ffffff</xsl:otherwise></xsl:choose>
</xsl:variable>
 
Then display this variable as an attribute on the row line: e.g.
color="{$bgcolor}"
 
 
Hope this helps
 
Andy
 
 
 

	-----Original Message-----
	From: Torsten Erler [mailto:Torsten.Erler@net-linx.com] 
	Sent: 15 May 2003 09:44
	To: Fop-User (E-mail)
	Subject: OT: XPath expression
	
	
	Hi all,
	 
	I know it's not the right List, but I think there are a lot of
XSL-Experts here in this list.
	 
	Does anyone know the XPath expression for counting all
Attributes and all childs (grandchilds...) of all preceding siblings of
the selected node???
	In Other words which row number has the selected node in a full
expanded tree.
	(I need this to set the row backgound color for each second row)
	 
	ThanX
	 
	cu Torsten
	 



________________________________________________________________________
This e-mail and its attachments are confidential. If you are not the intended recipient of
this e-mail message, please telephone or e-mail us immediately, delete this message from your
system and do not read, copy, distribute, disclose or otherwise use this e-mail message and
any attachments. 

Although ri3k Limited believes this e-mail and any attachments to be free of any virus or
other defect which may affect your computer, it is the responsibility of the recipient to
ensure that it is virus free and ri3k Limited does not accept any responsibility for any loss
or damage in any way from its use.

ri3k Limited
Registered in England: 10-12 Ely Place, London, EC1N 6RY
Company Number: 3909745
Mime
View raw message