Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask E-Commerce Expert

XML Authoring Assignment

Lisa asks you to design another style sheet for her. Many of her clients are not looking for a house in a particular geographic area as much as they are looking for one of a particular style. She wants you to create a new style sheet based on her property data that groups the property report by housing style. She has already created the style sheet for the property report, but she needs your help in grouping the properties.

The property report should also contain information on the real estate agencies and agents handling the properties. Since working on her last project, Lisa has placed all of this information within a single file.You have to extract information from this second source document to complete the report.

1. Using your editor, open homestxt.xml and homestxt.xsl files. Enter your name and the date in the comment section of each ?le, and save them as homes.xml and homes.xsl , respectively.

2. Go to the homes.xml ?le in your editor. Add a processing instruction after the comment section that attaches the homes.xsl style sheet to the document. Close the file, saving your changes.

3. Go to the homes.xsl ?le in your editor, and review the content of the style sheet and the different templates it contains. At the top of the ?le, directly below the opening tag, do the following:

a. Create a variable named agencies that selects the agencies.xml file.

b. Create a key named agentID that matches the agent element, using values of the agentNum attribute to generate the key index.

c. Create a key named ?rmID that matches the ?rm element, using values of the ?rmNum attribute to generate the key index.

d. Create a key named houseStyles that matches the property element, using values of the style element to generate the key index.

4. At the bottom of the style sheet, insert a template with a mode value of styleList that matches the property element. The purpose of this template is to create a list of the different housing styles associated with the properties in the style.xml document. Have the template write the following code:

style (count) |

where id is an ID value generated automatically by the XSLT processor using the generate-id() function, style is the value of the style element, and count is the number of properties that contain that style. ( Hint : Use the key() function and the houseStyles key to retrieve the node set of properties belonging to a particular style, and use the count() function to calculate the number of properties in that node set.)

5. Go to the root template. Within the style_list section after the | character, apply a template of the styleList mode to the step pattern: "listings/property[not(style=preceding::property/style)]" in order to display a list of unique housing styles. Sort the application of the template by order of the style element.

6 Directly below the closing tag in the root template, insert a for-each element using the Muenchian grouping with the location path "//property[generate-id()=generate-id(key(‘houseStyles', style)[1])]" for the select attribute in order to select each housing style. Within the for-each element, add

a. Sort the output by values of the style element.
b. For each unique housing style, write the following code to the result document:

style

where id is an ID value generated automatically by the XSLT processor using the generate-id() function and style is the value of the style element.c. Apply a template for each property belonging to the selected housing style. ( Hint : Use the key() function with the houseStyles key and the value of the style element.) Sort the applied template by the sqfeet element in descending order.

7. Go to the property template. The purpose of this template is to write the HTML code for a web table describing each property. Most of the contents of the table have already been created for you. Your task is to insert the ?rm and agent data into the table in the appropriate cells. Within the table cell following the comment "Place information about the firm here", add the following styles to display information about the listing ?rm in the result document:

a. Declare a variable named fID , containing the value of the ?rm attribute
b. Insert a for-each element, selecting the value of the agencies variable to change the context node to the agencies.xml file.
c. Within the for-each element, write the following ?rm contact information:

name
street
city, state   zip

phone
web

where name , street , city , state , zip , phone , and web are the values of the name, street, city, state, zip, phone, and web elements for the selected firm in the agencies.xml file. ( Hint : Use the key() function with the firmID key and the value of the fID variable to select the appropriate firm element from the agencies.xml file.)

8. Scroll down the web table and, within the table cell directly after the comment "Place information about the agent here", add the following styles:

a. Declare a variable named aID , selecting the value of the agent attribute.

b. Insert a for-each element, selecting the value of the agencies variable in order to change the context node to the agencies.xml file.

Within the for-each element, write the following code to the result document: name
name

phone

email

where name , phone , and email are the values of the name, phone, and email elements for the selected agent in the agencies.xml file.

9. Save your changes to the homes.xsl file.

10. Use your web browser or your XSLT processor to generate the result document. Verify that the property report displays each property grouped by housing style, that the list of housing styles includes a count of the number of each property within each style, that links within the style list jump the browser to the appropriate style section in the report, and that the agent and ?rm data are correctly retrieved from the agencies.xml file.

Attachment:- Attachments.rar

E-Commerce, Computer Science

  • Category:- E-Commerce
  • Reference No.:- M92349924

Have any Question?


Related Questions in E-Commerce

Mobile web application development assignment - android

Mobile Web Application Development Assignment - Android Apps Development Purpose of the assessment - Students are required to design and develop four different Apps. Apply Java programming concepts, models/architectures ...

Mobile applications assignment - an ios recipe application

Mobile Applications Assignment - An iOS Recipe Application - Introduction - In this assignment, you will create a simple Recipe application for iOS using Xcode (Swift). This application allows users to view food recipes. ...

Overviewassignment 2 asked you to build the front end of

Overview Assignment 2 asked you to build the front end of the assignment, now the client wants you to build the full eCommerce website to the point that orders can be made and stored in a spreadsheet. Requirements 1. Web ...

Purpose of the assessment with ulo mapping students are

Purpose of the assessment (with ULO Mapping) Students are required to design and develop four different Apps. Students will be able to: b. Apply Java programming concepts, models/architectures and patterns to Android app ...

Assignment requirementsyour web site proposal and

Assignment Requirements Your web site proposal and presentation (Assignment 1) was accepted, subject to any feedback you may have received. You company has been asked to develop website you suggested and build the featur ...

Secure electronic commerce assignment -part a -based on

Secure Electronic Commerce Assignment - Part A - Based on your practices in labs, develop an online e-commerce (shopping) system using html, javascript and php. You can assume any products for sales. Please create a fold ...

Create testcase for given project first use piki design to

Create testcase for given project, first use piki design to do test case Want to do it like testcase one file and you can also get right information from saeed testcases Want to piki design all of it and informat like te ...

Html - css assignments assignment 1 - internet programming

HTML - CSS Assignments Assignment 1 - Internet Programming   My grandfather, like many men who lived in rural America, owned a large machine shed where he stored tools, farm equipment, vehicles, lumber, and wonderful gad ...

Research and discuss html 5what are its main featureswhat

Research and discuss HTML 5. What are its main features? What resources are available to support it? Put it in your own words please.

Assignment - creating dynamic websites and web-based

Assignment - CREATING DYNAMIC WEBSITES AND WEB-BASED APPLICATIONS - AN OVERVIEW This assignment is an overview of the concepts, technologies and design techniques required to build dynamic websites and web-based applicat ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As