Re: [xsl] for-each issue

Subject: Re: [xsl] for-each issue
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Thu, 27 Mar 2008 13:58:48 +0530
On 3/27/08, Z W <mpc8250@xxxxxxxxx> wrote:
> I'm trying to create a html where I'm only interested in this
> label=Client responds.
> However I need to loop through all these rows to get other information.
> How do I loop through them and store some values into variables and at
> the same time not having XSLT complaining that
> variables undefined if these variables are put inside the for-each
> loop and made to print out outside of the for-each loop ?

This could be one of the strategy:

<xsl:variable name="x">
   <xsl:for-each ..

   </xsl:for-each>
</xsl:variable>

Another strategy could be; store something in a variable, and then
delegate to a template to do something (with passing of the variable
as a parameter).

There could be other strategies as well ...

>  Warning! A variable with no following sibling instructions has no effect
> What does this warning really imply ?

This is just a warning from the processor to indicate unreachable
code. Since such variable instructions will never be useful, it's a
good practice not to have them, or use them somehow.


-- 
Regards,
Mukul Gandhi

Current Thread
  • [xsl] for-each issue
    • Z W - 27 Mar 2008 07:52:43 -0000
      • Mukul Gandhi - 27 Mar 2008 08:29:07 -0000 <=
        • Z W - 27 Mar 2008 09:55:04 -0000
          • Mukul Gandhi - 27 Mar 2008 10:32:23 -0000
          • Z W - 27 Mar 2008 10:40:23 -0000
          • Z W - 27 Mar 2008 10:53:10 -0000