1. Extend your XML representation of photos in three ways:
a. The creator of a photo is now more than a name, it's a complex type with three subelements: the name (as before), an optional email and an optional homepage.
b. Photos are getting some more properties: A photo also has
a title which is a string,
a copyright clause which is one of the following strings "All rights reserved", "Public domain", "CC BY", "CC BY-SA", "CC BY-ND", "CC BY-NC", "CC BYNC-SA" or "CC BY-NC-ND"
c. Photos are collected in a gallery element, pretty much like the library in the DVD example.
2. Develop an XML Schema that captures this new structure (15 pt)
3. Create one XML document (gallery.xml) that contains at least three different photos with real URLs. I placed two more photos under the same path as in Micro-Project 1 that you can use, if you don't find any others: shadow.jpg (width 1000, height 677) and lomo.jpg (width and height 478). You are encouraged to use you own digital photos, though.
Do not use photos from the web unless their copyright category is known to be "Public domain" or one of the "Creative Commons" categories! The photos I have provided are all "CC BY-ND".
Make up the data for the other two photos. This file should validate against the schema you created under point 2. (15)
4. Create two variants of gallery.xml that each contain one validation error of your choice these errors must be different. (10 each = 20).
5. Create an XSLT file to display gallery.xml in a browser. (45)
Display the title as a header (5)
Display the image by using an img tag (5)
Display the name of the creator (5)
Display the email, if specified (3)
Use an mail anchor for the email (2) ** hyperlink
Display the home page, if specified (3)
Use an anchor for the home page (2) ** hyperlink
Display the copyright (5)
Display the keywords
all in one line (3) or
an an unordered list (5)
Include a CSS into your display (cf. library.xsl and libhtml.css) (10)
6. Zip the whole NetBeans project together:
3 XML files (gallery.xml and two non-validating variants)
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference
and should not be submitted as is. We are not held liable for any misuse of the solutions.
Please see the frequently asked questions page
for further questions and inquiries.
Kindly complete the form.
Please provide a valid email address and we will get back to you within 24 hours.
Payment is through PayPal, Buy me a Coffee
or Cryptocurrency.
We are a nonprofit organization however we need funds to keep this organization operating
and to be able to complete our research and development projects.