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]

Re: Elements of non-actual position


Michael Leditschke wrote:
> Hi Joerg. Isn't there a level missing here? Shouldn't it be
> <xsl:template match="table/rows/row">
>   <xsl:for-each select="col">
>
> Otherwise pos is the row number not the column number.
>
> Regards
> Michael

Yes, you are right. One level is missing, but it's not col, it's cell:

<xsl:template match="table/rows">
  <xsl:for-each select="row[1]/cell">
    <xsl:variable name="pos" select="position()"/>
    <xsl:if test="/table/cols/col[$pos]/@visible = '1'">
      do what you want
    </xsl:if>
  </xsl:for-each>
</xsl:template>
Regards,

Joerg


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]