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

RE: XSL distinct group by date

Subject: RE: XSL distinct group by date
From: "Mindy McCutchan" <karma@xxxxxxxxxxxxxx>
Date: Fri, 06 May 2005 12:04:43 -0500
xsl distinct
Wendell,
Thank you so much! This reference not only solved my problem but explained a
lot of the other problems I've had with XSL.

I really appreciate everyone's help.

Thanks,
Mindy

> >-----Original Message-----
> >Date: Mon, 02 May 2005 12:11:01 -0400
> >To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
> >Subject: RE:  XSL distinct group by date
> >Message-Id: <6.2.0.14.0.20050502120218.03405570@xxxxxxxxxxxxx>
> >
> >Mindy,
> >
> >At 03:12 PM 5/1/2005, you wrote:
> >>Now if I use the XSLT in the above link
> >>(http://sources.redhat.com/ml/xsl-list/2000-07/msg00458.html
), it does
> >>return the distinct customer name values, but it also 
> >writes out the value
> >>of the nodes outside the /projects level, yielding: 
> >Customer 1Customer 2 A
> >>Paper Title
> >
> >This is undoubtedly happening because these nodes are being 
> >selected by 
> >default and matched by the built-in templates, so their 
> >contents are being 
> >copied to the result tree and written out.
> >
> >(The Jeni-code in the post cited did not include any of the 
> >templates that 
> >would handle other structures in a real case; if you leave 
> >those out, 
> >you'll get the default behavior, which is as you describe.)
> >
> >The solution is either to arrange not to select the nodes 
> >you don't want, 
> >or to assure that when they are selected and matched, 
> >nothing gets done 
> >with them. (The latter is commonly done by matching them 
> >with empty templates.)
> >
> >Terms to research: built-in templates; XSLT processing 
> >model; semantics of 
> >xsl:apply-templates and its select attribute.
> >
> >Short version: try using a template like this
> >
> ><xsl:template match="company">
> >   <xsl:apply-templates select="projects"/>
> ></xsl:template>
> >
> >to replace the built-in template, which would look like this:
> >
> ><xsl:template match="company">
> >   <xsl:apply-templates select="child::node()"/>
> ></xsl:template>
> >
> >Cheers,
> >Wendell

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.