xsl-list
[Top] [All Lists]

Re: Problem With Different Colors for Alternate Rows

2002-11-06 03:52:32
"Schwartz, Rechell R, ALCAS" <rrschwartz(_at_)att(_dot_)com> wrote:

Jeorg,

Thank you. Mode seems to be working ok, except for one thing -- in my
real XSLT (which is more complicated than the sample below), for certain
data elements (e.g., side dish) I search for multiple occurences of the
element and I concatenate them with commas as below. This is causing
confusion in the assessment of the position() function. It seems to
think I am looking for the position of the row, when I am really looking
for the position of this particular side dish. This confusion is causing
each side dish to print out on a new line instead of on a single line
with a comma-separated list. Is there any way to test if this side dish
is first or last w/o using the position() function (thus avoiding this
type of confusion)?

Hi Jeorg.
If what you want is to know if this side dish is the first in a row, you only
need to tes if there is another one before, something like this:

<xsl:if test="not(preceding-sibling::sidedish)">
<!-- do whatever you wnat to do-->
</xsl:if>

-- 
+-------------------------------------+
| This email was sent using V-Webmail |
|     http://www.v-webmail.co.uk/     |
+-------------------------------------+
-- 
+-------------------------------------+
| This email was sent using V-Webmail |
|     http://www.v-webmail.co.uk/     |
+-------------------------------------+


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list