Uni Göttingen
Institute for Informatics
Databases and Information Systems

dbis

Practical Training XML
Winter Term 2016/2017

Prof. Dr. Wolfgang May

The course yields 6 ECTS-credits; it is graded (=benotet)

Prerequisites:

  • Successful participation in the module "Semistructured Data and XML",
  • Successful participation of the "General Programming Lab/Allgemeines Programmierpraktikum" (or an equivalent course).

Course Description

The practical training builds upon the lecture Semistructured Data and XML. The training uses the concepts of the XML world: DTD, XPath, XQuery, XSLT, XLink, XML Schema, SQL/XML, XML APIs for Java (SAX, DOM, JAXB), and Web Service infrastructure (Apache Tomcat).

  • The first part of the course uses the geographical sample database "Mondial" in its XML version.
  • The second part is intended to be carried out in a project-style (topics to be discussed: application scenario using Web Services, Java and XML; RDF/XML, ...)

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.

Time Schedule

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

  • 1. Meeting + Lecture: 24.10. (Mo), 14-16 ct SR 2.101: Introduction, Formalities
    1. Unit: Exercises to XPath, XQuery (including user-defined functions)
    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.
    Exercises: Blatt 1: XQuery (in german), Exercise Sheet 1: XQuery (in english)
  • 2. Meeting + Lecture: 2.11. (Wed), 16-18 ct SR 1.101:
    2. Unit: XSLT
    Slides: XSLT (some new slides about advanced practical issues)
    W3C XSLT 2.0, W3C Recommendation 23 January 2007.
    Exercises: Exercise Sheet 2: XSLT
  • Wed 9.11.: No course Meeting
    Group Meeting Grp D (XPath/XQuery)
  • Fr 11.11. 11:00: Group meeting part of Grp Int (XPath/XQuery)
  • Wed 16.11.: 16-18 SR 1.101 Course Meeting.
    XML and Java I: DOM, SAX, StAX
    Slides XML and Java I
    Code fragments from the slides: to download
    Exercises: Exercise Sheet 3: DOM/SAX/StAX
  • Fr 18.11. 11:00: Group meeting rest of Grp Int (XPath/XQuery)
  • Wed 23.11.: No course Meeting
    Group Meeting Grp D (XSLT)
  • Wed 30.11.: No course Meeting
    Group Meeting Grp Int (XSLT)
  • Next step: work on Sheet 3 (DOM, SAX/StaX, and an additional XSLT) exercise. Before having the next course, the participants should already have some experience with these techniques.
  • Wed 7.12.: 16-18 SR 1.101 Course Meeting.
    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
    Exercises: Exercise Sheet 4: JAXB/Digester
  • Wed 14.12.: No course Meeting
    Group Meeting Grp D (DOM/SAX/StAX)
  • Wed 21.12. 16:15: Group Meeting Grp Int (DOM/SAX/StAX)
  • 24.12.-6.1. lecture-free period
  • Wed 10.1.2017: 16-18 SR 1.101 Course Meeting - Web-Server-Technology, HTTP, Servlets.
    Installation instructions for tomcat (in case anything does not work, send me a mail)
    XQuery Demo Servler as .war-file
    Servlet Demo Source Code (updated 10.1.2017)
    Revised Slides: Web Services
    Exercises: Exercise Sheet 5: Web Services
  • New entry (17.1.): This is not an exercise, but rather an idea for people who want to experiment a little bit deeper also with Java techniques:
    With XMLStreams (StAX), empty elements are not dealt with appropriately. E.g.

     <border country="XYZ" length="123"/> 
    is parsed and written as
     <border country="XYZ" length="123"></border> 
    which is ugly and actually not correct.
    Note that XMLStreamReader and XMLEventReader neither have a EMPTY_ELEMENT event, but XMLStreamWriter has writeEmptyElement(...) whilst XMLEventWriter does not have it. This is illustrated by the small example program InOutStAXStream.java which just reads mondial by STAX and simply outputs it.

    Obviously, there are multiple possibilities to cure that: (i) a refined (subclass) for a Reader, (ii) handling the problems in (each) StAX application program, (iii) a refined (subclass) for a Writer (and even more?). What is the best possibility? How can it be realized programmatically?

  • Wed 25.1.: No course Meeting
    15:00 Group Meeting Grp D (Bl. 4+5)
  • Fri 3.2.: 11:00 Group Meeting Grp Int (Sh 3+4+5?) CANCELLED
  • Mon 6.2., 14-16 SR 2.101: final course meeting looking back on solutions and techniques from Sheets 3+4. CANCELLED
  • Mon 6.2.: 14:00 Group Meeting Grp Int (Sh 3+4+5?), CIP Pool
  • The final course meeting looking back on solutions and techniques from Sheets 3+4 will be rescheduled
  • Wed 15.2., 14-... SR 2.101: final course meeting looking back on solutions and techniques from Sheets 3+4. CANCELLED
  • Thu 9.3., 14-... SR 2.101: final course meeting looking back on solutions and techniques from Sheets 3+4.
    comments and code as pdf
    java code