xsl-list
[Top] [All Lists]

[xsl] Excluding an element with specific content from an <xsl:sort> call

2010-01-30 14:05:25
Hi,
Is it possible when using <xsl:sort> to exclude elements with specific content from that <xsl:sort>call?

In Listing 1, when the content of the element<Prefix> is 'A' , I would like to exclude that particular element from being sorted in the <xsl:sort select="Prefix" data-type="text" /> call. I cannot see how to use the "except" operator to do this. Is there a way to use "except" or some other filter?

Some input records will contain no <Prefix> element. However, when present, the <Prefix> element may content other than "A", such as "D", "L", etc. My goal is to sort input records with an <Prefix>A</Prefix> element as though it were absent from the record.

Listing 1:
<xsl:for-each-group select="Item" group-by="concat(CatalogName, Prefix, CatalogNumber, Range)"> <xsl:sort select="CatalogName" data-type="text" collation="{$sorting-collation}"/>
<xsl:sort select="Prefix" data-type="text" />
<xsl:sort select="CatalogNumber" data-type="number"/>

Thanks,
Mark


--~------------------------------------------------------------------
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>
--~--