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

  Define database systems and data warehouses

Describe how that firms likely use or should use Management Information Systems, Information Systems and Information Technology as it relates to the various topics covered in the class.

  Provide an entity relationship model

Provide an Entity Relationship Model (ERM) that will describe the data structure that will store all data elements.Note:The graphically depicted solution is not included in the required page length.

  Write a query or queries to print the table description

Suppose you have a small retail store and decide to create a database to track sales. You have information about recent sales that you want to use for testing the database. Write a query or queries to print the table description and the contents o..

  Use an entity relationship diagram to define the structure

Use an entity relationship diagram to define the structure of the system.

  Analysis of data modeling and database design

Analysis of Data Modeling and Database Design -As part of this exercise, you have been approached to investigate the possible data model designs for a new MIS (Management Information System) and produce a written report

  What specific data about the entities will need to be stored

The local library wants to update its book check process. To do this, the system will need to record data about what entities? What specific data about the entities will need to be stored

  Write up a list of entities tables for your project idea

Write up a list of entities "tables" for your project idea.

  Create the underlying database for a new point of sale

Your team has been asked by a small retail client, SmallMart, to create the underlying database for a new point of sale (POS) system.

  Append the last two lines of each file to the file

Find the differences between the two files and append the result to the file called "scales".out (Hint: diff command can do this)

  Object oriented approach versus the relational one

Is the relational database model doomed to extinction or are there characteristics of the relational model which make it better suited in certain situations than its object oriented counterpart? Discuss, and support your explanations with your own..

  Create a database for flying high travel services

When a FHTS customer wishes to book business flights with accommodation, it is always done by the respective employees of that Australian company, who book online. This model is used to reduce administration costs.

  Start the application to view the records

Start the application to view the records contained in the dataset, and then stop the application.

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