Helsingin yliopisto Tietojenkäsittelytieteen laitos
 

Tietojenkäsittelytieteen laitos

Tietoa laitoksesta:

 

581290-5 Processing of Structured Documents; Project work

General task

Your task is to design a simple Business-to-Business (B2B) web application. The main goal of this project is to put the many specifications and tools of the XML world to some context, that is, try to see the "big picture" behind all the details. It is more important that you try to understand the overall concepts than that you present a very detailed design of the system.

Subtasks

  1. Assume there is a Company A, which sells office supplies, and a Company B, which buys these supplies from Company A.

    • Choose some products from the www.staples.com web site, and collect all the information given on the page about these products. (Note: the site may ask you to give a US zip code. You can give, e.g. 23456.)

    • Write a DTD that describes the product information you found.

    • Describe briefly the general architecture of the application (e.g. draw a picture): business partners, (some) business transactions and the related information that has to be transferred between the partners (Who sends an order/invoice to whom? What information might these documents contain? etc.).

    • Construct XML Schemas for the XML documents you designed in the Part 1.

    • Describe the possible differences between your DTDs and XML Schemas. Can you express some information, constraints, etc. better using XML Schemas? Are these features useful in your application (business-to-business data transfer)?

    • Validate your schema, e.g., using the XSV validator:.

      1. Give just the URL location of your schema in the field Adress(es) to check the syntax of the schema alone.
      2. Give first the URL of the XML document instance and then the URL of the schema to validate the document according to the schema. You can also make some "errors" to the document instance to see what is reported.
      3. If you add to the document instance a schema location declaration, like below, it is enough to give the URL of the document instance in the field.
        <?xml version="1.0" encoding="UTF-8"?>  
        <cards
             xmlns:xsi = "http://www.w3.org/2001/XMLSchema-instance"
             xsi:noNamespaceSchemaLocation = "http://www.cs.helsinki.fi/group/dime/rado/
        k02/harj/02/cards.xsd"
        >
        
        
      4. The XSV Validator seems to be sometimes very slow, or there are some other problems, so if you don't manage to get it work properly, don't try too long.
  2. Assume Company B wants to buy some products from Company A and sends a purchase order to Company A.

    • Create an XML document that is sent from Company B to Company A. You can choose freely which information is relevant for the order.

    • Assume Company A uses SAX as a programming interface to process the orders. Give SAX content handlers which output an XML document that can be sent to Company B as an invoice. The invoice should contain the total price of the products, but otherwise you can choose freely the content of the document.

    P.S. You can find some general information about the application area on the web page: Web Services Architecture Usage Scenarios, Section 3.2 EDI-like purchasing.

  3. Modify the Part 3:

    • Assume that the price information is not included in the order that comes from Company B, but the prices are stored in a separate XML document (like in Exercise 4.2).

    • Modify your SAX handlers accordingly.

  4. Assume like in Part 4 that you have the prices (and maybe some general product information) in one file, and the purchase order information from Company B in another file.

    • Give an XQuery query that produces a similar invoice document as you did in Part 3 (and 4).

    • Give a few other queries that extract information from your files based on different criteria.

    What do you think: how much negotiation and preparation was needed between Company A and Company B before they could start doing business together? What may happen, if the products etc. change?

Report

Prepare a short report including the solutions for the Parts 1-5 in HTML. You should justify and comment your solutions/decisions, but no extensive general descriptions or implementation of the system (as a whole) are needed. The deadline is 14.3. at midnight (24:00). Submission instructions (= how to tell us your URL) appear here soon.

Submission procedure

You should return your HTML report by Fri 14.3. by submitting the URL of the page. There is a form for that available.



Helena.Ahonen-Myka