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

RE: possible nested loops

Subject: RE: possible nested loops
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 15 Feb 2006 00:16:21 -0000
RE:  possible nested loops
It sounds like a straightforward beginner's problem, but it's hard to know
how to set you on the right path without seeing where you've gone wrong. I
know you may find it embarrassing to show your novice code in public, but
it's the best way of getting focussed advice.

Nested for-each loops are one way to tackle this problem, but "the XSLT way"
is a recursive descent of the tree structure using template rules that match
the nodes at each level.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: garry@xxxxxxxxxxxxxxxxxxx [mailto:garry@xxxxxxxxxxxxxxxxxxx] 
> Sent: 14 February 2006 22:21
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  possible nested loops
> 
> I wonder if someone could point me in the right direction to solve my
> problem. I need to transform an xml file to html. I have 
> tried to make a
> stylesheet but none of my efforts have been successful.
> The xml has around 800 pupil records (<pupil>) so I want to 
> iterate over
> each pupil node. Within each pupil node there are other nodes which
> repeat, so for each pupil I need to iterate over child nodes of which
> there may be none or many of each type. I suspect a nested 
> loop of some
> sort may help but I have not been able to implement one, any ideas?
> regards
> garry

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.