This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: alternating bg colour in nested data
- From: Wendell Piez <wapiez at mulberrytech dot com>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Wed, 16 Jan 2002 16:30:47 -0500
- Subject: RE: [xsl] alternating bg colour in nested data
- Reply-to: xsl-list at lists dot mulberrytech dot com
Andrew,
This is actually a good use for xsl:for-each --
<xsl:for-each select="ancestor::*">
<xsl:text>.</xsl:text>
</xsl:for-each>
Tune the select expression to your needs, e.g. select="ancestor-or-self::*"
(includes the current node in the count), "ancestor-or-self::node()"
(includes the current node and root node), "ancestor::*[position() > 1]" to
skip a level, etc.
Cheers,
Wendell
======================================================================
Wendell Piez mailto:wapiez@mulberrytech.com
Mulberry Technologies, Inc. http://www.mulberrytech.com
17 West Jefferson Street Direct Phone: 301/315-9635
Suite 207 Phone: 301/315-9631
Rockville, MD 20850 Fax: 301/315-8285
----------------------------------------------------------------------
Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list