The primary objective of this assignment is to create an XML schema and stylesheets.
In first part of this assignment, you will create an XML schema for a hypothetical document structure. In the second part, you will use the documents you prepared in the first assginment and create stylesheets to provide layout to the documents.
Create an XML schema for a hypothetical XML schema for movies. For the purpose of simplicity, we are going to define a few "business rules" for movies that you should follow, even if they may sound a little too restricting.
Important: Create an XML schema implementing the above business rules.
Call this file movie.xsd. Then create a sample XML document using this
xsd, to ensure that your movies are valid. In this XML document (call it movies.xml)
and include at least 3 movies with some variations in structure.
Remember the XML documents you created for the e-business catalog for the last assignment? In this assignment you will provide layout to them using XSLT. As we discussed last time, you had put together data from two pages into one XML document. Now is the time to split them and show only specific items from your XML in the pages.
You are going to create TWO XSL stylesheets - one to generate the "list" page,
and the other to generate the details page. Lets call the the "list stylesheet" (put it in
itemlist.xsl) and the "detail stylesheet" (put it in itemdetail.xsl).
items-list.xml. Remember
that all the items in the list can be clicked to go to their detail page?
Produce links to a page called items-detail.xml.
items-detail.xml.
Remember that the xml document would have all the items, it is your xsl that
should select the first item from your favorite category. Once again, create
the layout that you saw in your catalog page for the detailed version of the
items, ignoring any navigation bars, active content such as Javascript etc.
If the detail page included a form for ordering the item you must generate
that form as well, although obviously the form will be non-functional at this
point. Note that although ideally this stylesheet should show only the item
that you click on from the list page, XML and XSL do not use HTTP parameters,
so there isn't a very good way to transfer parameters from one XML/XSL to
another. In class we will discuss an alternative with only one XSL that would
mimic this option, and you may try it in the assignment, but that is not a
requirement for the assignment.
Remember the two special tags you created in your first assignment? Well it is now time to give layout to those as well.
<source> - this tag should generate a disclaimer at the
top of your xsl-generated page saying "The data in this page are reproduced
verbatim from [the content of your source tag here] for the purpose of a class
exercise, with no intention of use of such data for any business intention.
<declaration> - The declaration should show up at the
bottom of your xsl-generated pages, centered and italicized, after a horizontal
rule, as follows:
I have neither given nor received unauthorized aid on this deliverable.
Before you are ready to submit, MAKE SURE YOU HAVE YOUR NAME and last 4 digits of your ID# on the top of every file (of course, you will need to put them inside comments. You will need to submit the following (follow the naming conventions exactly, otherwise you will not get the credit):
movie.xsd: The movie schema.
movies.xml: The sample movie file that validates with the xsd.
itemlist.xsl: The list xsl.
itemdetail.xsl: The detail xsl.
items-list.xml: The xml document pointing to the list xsl.
items-detail.xml: The xml document pointing to the detail xsl.
To submit your assignment, follow the steps below:
This assignment is an individual assignment. You are to work on this assignment solely by yourself with no direct help from any other student in the class or outside. You are welcome to post your questions or doubts on the course discussion forums (on Oncourse) as long as that does not involve posting part of whole of your solution. You can email me your questions if you need someone to look at your code. You can ask a fellow student for small help such as help with fixing a parse error, or a doubt about a statement in the assignment. However, the following will be considered violation of the individual policy and you will be penalized if you violate this policy: