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(_at_)mulberrytech(_dot_)com
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
======================================================================
--~------------------------------------------------------------------
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>
--~--