[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Excluding an element with specific content from an <x

Subject: Excluding an element with specific content from an <xsl:sort> call
From: "Mark Wilson" <mark@xxxxxxxxxxxx>
Date: Sat, 30 Jan 2010 12:04:53 -0800
 Excluding an element with specific content from an  <x
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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.