Iterative Processing

In working with XML data, you are likely to run into documents that contain a repeating structure. For example, a document that represents a database recordset might contain a repeating collection of <record> elements. Generically, that document might look something like Listing 4.7.

Listing 4.7. An XML Document Instance Containing <record> Elements Representing Records in a Database Table
 <?xml version=”1.0” ?> <recordSet> <record num=”001”> <field1>data for field 1</field1> <field2> data for field 2</field2> <field3> data for field 3</field3> <record num=”002”> <field1>data for field 1</field1> <field2> data for field 2</field2> <field3> data for field 3</field3> <record num=”003”> <field1>data for field 1</field1> <field2> ...

Get Special Edition Using XSLT now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.