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

RE: with-param looping problem...

Subject: RE: with-param looping problem...
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Mon, 09 Oct 2006 12:04:17 -0400
looping problems

At 10:45 PM 10/7/2006, you wrote:
If you think that code includes some peculiar things, you should have
seen some of the things I tried.  I've never worked so hard with so
little return in my life...but, like Barkus, I'm willing.

If it's any comfort, please understand that grouping is #1 on the list of applications that are not trivially easy in XSLT 1.0 and yet that beginners nevertheless try to start with. It's like a novice carpenter setting out to build cabinetry before learning to frame boxes and hang shelves....

Grouping is an "up-transformation" in the sense that it adds information to a document that is not fully explicit already in the markup. But XSLT 1.0 was designed to provide transformations with the goal of formatting, not of truly arbitrary rearrangements of source documents; its assumption is that XSL's job is to provide presentational markup for XML input that is *already grouped*. That XSLT is used so commonly for tasks such as grouping is actually an indication that it's really good at what it does -- so people then apply it to other things it's not really good at doing.

Largely in order to deal with this trend in XSLT's usage, XSLT 2.0 has responded to the needs of users in regard to this as well as to other functionalities. If you can use XSLT 2.0 for your grouping you'll find it's much easier.

If you have no choice but to use XSLT 1.0, you might find, paradoxically, the best approach to solving a grouping problem is to set it aside and use the language for a while on other problems (maybe with the same input data) that are more straightforwardly solved, to gain some familiarity with the basic processing model and methodologies before getting into the more complex task. (Not everyone has this luxury unfortunately.) This would help ween you from ideas that don't really belong ("looping" through the nodes), and give you a basis for understanding some of the subtler things that might not make a difference except when they do (using a for-each vs using templates).

Assuming you're game (as you say you are), the best way to get help here (as always) is to isolate the exact question you have into a minimal demonstration, and post just that. Even doing that exercise will teach you a great deal, even apart from the answers you then get.


Current Thread


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.
First Name
Last Name
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.