Create an internal dtd for the xml document

Assignment Help Database Management System
Reference no: EM131333770

Exercise 1 - HTML and XML

ID

Name

Stars

Facilities

Address

Distance from

center (KM)

Available

1

Les Jardins du Marais

3

Internet

74 rue Amelot, Paris, 75011

2

True

2

Golden Tulip Little Palace

4

Internet Gym

Parking Restaurant

4 rue Salomon De Caus, Paris, 75003

0.1

False

3

Tilsitt Etoile

2

Restaurant

23 rue Brey, Paris, 75017

3

False

4

Hotel Saint Charles

3

Parking

6 rue de I'Esperance, Paris, 75013

1

True

Encode the hotel table in

(1) an HTML document

(2) a well-formed XML document

Exercise 2 - DTD

(1) Create an internal DTD for the XML document above, write the whole XML document

(2) Create an external DTD for the XML document above, write the whole XML document by linking the external DTD to the XML document

Exercise 3 - XML Schema

Create an XML Schema for the above XML document, write the valid instance xml file according to this XML Schema

For Exercise 2 and 3, please consider the following facts:
- Stars is ranging from 1 to 5

- Facilities can have at least one or more of the followings: Internet, Gym, Parking, Restaurant, Pick-up;

- Distance can be empty or have one value

- Available can be either true or false.

Exercise 4 - XPath/XQuery

For the above XML document, Please write the following queries in XPath or XQuery:

(1) Select all the elements in the document

(2) Select all the hotels

(3) Select the facilities of the first before last hotel of the document

(4) Select the ID of the hotel "Tilsitt Etoile"

(5) Select all the hotels for which the distance from center is given

(6) Select the name, address and stars of the last 3 hotels

(7) Select the name and ID of the hotels with a rating higher or equal than 3

(8) Select the name of the hotels that have in a range of 1.5 KM from the center

(9) Select all the hotel names

Exercise 5 - XSLT

Taking the XML document you generated for Exercise 1, provide XSLT style sheets that:

(1) One XLST style sheet which gene rates a HTML document listing the information on a tabular form.

(2) One XLST style sheet which generates a HTML document listing the same information on a tabular form with entries sorted by name.

(3) One XLST style sheet which generates a HTML document listing the same information not on a tabular form with the names and IDs displayed in bold

Bonus: The Word Guesser

You'll create a simple word guessing game where the user gets infinite tries to guess the word (like Hangman without the hangman, or like Wheel of Fortune without the wheel and fortune).

Create two global arrays: one to hold the letters of the word (e.g. 'F', 'O', 'X'), and one to hold the current guessed letters (e.g. it would start with '_', '_', '_' and end with 'F', 'O', 'X').

Write a function called guessLetter that will:

- Take one argument, the guessed letter.

- Iterate through the word letters and see if the guessed letter is in there.

- If the guessed letter matches a word letter, changed the guessed letters array to reflect that.

- When it's done iterating, it should log the current guessed letters ('F__')

- and congratulate the user if they found a new letter.

- It should also figure out if there are any more letters that need to be guessed,

- and if not, it should congratulate the user for winning the game.

Pretend you don't know the word, and call guessLetter multiple times with various letters to check that your program works.

Bonus: Make it more like Wheel of Fortune:

- Start with a reward amount of $0

- Every time a letter is guessed, generate a random amount and reward the user if they found a letter (multiplying the reward if multiple letters found), otherwise subtract from their reward.

- When they guess the word, log their final reward amount.

Bonus: Make it like Hangman:

- Keep track of all the guessed letters (right and wrong) and only let the user guess a letter once. If they guess a letter twice, do nothing.

- Keep track of the state of the hangman as a number (starting at 0), and subtract or add to that number every time they make a wrong guess.

- Once the number reaches 6 (a reasonable number of body parts for a hangman), inform the user that they lost and show a hangman on the log.

Reference no: EM131333770

Questions Cloud

Describe the four habits in establishing self-control : Please describe the four habits in establishing self-control. Which habit do you feel is the most effective? Why do you feel that way? Which habit do you feel is least effective? Why
Next annual dividend : Zellar’s, Inc. has announced that that their next annual dividend has been set at $3.50 per share. Also, the company announced that all future dividends will increase by 5.5 percent annually. What is the maximum amount you should pay to purchase a sh..
What is an administrative agency : What is an administrative agency? What id the purpose of an administrative agency? Discuss the steps in agency rulemaking and describe how rules are adopted. What are the executive functions of an administrative agency? Explain the judicial powers..
Potential of a mutation saving a species facing extinction : Microevolution is in some ways random, while in other ways it is not. Explain what does this mean in regards to the potential of a mutation saving a species facing extinction?
Create an internal dtd for the xml document : Create an internal DTD for the XML document above, write the whole XML document - Create an external DTD for the XML document above, write the whole XML document by linking the external DTD to the XML document
What factors determine a companys choice between cash method : What factors determine a company's choice between the cash method and the accrual method in accounting for income taxes? Give an example of a particular transaction and describe how the two methods would account for that transaction differently.
Distinguish between zero-match and partial-match recovery st : Give your suggestion on: By using an extra table that stored space positions it would be possible to significantly improve the efficiency of the expansions loop.
Analysis of the type of treatment for juveniles : Even when they are placed in juvenile institutions, they are often in "lock down" conditions and solitary confinement. Juvenile advocates reject this type of treatment. What is your analysis of the type of treatment for juveniles
Effect of exercise on cells : In the video on the effect of exere on cells, it was pointed out that people who exercised regularly had younger cells. The researchers looked for a marker in volunteer's blood. They found "strands" and surmised that, "the longer these strands, th..

Reviews

Write a Review

Database Management System Questions & Answers

  Construct a query that can be used on a report

Construct a query that can be used on a report for determining how many days the customer's invoice will require payment if total amount due is within 45 days. Provide a copy of your working code as part of the paper.

  Assignment of database design

Create a data dictionary that includes the following: a. A description of the content for each field b. The data type of each field ac. The format the data will be stored as in the field d. The range of value for the field e. A label, as required, i..

  Create a row function and explain its purpose

Create a row function and explain its purpose. Create some summarizing data and explain its purpose.

  Design and implement the best deal business database

Design and implement the Best Deal business database that you have modelled in the assignment-1 and a series of SQL queries to reflect the business logic of the Best Deal.

  How organizations can use data warehouses and data marts

Write a one- to two-page (250-500 word) paper that discusses the differences between data warehouses and data marts. Also, discuss how organizations can use data warehouses and data marts to acquire data.

  Determine impacts on revenue resulting

If you need to determine impacts on revenue resulting from an increase or decrease in prices and/or sales, the best option to use is a

  Implementation of information gathering component

Based on the pseudocode developed in Subtask 1.1, you are to implement the Information Gathering Component in this task.

  Design a database to track the company products

Design a database to track the company's products and orders. Choose either an open-source product or a proprietary product to use, and explain your reasons for choosing it. Identify some of the characteristics of database configuration used in yo..

  Discuss the issues the project manager must consider

Discuss the issues the project manager must consider when assigning programming tasks to programmers.

  Explain the different oracle data dictionary views

Explain the different Oracle data dictionary views

  How much overhead cost would be assigned to product

How much overhead cost would be assigned to Product U94W using the activity-based costing system - How much overhead cost would be assigned to Product K91B using the activity-based costing system

  What data entities and data attributes are contained

What data entities and data attributes are contained in each database? - What database management system did each company select to implement their database and why?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd