Learn XQuery: A list of great articles, blog posts, and books for learning XQuery
Let's show the world how to learn XQuery. Pull requests welcome. Quality over comprehensiveness - just the best, most helpful resources, please. Talk about
#xquery on Twitter.
Also, check out these resources powered by XQuery, repositories with XQuery on GitHub, and questions about XQuery on Stack Overflow.
- W3Schools XQuery. Limited to XQuery 1.0, but a quick overview.
- XQuery Wikibook Beginning Examples. Perhaps the best developed portion of the XQuery Wikibook site (see remarks below).
Materials from XQuery courses
- XQuery for Humanists, by Clifford Anderson, et al. Exercises for XQuery workshops geared toward humanities scholars; most recently updated for Digital Humanities 2017. (See their 2020 book, linked below.)
- Make your edition: models and methods for digital textual scholarship, a.k.a. Pittsburgh NEH Institute, hosted at the University of Pittsburgh in 2017. Covers many topics, including XPath and XQuery.
- Digital Humanities Courses: Tutorials + Exercises, by Elisa E. Beshero-Bondar. Covers many topics, including XPath and XQuery.
- XQuery and XML Applications, by Adam Retter (see his other presentations). Slides from the XQuery track of the 2016 XML Summer School, Oxford.
- XQuery Summer Institute, hosted at Vanderbilt University in 2015.
- XPath and XQuery (YouTube), by Jennifer Widom, Stanford University, 2014. Covers the XPath language for processing XML data, along with many features of the more advanced XQuery language. Part of a set of smaller self-paced "mini-courses", which can be assembled in a variety of ways to learn about different aspects of databases.
- Web Development Using XML, David P. Heitmeyer, CSCI E-18, Fall 2015, Harvard Extension School. (See lecture notes from this course since 2003.)
- Querying XML: XPath and XQuery, by Katrien Verbert and George Fletcher, slides from Database Technology (2ID35), Technische Universiteit Eindhoven, Spring 2013.
- XML with Java, Java Servlet, and JSP (YouTube), David Malan, CSCI E-259, Fall 2007, Harvard Extension School.
Some people can learn languages by reading online tutorials. Some people like to dive into a book, or have one on their shelf for reference. Listed in chronological order by date of printing, newest to oldest.
- XQuery for Humanists, Clifford B. Anderson and Joseph C. Wicentowski, Texas A&M University Press, 2020. An introduction to XQuery accessible to non-programmers. Has a running focus on use cases related to research in the humanities. See also the book's companion website.
- XQuery, 2nd Edition: Search Across a Variety of XML Data, Priscilla Walmsley, O'Reilly, 2015. The standard text for XQuery, available in a second edition, updated for XQuery 3.1. Also introduces functx.
- eXist: A NoSQL Document Database and Application Platform, Erik Siegel and Adam Retter, O'Reilly, 2014. Introduces approaches to building applications with one popular XQuery-based platform, eXist. Example code for the book is on GitHub.
- XQuery from the Experts, A bit dated (2003), and only available second-hand, but its coverage of the concepts and purpose and role of the language makes it more than just a tutorial or reference manual.
- 3.1 (W3C Recommendation, 2017): XQuery 3.1, Data Model, Functions and Operators, Serialization, Update Facility (no 3.1 version yet; see the 3.0 version).
- 3.0 (W3C Recommendation, 2014): XQuery 3.0, Data Model, Functions and Operators, Serialization, Update Facility
- 1.0 (W3C Recommendation, 2007): XQuery 1.0, Data Model, Functions and Operators, Serialization, Update Facility.
Latest developments in XQuery
- Using XPath 3.1 (and its friends) to work with JSON, Ash Clark, 2021. A lightning talk presented at Code4Lib 2021.
- Converting Roman numerals with XQuery & XSLT I–IV, Joe Wicentowski, 2021. Explores the use of XQuery 3's
- New in XQuery 3.1: Maps and arrays, Jesse Alama, 2015. A core new set of features in XQuery 3.1.
Thought pieces situating XQuery in the world
- The integration of XML databases and content management systems in digital editions: Understanding eXist-db through Reese’s Peanut Butter Cups, Birnbaum, David J., Hugh Cayless, Emmanuelle Morlock, Leif-Jöran Olsson and Joseph Wicentowski. Presented at Balisage: The Markup Conference 2019, Washington, DC, July 30-August 2, 2019. In Proceedings of Balisage: The Markup Conference 2019. Balisage Series on Markup Technologies, vol. 23 (2019). https://doi.org/10.4242/BalisageVol23.Birnbaum01.
- XQuery as a data integration language, Hans-Jürgen Rennau and Christian Grün. Presented at Balisage: The Markup Conference 2015, Washington, DC, August 11-14, 2015. In Proceedings of Balisage: The Markup Conference 2015. Balisage Series on Markup Technologies, vol. 15 (2015). https://doi.org/10.4242/BalisageVol15.Rennau01.
- XQuery: It's not just for queries!, Jesse Alama, 2015. Emphasizes wide utility of XQuery.
- On Teaching XQuery to Digital Humanists, Clifford Anderson, presented at Balisage: The Markup Conference 2014, Washington, DC, August 5-8, 2014. In Proceedings of Balisage: The Markup Conference 2014. Balisage Series on Markup Technologies, vol. 13 (2014). https://doi.org/10.4242/BalisageVol13.Anderson01.
- XQuery Novelties Revisited, Geert Josten, 2011. Situates XQuery among the various XML and non-XML standards. Provides a little history on the development of XQuery.
- XQuery, the Server Language, Kurt Cagle, 2007. Explains that XQuery is much more than a language for querying XML.
- XQuery Wikibook: An introduction to XQuery and a cookbook for various applications. Fairly eXist-centric and many pages out of date with developments both in eXist and XQuery, but very useful still.
- XQuery Update facility for the impatient, A quick introduction to the XQuery Update Facility, Xavier Franc. Presents the XQuery Update facilities introduced by the W3C recommendation.
- XQuery and Lazy Enrichment, Matt Turner, 2007. Demonstrates a simple but powerful technique for enriching text with links to Wikipedia. Easily applied to any XQuery implementation.
- MarkLogic Server and Office 2007, Pete Aven, 2007-09. The last in a series (see the links to the other articles at the bottom) on how to open, manipulate, and create Microsoft Office documents using XQuery. Easily applied to any XQuery implementation.
Documentation from XQuery implementations about their use of XQuery
In depth articles on conformance to / divergence from the spec, and links to key articles and documentation:
- XQuery in BaseX. See also all BaseX documentation.
- XQuery in eXist-db. See also eXist XQuery Features Demo, XQuery Function Documentation, Getting Started with Web Application Development in eXist and all eXist documentation
- XQuery in MarkLogic. See also Application Developer's Guide and all MarkLogic documentation
- XQuery in Saxon. See also Saxon's XQuery 3.1 Conformance.
Mailing lists, forums
- XQuery-Talk: a mailing list best for general XQuery questions and discussion. Subscribe. Archives.
- Stack Overflow has many active users who answer XQuery questions.
- Implementation mailing lists:
Other lists of XQuery learning materials
- XQuery, from "XML / Database Links", by Ronald Bourret. Last updated 2011 but still useful.