An XQuery Programming Scenario

We present here a scenario of programming in XQuery inspired by the relational use case in [XQ-UC]. We follow the steps of a programmer who is writing a query that transforms data about an auction into an XHTML document. Each step in the scenario reveals an error in the query, explains how the programmer found the error, and explains how to correct the error.

We start with a description of the input data and schema and the output schema. The input data in Listing 4.1 is information about an auction that has been exported from a relational source in XML. The XML data conforms to the XML Schema in Listing 4.2. An auction contains a set of users, articles, and bids. A user has a name, a rating, and a unique identifier. ...

Get XQuery from the Experts: A Guide to the W3C XML Query Language now with the O’Reilly learning platform.

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