XQuery: A Typed Functional Language for Querying XML

Research output: Chapter in Book/Report/Conference proceedingChapter

Abstract

XQuery is a typed, functional language for querying XML, currently being designed by the XML Query Working Group of the World-Wide Web Consortium. Here are examples of XQuery queries on a suitable XML document describing books. To list titles of all books published before 2000 you might write: document(”books.xml”)/BOOKS/BOOK[@YEAR < 2000]/TITLE To list the year and title of all books published before 2000 you might write: for $book in document(”books.xml”)/BOOKS/BOOK where $book/@YEAR < 2000 return <BOOK>{ $book/@YEAR, $book/TITLE }</BOOK> And to list for each author the titles of all books by that author you might write: let $books := document(”books.xml”)/BOOKS for $author in distinct($books/BOOK/AUTHOR) return <AUTHOR NAME=”{ $author }”>{ $books/BOOK[AUTHOR = $author]/TITLE }</AUTHOR>
Original languageEnglish
Title of host publicationAdvanced Functional Programming
Subtitle of host publication4th International School, AFP 2002, Oxford, UK, August 19-24, 2002. Revised Lectures
EditorsJohan Jeuring, Simon L. Peyton Jones
Place of PublicationBerlin, Heidelberg
PublisherSpringer Berlin Heidelberg
Pages188-212
Number of pages25
ISBN (Electronic)978-3-540-44833-4
ISBN (Print)978-3-540-40132-2
DOIs
Publication statusPublished - 2003

Publication series

NameLecture Notes in Computer Science
PublisherSpringer Berlin Heidelberg
Volume2638
ISSN (Print)0302-9743

Fingerprint

Dive into the research topics of 'XQuery: A Typed Functional Language for Querying XML'. Together they form a unique fingerprint.

Cite this