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

Re: XSLT 1.0: Problem grouping disparate unordered dat

Subject: Re: XSLT 1.0: Problem grouping disparate unordered data
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Wed, 15 Mar 2006 14:15:50 -0500
Re:  XSLT 1.0: Problem grouping disparate unordered dat
Nick,

At 01:49 PM 3/15/2006, you wrote:
Thanks for that; it hadn't occurred to me to use translate() in that way.
(It's one of those days when very few things are occurring to me.) Looking
at the actual data I'm working with, a better example would have been
using values of @type like:

"Gorilla"
"Chimpanzee"
"Gorilla Climbing Skyscraper"
"Bonobo"
"Chimpanzee Riding Unicycle"
"Orangutan"
"Gorilla Climbing Tree"

... you get the idea. It's difficult to see how to get translate() to work
with this, but the idea of creating a fancy sort key of some kind
definitely looks promising. I'll have a play around with it until they let
me go :-)

That's cool. Not being a mathematician, I can't say how far this technique can really reach. And then there's the maintainability issue -- say you have the fancy key working, but then all of a sudden you have to add "Bonobo Complaining in Sign Language"?


If it were me, I'd be looking hard for some way to pipeline or preprocess that data. You may still be at the stage where it's possible to do the baroque conversion in one pass. But that might just be postponing the day of reckoning. XSLT 1.0 just wasn't meant for some things; yet it becomes immensely more powerful when two or more transforms can be executed in sequence. (Which is why 2.0 does this natively. XSLT 2.0 actually offers several solutions to your problem.)

Cheers,
Wendell



======================================================================
Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
  Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================

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.