The Output consists of a set of variables
that we can associate query results with, and their corresponding range specification.
For example, suppose AmazonSearch returns results in the following form:
We see that we have three
important pieces of information: authors, titles and prices. Each book has an
author, title and price and we can have zero or more books returned from a query to
AmazonSearch. Information such as cover format, publish year and savings are not
important to us so we define the output as follows:
<OUTPUT name="amazonBooks">
<elementType id="author"> <string/>
</elementType>
<elementType id="title"> <string/>
</elementType>
<elementType id="price"> <string/>
</elementType>
<elementType id="amazonBook">
<element type="author" />
<element type="title" />
<element type="price" />
</elementType>
<elementType id="amazonBooks">
<element type="amazonBook" occurs="ZEROORMORE"
/>
</elementType>
</OUTPUT>