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

Re: seemingly simple transform, need idea how to do it

Subject: Re: seemingly simple transform, need idea how to do it.
From: Trevor Nash <tcn@xxxxxxxxxxxxx>
Date: Wed, 09 Oct 2002 18:59:17 +0100
Re:  seemingly simple transform
On Tue, 8 Oct 2002 08:48:07 -0500, Will Carter wrote:

>I want to be able to sort on the Billy funThing or Billy badThing columns. 
> Seems like I am doing too much to set variable with position, 
>jump out of that loop to get the Billy contents.

I will let others on the list complain about the 'jump out of the
loop' bit ;-)

I guess your problem is that if the input XML is not in date order
already, the 'Johnny' columns get sorted OK but the 'Billy' columns
stay in document order?

That is because the position you are saving is the position in the
sorted node list, so the earliest date will always be position 1.
Then when you use this number to pick a Billy node, you will get the
first in the document regardless of what date it is.

So: find the Billy information by selecting on the date rather than
the position.

When you have that working, come back to the FAQ and look up grouping
using xsl:key (called 'Meunchian grouping').  That will let you do
neat things like cope with input where Billy and Johnny do things on
different days, so you have to leave some of the columns blank.

Hope that helps,
Trevor Nash
--
Traditional training & distance learning,
Consultancy by email

Melvaig Software Engineering Limited
voice:     +44 (0) 1445 771 271 
email:     tcn@xxxxxxxxxxxxx

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


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.