You are on page 1of 4

COMP3322/CSIS0322 Modern Technologies on World Wide Web

Assignment 2 (9%)
[Learning Outcomes 2, 3]
Due by: 23:59, Tuesday March 10 2015
Overview
In this assignment you are going to develop your professional Curriculum Vitae (CV)
in XML. Through this assignment we will practice the use of XML, XSD, XSL, HTML,
and CSS.

Part I. Complete an XSD schema for your CV (35 marks)


Create a W3C XML Schema file myCV.xsd, according to the following requirements:
1. Root element should be <CurriculumVitae>. (2 marks)
2. <CurriculumVitae> should have the following 6 child elements as in the
following order.
i. <PersonalInformation> (1 mark)
ii. <EducationBackground> (3 marks)
iii. <ITSkills>

(3 marks)

iv. <LanguageSkills>

(3 marks)

v. Add another element with type defined by <simpleType>.

(4 marks)

vi. Add another element with type defined by <complexType>. (4 marks)


3. <PersonalInformation> should have 4 child elements appearing in the
following order.
i. <Name> (exactly one Name) (6 marks)
ii. <Email> (at least one email address and at most 3 email addresses are
allowed)
(3 marks)
iii. <Photo> (exactly one photo) (3 marks)
iv. <Gender> (exactly one gender) (3 marks)

4. <Name> should have the following 3 child elements, which can appear in
any order.
i. <FirstName>
ii. <MiddleName>
iii. <LastName>
5. <FirstName> contains the first name, with the type of xs:string.
6. <MiddleName> contains the middle name, with the type of xs:string,
this is an optional element.
7. <LastName> contains the last name, with the type of xs:string.
8. <Email> contains the email address, with the type of xs:string.
9. <Photo> contains text in URL format (use the type xs:anyURI).

10.<Gender> contains text in string format, with more restrictions: either


Male or Female.

Part II. Develop your CV in XML format (15 marks)


Given the XML Schema myCV.xsd created in Part I, create your own CV file myCV.xml
in XML format. The file should be both well-formed and valid according to the
schema definition in myCV.xsd. Take this as a chance to organize an online CV that
you may wish to use in your own website.
(1. If your xml is not well-formed, 5 marks will be deducted.)
(2. If you miss one required element, 5 marks will be deducted.)

Part III. Create an XSL file that transforms your CV to HTML (35 marks)
Create myCV.xsl that transforms myCV.xml to an HTML page. Please note the
following requirements:
1. The transformed HTML page should contain 3 divisions (i.e., <div>):
Header
Content
Footer
(5 marks for implementing Header, Content and Footer divisions.)
2. In the Content division:

a. There should be 6 divisions with respect to the 6 child elements of


<CurriculumVitae> in myCV.xml. (6 marks: 1 mark for implementing
each of the 6 divisions.)
b. In each division, the corresponding data in myCV.xml should be
displayed in the transformed HTML. The data should be properly
presented using HTML elements:
Use at least one list element (ordered or unordered) ( 4 marks)
Use at least one paragraph element (4 marks)
Use at least one heading element (4 marks)
Use at least one image element (4 marks)
Use at least one table element (4 marks)
2. State the last-update date in the Footer division (4 marks)

Note: You do not need to submit the generated myCV.html to us. We will use
Google Chrome to open your myCV.xml to inspect your transformation.
(Therefore you need to add some codes into myCV.xml to link it with myCV.xsl).

Part IV. Create CSS to style the HTML page (15 marks)
Create myCV.css that styles the transformed HTML page. Please note the
following requirements:
1. Modify your myCV.xsl to link the generated HTML code with the CSS file. (2
marks)
2. In myCV.css, use CSS to display a background image in the Header division (2
marks)
3. Include at least one selector to style at least one list (paragraph, heading
image, table) element in the Content division, i.e., at least 5 selectors to style
the Content division. (10 marks: 2 marks for styling each of the 5 elements)
4. Use CSS to style the text in the Footer division (1 mark)

Submission
You should submit your files (myCV.xsd, myCV.xml, myCV.xsl, myCV.css, images, etc.)

in a file yourCSID_assignment2.zip on Moodle by following the steps below.


(Please make sure your .zip file is no larger than 10 MB.)
(1) Login Moodle.
(2) Find Assignments in the left column and click Assignment 2.
(3) Click Add submission, browse your .zip file and save it. Done. You will receive an
automatic confirmation email, if the submission was successful.
(4) You can Edit submission to your already submitted file, but ONLY before the deadline.

You might also like