O'Reilly logo

XQuery from the Experts: A Guide to the W3C XML Query Language by Philip Wadler, Jim Tivy, Jérôme Siméon, Michael Rys, Jonathan Robie, Michael Kay, Mary Fernández, Denise Draper, Don Chamberlin, Howard Katz - Editor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required