Re: How do I skip an element?

Subject: Re: How do I skip an element?
From: Sara Mitchell <smitchel@xxxxxxxxxx>
Date: Tue, 04 May 1999 16:08:16 -0700
I haven't tried this personally, but I did run into a somewhat 
similar problem. My suggestion would be: 

<xsl:for-each select="data/*[first-of-any()]">
  <xsl:choose>
    <xsl:when test="/*[name(.) ='column2']">
    </xsl:when>
    <xsl:otherwise>
        <TH><xsl:value-of select="name(.)"/></TH>
    </xsl:otherwise>
  </xsl:choose>
</xsl:for-each>

Sara Mitchell

Larry Mason wrote:
> 
> Hi all !
> I am trying to produce a table where the column headings are the element names
> except for one particular name that is to be excluded.  
[snip]
> Here are some things I've tried to get the TH to work but are returning 'invalid
> token' or 'unexpected token' errors.
> I don't know what the column names will be except there is one column that is
> always present which I want to exclude.
> 
> <xsl:for-each select="data/*[first-of-any()]/*[name(.) !='column2']">
>    <TH><xsl:value-of select="name(.)"/></TH>
> </xsl:for-each>
> 
> <xsl:for-each select="data/*[first-of-any()]/* $and$ data/*/*[name(.)
> !='column2']">
>    <TH><xsl:value-of select="name(.)"/></TH>
> </xsl:for-each>
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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


Current Thread