Re: [xsl] First node processed repeatedly

Subject: Re: [xsl] First node processed repeatedly
From: Imrran Wahid <devguy2003@xxxxxxxxx>
Date: Fri, 7 Mar 2003 10:14:40 -0800 (PST)
I fixed the problem by using a variable to keep track
of the context node.
> <xsl:template name="OptionalFldsTblCellData">
>   <xsl:param name="row-node" select="/.."/>
>   <xsl:param name="lookup-node" select="/.."/>
>   <!--xsl:variable name="thisitem" select="."/-->
>   <xsl:for-each select="$row-node">

At this point I insert the variable
      <xsl:variable name="this-row" select="."/>

and in the <td> section I reference the variable as
such:
<td nowrap="true">
  <xsl:value-of
select="$this-row/*[name()=name(current())]"/>
</td>

and that seemed to have fixed the problem. I can't
explain to myself why...but I think I understand a
little.


I have another problem. If a named element exists in a
row but not in another, an empty <td> entry is made in
the row where it's absent. And the cell border does
not get drawn. This also happens if the element is an
empty element eg <element/>. How do I detect this and
allow a non breaking space to be inserted instead? I
am hoping that would fix the problem. If anyone has
any ideas I would be grateful.

Imrran

__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

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


Current Thread