1. Correct the errors if any to make the document as Well formed. (Save it as rentals.xml). You can download the files (house1.jpg, house2.jpg, house3.jpg) from test_partb dropbox folder.

< ?xml version="1.0"?>
< Rentals>
< Rental MLSNo ="A001">
< Details>Single Home & Well Maintained< /Dtails>
< Image fileref=='house1.jpg"=>
< Built>1985< /Built<
< Agent>John King < agent/>
< Rental>
< Rental MLSNo ="A002">
< Detail>Semi-Detached & Poorly Designed< /Details>
< Image fileref=[house2.jpg'>
< Built>1990< < built>
< CostPrice>20,500.00< CstPrice/>
< /Rental>
< Rental MLSNo ="A003">
< Details>Bungalow & Well Spaced< /Detail>
< Image filref=='house3.jpg'>>
< Built>1987< < Built>
< Agent>Peter Paul < |agent>
< /Rental>
< Rentals>

(a)Correct the errors and verify whether it is well-formed (i.e.) there shuould not be any errors and able to display in the browser. (Paste the browser output in the solution document.)

(b)Modify the rentals.xml document to add the following child elements and attributes to each of the Rental element (not Rentals element) with meaningful data:

  • Owner_Details
    • Owner Name, Address, Phone, Email - all as child elements where Email appears 1 or more times, Phone appears 0 or 1 time.
  • Rental_Details which can appear 0 or more times.
    • Tenant name (first name and last name - both as attributes)
    • Tenant Phone (cell and home -> both as child elements, where cell is optional 0 to 1)
    • Rent Amount
    • Contract date (FromDate and ToDate as attributes)
    • Add a child element of your own which will be 0 to many
  • Remarks as child element
  • Save it as rentals_new.xml. Paste the output of the xml document as seen in the browser in the solution document.

(c)Create the DTD (rentals_new.dtd) based on rentals_new.xml to make a valid document. (i.e.) Modify the rentals_new.xml to add DOCTYPE to validate the XML file with DTD. Paste the Validation Screen in the solution document.

(d)Write an xsl document (rentals_new.xsl) based on rentals_new.xml to display. The sample format is given below:

Property Details (MLS No)
Picture (display the actual image and not the filename)
Cost Price
Agent
Built
  • Owner Details
Name :
Address :
Phone :
Email(s) : one after another if multiple emails are used
  • Rental details see image.
  • Sort the data by the Year built
  • Repeat for each MLS Rental property and display page by page
  • Your full name must appear at the beginning of the output in bold face and Italic
  • Use CSS to style the output
  • Paste the browser output in the solution document
Academic Honesty!
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.