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

  Create a query using the traditional join method

Using the BOOKS and PUBLISHER tables, create a query using the traditional join method that will return a list containing the book title, publisher contact person, and publisher phone number for all publishers whose publisher name starts with an ‘..

  Select the primary key from the candidate keys

How do you select the primary key from the candidate keys? How do foreign keys relate to candidate keys? Provide examples from either your workplace or class assignments.

  Display full details of all attributes in the author table

Display full details of all the attributes in the AUTHOR table. Display the last name and first name for all the authors in the AUTHOR table and sort all records by last name order ascending.

  Perform horizontal fragmentation

How many numbers of table is requred to perform horizontal fragmentation

  What do you mean by data base scheme

Database Questions:  What do you mean by data base scheme?  What do you mean by cardinality ratio?   What do you mean by degree of relation?

  Using sql, write the view definition for smallcust.

Using your knowledge of Premiere Products, determine the functional dependencies that exist in the following table. After determining the functional dependencies, convert this table to an equivalent collection of tables that are in third normal fo..

  What security tools should be added to minimize risk

Identify the assets to be protected and define and prioritize the threats against those assets - determine its database architecture, and you designed an Assessment and Analysis plan (Phase 1 of the Security Architecture Cycle) for your organizatio..

  Complete development of a relational database

Complete development of a relational database. You are to do the following: Use Visio to create the appropriate diagrams. Create a script named mdbXXX.sql (where XXX are your initials) that Create the tables in 3NF needed to implement your DB schema

  Changes require to make-premiere products database

Point out the changes you require to make to Premiere Products database to support following situation: A customer is not necessarily represented by a single sales rep but can be represented by several reps.

  What is the two-phase locking protocol

What is the two-phase locking protocol and what is the strict two-phase locking protocol? What is the rigorous two-phase locking protocol? What benefit does strict two-phase locking protocol provide? What benefit does rigorous two-phase locking pr..

  Database normalization solution

Database Normalization Solution

  Distinction between total and partial constraints

Fundamentals of Databases (IT403) Explain the distinction between total and partial constraints - Explain the difference between a weak and a strong entity set.

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