Thanks for the quick reply Martin.
Maybe I should have included a snippet of my XSL.
I'm doing the following...
<fo:table-row keep-together.within-column="always">
<xsl:for-each select="Cell">
<xsl:call-template name="DataCell"/>
</xsl:for-each>
</fo:table-row>
<xsl:template name="DataCell">
<xsl:choose>
<xsl:when test="@Status='Panic'">
<fo:table-cell color="red" background-color="white" border="1pt solid
black" wrap-option="wrap" overflow="hidden">
<fo:block font-size="10pt" padding="1mm" margin-left=".25mm"
overflow="hidden" language="ru" hyphenate="true">
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:when>
<xsl:otherwise>
<fo:table-cell color="black" background-color="white" border="1pt solid
black" wrap-option="wrap" overflow="hidden">
<fo:block font-size="10pt" padding="1mm" margin-left=".25mm"
overflow="hidden" language="ru" hyphenate="true">
<xsl:value-of select="."/>
</fo:block>
</fo:table-cell>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
I tried doing...
<xsl:for-each select="Cell[position() = (1,2,3,6,7)]">
but that doesn't work.
----- Original Message -----
From: "Martin Honnen" <Martin(_dot_)Honnen(_at_)gmx(_dot_)de>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Thursday, March 26, 2009 12:47 PM
Subject: Re: [xsl] Need help skipping a child element
Fatbob wrote:
Using XSL, I need to be able to remove (by this I mean or not display)
certain child elements. For example I only want to display the 1st, 2nd,
3rd, 6th and 7th, and always those elements only.
Well XSL does not display elements, it only processes them. If in your
template for the Row element you do e.g.
<xsl:template match="Row">
<xsl:apply-templates select="Cell[position() = (1,2,3,6,7)"/>
</xsl:template>
<xsl:template match="Cell">
<!-- output what you want to output -->
</xsl:template>
then with XSLT 2.0 that should work to process only the listed Cell
elements.
--
Martin Honnen
http://JavaScript.FAQTs.com/
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--