Ranjan,
Oo this is bad. You are "tag-writing". This is *not* recommended practice
in XSLT -- it is error-prone, hard to debug, and unnecessary. (The tip-off
is your disable-output-escaping construct "<tr" etc.) XSLT's own
preferred approach, tree-building, is generally much easier to do once you
get the hang of it.
In order to solve the problem you are facing, you'd be best off solving the
deeper problem of how you are creating your table rows at all. It's easy
enough to show you this if we can see more of your code, preferably with a
sample of the input it processes. (You can rewrite the example to something
safe if it's sensitive information that shouldn't be shared, as long as the
XML is organized the same way.)
What you are trying to do is very routine, and not difficult. But it won't
look anything like what you have now.
Post a larger sample, including the template that calles this template, and
we'll be much more able be able to help.
Cheers,
Wendell
At 09:43 AM 5/18/2005, you wrote:
Following script I am using for background color for
table row
<xsl:template name="colorTemplate">
<!-- Colors alternate rows differently to ease
readability without grid lines -->
<xsl:if test="position() mod 2 = 0">
<xsl:text disable-output-escaping = "yes">
<tr style="background-color: #EEEEEE;
border-top: thick solid black;" >
</xsl:text>
</xsl:if>
<xsl:if test="position() mod 2 = 1">
<xsl:text disable-output-escaping = "yes">
<tr style="background-color: #FFFFFF;
border-top: thick solid black;" >
</xsl:text>
</xsl:if>
</xsl:template>
........................
However, baccause of multiple for loops I am not
getting desired bahaviour. Is there any otherway of
achieving same.
regards,
Ranjan
__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
======================================================================
Wendell Piez
mailto:wapiez(_at_)mulberrytech(_dot_)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
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--