The book trade's metadata standard is ONIX for Books, maintained by EDItEUR; Release 3.1 (March 2023, with minor revisions since) is the one new implementers should use. An ONIX message is a header plus one product record per book, grouped into blocks: identifiers, descriptive detail, collateral detail (summaries), publishing detail and product supply. EDItEUR grants no clear licence to reproduce its schema or code lists, so BookNest uses its own vocabulary with the same shape, built from Data Engineering Foundations's six books. It lives in demos/ch02/booknest-catalog.xml, and the whole chapter uses it. The root <catalog xml:lang="en"> holds a <header> (sender, sent time, record count) and six <book> records whose blocks map to identifier; title, contributor, subject, pages; summary, published; and supply:
<book id="b1">
<identifier type="sku">BN-0001</identifier>
<title>The Quiet Harbor</title>
<contributor role="author" seq="1">
<name>Mara Ellison</name>
<sort-name>Ellison, Mara</sort-name>
</contributor>
<subject scheme="booknest-genre">Fiction</subject>
<pages>312</pages>
<published>2024</published>
<summary>A lighthouse keeper's daughter pieces together a decades-old
disappearance.</summary>
<rating>4.6</rating>
<supply>
<availability>in-stock</availability>
<price currency="USD">14.99</price>
</supply>
</book>One XPath expression lists all six records; ! applies the expression on its right to each book in turn:
xquery -s:booknest-catalog.xml -qs:'//book ! string-join(
(@id, title, subject, supply/price, supply/availability), " | ")'"b1 | The Quiet Harbor | Fiction | 14.99 | in-stock" "b2 | Patterns of the Deep Web | Technology | 39.50 | in-stock" "b3 | Salt and Saffron | Cooking | 24.00 | out-of-stock" ... "b6 | Gardens in Glass | Home and Garden | 21.30 | in-stock"
Its design decisions carry through the chapter. Values stay text until a schema types them: BookNest's Six Books as CSV's CSV printed 39.5, XML keeps 39.50. Coded values are short tokens (in-stock, author), like ONIX code lists. There is no namespace yet, to keep early XPath readable (Namespaces and xml: Attributes adds one). Summaries wrap, as hand-edited feeds do, leaving whitespace to clean with normalize-space() (String Functions). Real feeds use ISBN-13 identifiers; BookNest's sku values are invented, so no real ISBN is misattributed.