Skip to content

Querying treebanks XML, XQuery, XPath

Monica Berti edited this page Mar 20, 2017 · 19 revisions

Date: Thursday, February 23, 2017, 17h00-18h15 (CET time)

Session coordinator: Giuseppe G.A. Celano (University of Leipzig)

YouTube link: https://www.youtube.com/watch?v=XG3JvBI0CAs

Slides: https://drive.google.com/file/d/0B4j3-YM-jGgDY1QzUGpTZTc3d00/view?usp=sharing


Summary

This lecture aims to impart the basics of XQuery and XPath as implemented in BaseX to (easily and efficiently) navigate any XML documents and extract information therefrom

Outline

  1. Introducing XML, XQuery, XPath, and BaseX
  2. XPath expression
  3. FLOWR expression
  4. String Functions

Required activities/readings

  1. Download the file "BaseX 8.6.jar". Click then on the file and you should be able to have the Graphical User Interface running (Java is required, but you are very likely to already have it on your machine). More information on the BaseX Startup page

  2. Download the Ancient Greek and Latin Dependency treebank on your local machine. Focus on the data in the v2.1 folder.

  3. Download Caesar's De Bello Civili

  4. Read the following sections on XML - Managing Data Exchange/XPath:

Further (advanced) readings

  1. Official documentation on BaseX and XQuery
  2. Walmsley, Priscilla. 2016. XQuery. O'Reilly.

Essay title

Practical exercise

  • Find all relative clauses in the Latin treebank.
  • Try to list all passages in Caesar's De Bello Civili which talk about Scipio.
Clone this wiki locally