Friday, May 2, 2003 07:04 AM
Here is an complete answer for you, include the XMLs XSLT and analysis.Q. Should I use nested loop in this problem?
A: Interesting one, see the XML source and required result XML. XML sourece
Required XML result
XSLT soureces for comparison
Important points here:
- Loops here are nested. The outer loop is on , the inner loop is on the key
- If inner loop is on , then it would be very inefficient.
- The and key() function are playing the same role as index in database.