ICT336 title
Murdoch University logo

Assignment 2


Part I: Basic XML Solutions (75%)

Below are descriptions of two IT jobs:

  1. IT Web Developer
  2. IT Project Manager, Team Leader

[Note: The details in (i) and (ii) are selectively extracted from the Commonwealth Department of Employment and Workplace Relations' JobSearch web site. For the complete descriptions, refer to the web site.]

The restrictions on the data is linked here.

Your task is to create XML solutions to allow information on jobs to be accessed and maintained. Your need to do the following:

  1. Design a DTD for a new XML application called Job Description Markup Language (JDML) appropriate to capture the one (and only one) job description. Put the DTD into a file named job.dtd.

  2. Create XML documents WebDev.jdml and ProjManager.jdml that can be validated against job.dtd and contains all information from (i) and (ii) above.

  3. Design an XML Schema for JDML. Put the Schema into a document called job.xsd. The Schema should contain at least what is specified in job.dtd. Use the facilities available in Schemas to make the definition of JDML better than the DTD version. However, you must ensure that the documents created in (2) are still valid for the Schema, without needing to make any changes except the references to the DTD.

    Document the differences between your Schema and your DTD.

  4. Create XSLT style-sheets as required below:

    1. Create an XSLT style-sheet basicinfo.xsl to extract the Occupational Category, Broad Occupation and the Occupation name from a JDML document. The result should be plain text in the following format:

      Occupational Category: <text>
      Broad Occupation: <text>
      Occupation: <text>


      where <text> are the appropriate values from the JDML document.

    2. Create an XSLT style-sheet requiredskills.xsl to extract the details of skills required for the job description covered in a JDML document. The result should be plain text, one line for each skill. Each line should be in the following format:

      <skill name> (<skill description>), rating: <level>.

      The following is an example of the first two lines of the required output from WebDev.jdml:

      Operations Anaysis (Analysing needs and product requirements to create a design), rating: 8.
      Mathematics (Using mathematics to solve problems), rating: 8.
      ...


      If details of skills are not available in the document, then the result should be blank. There should not be error messages of any kind.

    3. Create an XSLT style-sheet availabledetails.xsl to extract the titles of "Details" (but not "Lists") that are available from the JDML document. The result should be plain text, one title to a line.

      The following is an example of the required output from WebDev.jdml and ProjManager.jdml:

      Skills
      Knowledge Areas
      Abilities
      Interests
      Job Environment
      Work Values
      Activities


      If no details are available in the document, then the result should be blank. There should not be error messages of any kind.

    4. Create an XSLT style-sheet jdml2html.xsl to convert the information in a JDML document into HTML. The result HTML documents should be structurally the same as the HTML pages in (i) and (ii) above.

  5. Create Perl scripts as required below:

    1. Create a script searchtasks.pl that accepts a JDML document name as its first parameter and a search string as a second parameter. The script must return all "Tasks" containing the search string found in the JDML document . The result should be plain text, one task per line, with no other text before or after the lines.

    2. Create a script deletedetails.pl that accepts a JDML document name as its first parameter and a string as a second parameter. The script should delete all entries of Details and Lists that contains the given string, and print the resulting JDML document on standard output.

      Eg. in Web Developer, we have

      Skills Level Description
      Operations Analysis 8 Analysing needs and product requirements to create a design.
      Mathematics 8 Using mathematics to solve problems.

      If the delete string given is "analysis", then the first entry should be deleted but not the second. Note that the string could appear in any one of the three columns/categories. Also note that the whole entry (values in three columns/categories) has to be deleted together.

    3. Create a script recommendjob.pl that analyses people's profiles and come up with an appropriate occupation for the people with those profiles. The script accepts a profile document as it's first parameter. It accepts a directory containing multiple JDML files as it's second parameter. Here is a link to an example profiles document.

      Your script must calculate a Suitability Score for each job for each person. The Suitability Score calculation must make use of as much of the available profiled attributes for a person as possible, as well as as much of the information in the JDML document as possible. The script must determine a score for EVERY job described by JDML documents in the directory supplied. The script must recommend for each person, the job with the highest Suitability Score. For each person, the script must print the line:

      The best available job for <name> is <occupation>.

      where <name> is the person's name from the profiles, and <occupation> is the occupation name from one of the JDML documents.

      The script must do this for EVERY person in the profiles document. If for a person, the Suitability Score obtained for two jobs are the same, the script may select any one of the jobs at random.

      Please describe in one short paragraph in your documentation outside of your script, how your script calculates the Suitability Score

Part II: Extending XML (10%)

Modify all your solutions in Part I by extending the documents in the following way:

  1. Extend the DTD and Schema from Part I so that it can now support lists and details of any kind, and is not restricted to the job descriptions in (i) and (ii) above.

  2. Modify all your XSLT and Perl scripts in Part I so that it works under this condition:

    The following XML tags may be inserted into your JDML documents, to indicating the current industry shortage of a job:

    <industrystatus>
    <shortage>Critical</shortage>
    </industrystatus>

    This section could be inserted ANYWHERE in your document, subject to XML well-formedness rules. You have no way of knowing where it may appear.

If you complete fully this Part II, you do not need to submit a different set of documents and scripts. All your submitted files should work as normal when being assessed for Part I.

If you only complete partially this Part II, you may submit a different set of files for this Part II, so that all you have done in Part I is not affected when Part I is assessed.

Part III: XML Support in Web Server (10%)

Add XML support to your web server developed in Assignment 1 (or use the original web_serial.pl supplied in the lecture materials). Your web server should do the following:

  1. Assume all resources with file extension .jdml are XML documents and have the MIME-type "text/xml".

  2. If requested resource is a JDML document and contains a reference to an XSLT style-sheet, then pre-process the document and send the result of the XSLT transformation as the response.

Part IV: Learning to Learn (5%)

Read the Learning to Learn document, and complete the information in the two forms:

  1. Plans. (2%)
  2. Evaluation of plans and methods. (3%)

Marks Breakdown

Here is a link to a description of how the marks will be broken down.

Your source code and document details will be assessed. Read the "Source Code" section of this link to guidelines for programming for a description on what to consider when writing code.

You may use and modify the example XML documents and Perl code given in lectures, labs and the textbook, with appropriate acknowledgements in your submission. The code you borrowed from these sources will not be assessed, only the sections you add or modify.

Submission Checklist

Your submission should include the following:

  1. ICT336 Assignment Cover Sheet. All submissions (Internal and External on all campuses) must include this cover sheet. External students must complete this assignment sheet as well as the cover sheet sent to you by the External Studies Office.
  2. A statement of what you have completed - this is essential. Functionalities not stated as completed will not be assessed. Incomplete functionalities misleadingly stated as complete will incur heavy penalities.
  3. Parts I, II & III:
    • Copies of your XML, DTD and Schema documents, style-sheets and perl scripts submitted on floppy disk or CD.
    • Paper print-outs of the source code for your DTDs, Schemas, style-sheets and scripts. Your do not need to submit print-outs of your XML documents.
    • For Part I question 3, a description of the differences between your DTD and your Schema.
    • For Part I question 5c, a short paragraph describing how your script calculates the Suitability Score.
  4. Part IV:
    • A print-out of your plans and evaluation of plans.

Submission Dates

See Study Schedule page.

Learning Objectives:

As with all assignments, this assignment is to assess how well you have achieved the unit's learning objectives. This assignment is principally focused Learning Objectives 1 (understanding technologies), 2 (writing software) and 3 (constructing solutions). Part IV is to assess your progress in Learning Objective 4 (self-learning). To do well in this assignment, you will need to show good performance in these objectives.

Hints

  1. It would be wise to think about Part II while doing Part I. It will make solving Part I harder, but will make your job of completing Part II much easier when you get to it.
  2. For Part II, you will score full marks if ALL your style sheets and scripts works under the Part II conditions. You will score partial marks if some of your style sheets and scripts doesn't work, but you can describe when they do not work under the Part II conditions.
  3. For Part III, question 2, since we do not have a full capacity XSLT perl module installed on gryphon, you may use the perl system() function or qx// string operator to call the "sabcmd" command as given in lab exercises to execute the transformations.

Errata

This page is subject to change based on errors found in the future. Any errors found and corrected will be posted as "Announcements" in the unit's discussion forum. If you print out a copy of this page, please follow the developments in that group for corrections.


Document author: H.L. Hiew, Unit Coordinator
Last Modified: Tuesday, 18-May-2004 08:53:16 MST
Disclaimer & Copyright Notice © 2004 Murdoch University
This document is relevant for semester 1, 2004 only