Uni Göttingen
Institute for Informatics
Databases and Information Systems

dbis

Practical Training XML
Winter Term 2022/23

Prof. Dr. Wolfgang May
Lars Runge, M.Sc.,

  • Module M.Inf.1802, 4 SWS, 6 ECTS-credits; it is graded (=benotet)

Course Description

The practical training builds upon the lecture Semistructured Data and XML. It introduces XML application programming based on Java and on Web Services.

Prerequisites:

  • Successful participation in the module Semistructured Data and XML or comparable good knowledge in XML, and
  • Successful participation in the "General Programming Lab/Allgemeines Programmierpraktikum" (or an equivalent course on Programming+Java).

The training uses the concepts of the XML world: XML, DTD, XPath, XQuery, XSLT, XLink, XML Schema, SQL/XML, XML APIs for Java (DOM, SAX, StAX, JAXB), and Web Service infrastructure (Apache Tomcat).
Most of the course uses the geographical sample database "Mondial" in its XML version.

  • Date and Time: Mon 14-18
  • Room: IFI 2.101 (North Campus)
  • The course takes place in groups of 3-4 persons. There are usually 5 units: XPath/XQuery, XSLT (both based on the material of the lecture), XML and Java I (DOM/SAX/StAX), XML and Java II (JAXB and Digester), and Web Services (with an application project).
  • For every unit, there is an exercise sheet which will be discussed with one of the supervisors, using monday 14-18 slots.
  • Every monday: Optional live online "course meetings" with BigBlueButton. Course materials are provided as recordings, so the meetings consist of short comments to the new topic and questions&answers and hands-on support for the ongoing exercise sheet.
  • Materials for self-studying are provided as PDF slides and as videos (from winter term 2020/21)
  • Please also read the general and technical information about DBIS virtual teaching.

Documentation: use the slides from the SSD/XML lecture (the full slide set can be found here; Sections 1-8 were the material of the lecture, the rest is intended for the practical course) and the W3C documentation linked below. For practical exercises, the XML software is installed in the IFI CIP Pool. Short descriptions of the software to be used can be found here.

Prospective Time Schedule

Part I: Review of basics, concepts and languages around XML that should be known from the XML lecture.

  • Mo 31.10. Holiday (Reformation Day) in northern Germany. No meeting.
  • Kickoff Meeting (attendance required): Mo 7.11.: 14-16: Introduction, Formalities
    Rocket Chat of the XML lab course.
  • 7.11. cont'd: 1. Unit: Exercises to XPath, XQuery (including user-defined functions)
    Slides: XPath, Slides: XQuery from the lecture.
    In addition to the slides, the W3C material serves as technical documentation for the languages:
    W3C XPath 3.0, W3C Recommendation, 2014.
    W3C XQuery 3.0, W3C Recommendation 2014.
    W3C XPath and XQuery Functions and Operators 3.0, W3C Recommendation 2014.
    Video: see StudIP WS20/21,
    Exercises: Exercise Sheet 1: XQuery (groupwise discussion until 21.11.2022)
  • 14.11. 2. Unit: XSLT (optional BBB-Meeting, short comments, mainly then hands-on support for XQuery Exercises)
    Slides: XSLT
    W3C XSLT 3.0, W3C Recommendation 8 June 2017.
    Video: see StudIP WS2021,
    Video: some more comments on XSLT from two years ago (it also gives some comments on the exercise sheet, note that the old Exercise 3 has been changed into an item of Ex.2)
    Exercise Sheet 2: XSLT (Ex.2 can be shared by 2 persons; groupwise discussion until 5.12.2022)
    Download the updated mondial.xml.
  • 21.11.: Discussion of Exercise Sheet 1 (XPath/XQuery): groupwise, with one of the supervisors
  • 28.11.: Ex.Sheet 2 has been slightly revised and extended: Ex.2.2 is maybe still/again not completely possible with restricted browser XSLT 1.0 - do it as far as possible as an experience with dynamically created Web pages.
    Added (optional): Ex 2.3 -- document XML (Hamlet) to LaTeX. It illustrates the flexibility of XSLT and the generation of non-XML target data.

Part II:

  • 28.11.: 3. Unit: XML and Java I: DOM, SAX, StAX (and hands-on support for XSLT exercises)
    Slides: XML and Java I
    Code fragments from the slides: to download
    Video: see StudIP WS20/21
    • Exercise Sheet 3: DOM/SAX/StAX [ catdata.xml ]
    • The exercise sheet contains 7 exercises:
    • Exercises 1 and 2 are smaller "warmup" exercises for DOM and SAX/StAX, they should be done groupwise such that everybody gets into the new material. The discussion of these exercises will be rather short.
    • Ex. 3 goes a bit deeper into the idea of stream processing of XML and Java threads.
    • Exercises 4-7 handle a "real use case" in different ways. The presentation of these bigger exercises should not just be like "yes, I did it", but to present the solution ideas+strategy, an informative overview of the code and the interesting aspects, and the lessons learnt by doing it.
    • Presentations/Discussion preferably on 12./19.12.2022 (for this, we need probably two appointments).
  • 5.12.: Discussion of Exercise Sheet 2 (XSLT): groupwise, with one of the supervisors
  • 12.12.2022: 4. Unit: XML and Java II: JAXB, Digester
    Slides: XML and Java II.
    JAXB uses XML Schema: Slides XML Schema
    Code fragments from the slides: to download (including the readme with the shell commands for JAXB).
    (Test 12.12.2022: JAXB works with some warnings on the CIP pool computers).
    The Digester jar files can be found in /afs/informatik.uni-goettingen.de/user/d/dbisuser/XML-Tools/Digester (CIP Pool) or here.
    Note: the Digester examples on the slides work in the IFI-Pool only when /afs/informatik.uni-goettingen.de/group/dbis/public/oracle/lib/xmlparserv2.jar is not in the classpath (situation in 2019).
    Video see StudIP WS20/21,
    Exercises: Exercise Sheet 4: JAXB, Digester, HTML processing (groupwise discussion 16.1.2023)
  • 12.12.2022 afterwards: Discussion of some exercises from Exercise Sheet 3.
  • 19.12.2022: Discussion of the rest of Exercise Sheet 3.

Part III:

  • FlexNow Registration: just opened, until Feb 10th
  • 9.1.2023: 5. Unit: Web-Server-Technology, HTTP, Servlets.
    Video: see StudIP WS20/21,
    Slides: Web Services
    Installation instructions for tomcat
    XQuery Demo Servlet as .war-file
    Servlet Demo Source Code
    For using other people's Web Services, you need HTTP internet access to their tomcat/apaches. This is usually not possible "behind" an internet provider (dynamic IP addresses). For this, you can use the institute's shell servers (with ssh forwarding) and install tomcats there (if you are on the same shellX, then bind your individual tomcats to 8080, 8081, 8082 ...):
       * login.stud.informatik.uni.goettingen.de -> shell1.cip.loc  ... shell8.cip.loc
    
  • Exercise Sheet 5: Web Services, Project: University Information Services - EXA, StudIP, FlexNow
  • Saxon version 12.0 has been released at saxonica where the "where every $x satisfies ..." bug from last summer is now fixed. The DBIS XQuery Webservice has been updated.
  • 16.1.2023: Discussion of Exercise Sheet 4.
  • 23.1.2023: Project Meeting, Discussion of the Exercises of Exercise Sheet 5, Special Topic: Java Exceptions
  • 30.1.2023: Project Meeting
  • 6.2.2023: Project Meeting