This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Substituting XSL Variable in HTML Tags


Hi,

How to use XSL Variables in HTML tags.

For eg :

         <xsl:eval>
               intRowCount=0
          </xsl:eval>

            <xsl:choose>
                    <xsl:when test=".[intRowCount='0']">
                        <xsl:eval>
                            intRowCount=1
                            rowBgColor="#ffcc66"
                       </xsl:eval>
                    </xsl:when>

                    <xsl:otherwise>
                       <xsl:eval>
                            intRowCount=0
                            rowBgColor="#996600"
                       </xsl:eval>
                    </xsl:otherwise>
             </xsl:choose>

Here, I have used XSL:Choose to set the value for background color of
the row. The value is stored in the variable rowBgColor variable. How
can I substitute this variable value in "bgcolor" property of <tr> tag
in html.

Another problem here is whatever i give within XSL:eval is getting
displayed in the browser. How to avoid this???

Eg.
            <tr bgcolor= "<How to give the variable here>">

Please Help me.

Thanks in advance,
Nirmala



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]