Rent-a-Car is a small family owned company that rents out cars, mainly to holiday makers. As Australia is a such a vast country it is often necessary to fly to holiday destinations, but families and holiday groups still often wish to have a vehicle available during their holiday. It is this market "Family Rent-a-Car is aiming their business at.
You have been hired by Rent-a-Car to produce an XML based trial solution for their customer record and rental record system. The system is to be used by Rent-a-Car's staff only. The first stage of this system involves the creation of data storage and the construction of Rental booking display for past, current and future bookings. For this you have been given some old samples of how the data was stored in excel files. These excel files allowed inconsistent entry of the data, and it was sometimes hard to quickly find particular pieces of data. All customers are assigned a customer number. A customer can book car to rent for some date in the future. The charge per day is dependent on how long the car is being rented, and what type of car it is. Sometimes the company has special deals on, however management of special campaign and pricing is not part of this trial.
The project will require one xml file for customer records (customers.xml), one xml file containing vehicle information (vehicles.xml) and one xml file that hold the rental information for each rental booking made (rentalRecords.xml). The contents of each of these files will be discussed later in this document. Each of the xml files will be linked to a W3C XML Schema file (customers.xsd, vehicles.xsd and rentalRecrods.xsd) that will describe the allowable structure and content for the XML files. The content and business rules for these schema files will be discussed in more detail later in this document. For this first stage of the project you will be required to create a rentals page that will display past, current and future rentals. This will be done by linking the rentalRecords.xml to an xslt file (rentals.xsl). The structure for displaying the rentals will be discussed in more detail later in this document
You are expected to write code that is easy to read and for the viewer to quickly get an understanding of what has been done. This includes:
customers.xml
This file must be linked to customers.xsd (described later).
The customers.xml file will contain customer records. Each customer record contains:
No other information is to be stored in this file.
vehicles.xml
This file must be linked to vehicles.xsd (described later).
The vehicles.xml file will contain details of the rental vehicles the company owns. Each vehicle record must contain:
No other information is to be stored in this file.
rentalRecords.xml
This file must be linked to rentalRecords.xsd (described later) and rentals.xsl (described later).
The rentalRecords.xml file will contain car rental bookings that have been made, as well as past car rental records. Each record contains:
No other information is to be stored in this file.
You must demonstrate the use of attributes in all three (3) xml files.
NOTE: the sample data for customers, vehicles, and rental records (provided in a separate document) must be present in the XML files for marking purposes. No other data should be stored in the xml files, except for customer email address which needs to be added.
Dates: you can decide on the format of the dates. Either use the built-in date data type, or create your own custom data type. The date format does not need to be in the same format as the sample data.
3 W3C Schema files:
The Schema files will specify the allowable structure, allowable values, restrictions and so on for the xml files. Each .xml file must have a link to the appropriate .xsd file for proper validation. Use this as an opportunity to demonstrate your skills in using the various schema concepts discussed in lecture and in the textbook. In addition, make sure all business rules (listed later in this document) are implemented. There will be additional rules that you are expected to implement in your schemas. These will be evident from the data that is to be stored. For example, post code should be 4 digits only, states/territories are from a limited pre-defined list, and so on. Some of these will depend on the design of your xml files. It is expected that you critically review the content that your xml files should contain, the structure you have created in your xml, and implement suitable constraints within your schema files. You are required to demonstrate that you can create and use user defined data types, as well as using ref.
Your schemas should not be the 'Russian doll' style.
1 XSLT file: (rentals.xsl)
This will generate rental records as described in the "Rentals" section below, producing and displaying a record for each rental present in the rentalRecords.xml file. The rentals.xsl must get the correct customer information from the customers.xml file and the correct vehicle information from the vehicles.xml for each rental record listed. You will need to use the document() function to access data from customers.xml and vehicles.xml, and you will need to use the customer number and rego for each record in the rentalRecords.xml file to locate the correct customer and vehicle details in the respective xml files.
All data displayed must be generated from the content in the XML files, making calculations where necessary. You are expected to demonstrate understanding and skills in XPath and XSLT, including the use of templates and apply-templates instructions.
1 HTML page: (default.htm)
The default page will be the entry point to the system and will provide a menu of available functions as described in the "Expected Functionality and Implementation" section below.
The user will be presented with a web based user interface (default.htm) displaying the available menu items for the Rent-a-Car application:
Default page:
The design of the default page is left open to your decision; however, the design must be appropriate for the users and the application's intended use and must have a professional look and feel.
View Rental Records:
If a user selects "View Rental Records" from the menu, they should be presented with the result of the transformation created by linking rentalRecords.xml to rentals.xsl; this should create a display of first all current and future rentals, and second all past rentals.
The records should be displayed in order of when the rental car was/is being picked up. Each record should show the rental record number, customer details (customer number, name, address, email and phone number(s). The details and cost of the booking must be displayed, including the date the booking was made, when the booking is for (date of pick up), how many days the booking is for, the charge per day, total charge, and in the case of when a fuel charge is made, this must be noted and added to the total. The car rego, make and model and year must also be displayed.
How you design the layout of the display of this information is open to your decision, however the design must be appropriate for the users and the application's intended use, and must have a professional look and feel.
There must be a navigation link back to the default.htm page.
You may use a CSS framework, such a Bootstrap, to help with designing, but you may not use a template or theme of any kind. This means all code must be your own work, and that you have only applied a CSS framework to help with the look of 'your' design.
Customers:
Customer Number | Name | Address | Drivers licence | Phone | Nominated Driver Name | drivers licence | Address | Phone |
BL343456 | Bart Simpson | 45 Olive dr. Sydney 2000, NSW | 1234AB | 0298576433 0413335678 0296784455 | Marge Simpson | 6789U | 45 Olive dr. Sydney 2000, NSW | 0453876590 |
Homer Simpson | 7890KL | 45 Olive dr. Sydney 2000, NSW | 0453876577 | |||||
TR567903 | Donald Duck | 12 Grey place Sometown 9876, NSW | 3456CD | 0432226677 | ||||
VL305888 | Ms Minni Mouse | 368 King st, Bankstown, NSW 2200 | 4567EF | 0445566543 0688763344 | Bugs Bunny | 4444AB | 36 Northon street, Cooma 2630 NSW | 0483339999 |
AG123456 | Mr Michael Theodore Mouse | 56 Rock road, Marrickville, NSW 2204 | 5678GH | 0411234444 |
Vehicles:
Rego | Make | Model | Year | Description | Current Odometer reading (km) |
ABC123 | Toyota | Tarago Gli | 2018 | Auto, 8 seat people mover | 32716 |
XYZ987 | Toyota | Corolla Ascent | 2014 | Manual, Hatch back | 97500 |
BBB33 | Holden | Commodore | 2019 | Auto, Hatch | 11593 |
DWR654 | Ford | Escape | 2017 | Auto, SUV | 56000 |
Rentals:
Rental record # | Customer number | Rego number | Date of booking made | Pick-up date | # days | charge per day | Fuel tank full on return? | Fuel charge |
4698 | BL343456 | DWR654 | 10/10/20 | 9/12/20 | 6 | 85.00 | no | 45 |
4732 | TR567903 | ABC123 | 24/11/20 | 1/1/21 | 4 | 80.00 | yes | |
4825 | VL305888 | XYZ987 | 10/5/21 | 15/5/21 | 8 | 48.00 | yes | |
4920 | AG123456 | XYZ987 | 20/8/21 | 21/9/21 | 30 | 37.00 | ||
4973 | BL343456 | BBB333 | 23/8/21 | 12/12/21 | 10 | 60.00 |