Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Benjamin needs your help with a document that lists some of Map Finds For You's map products. Figure 2-32 shows the tree structure of Benjamin's

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Benjamin needs your help with a document that lists some of Map Finds For You's map products. Figure 2-32 shows the tree structure of Benjamin's XML document. U 0 Figure 2-3:2 Structure of the products product desc isbn The document contains a root element named products with one or more occurrences of the product element containing information on map products. The product element contains five child elements- name, versionDate, desc, an optional isbn, and price. The name element stores the name of the prod- uct and supports two attributes-pid, the ID number of the product; and category, the type of product (historical, state, or parks). The versionDate element also supports an optional surveyDate attribute that indicates the date of the map survey, if known. The desc element stores a description of the product. The optional isbn element stores the ISBN for the product. The price element stores the name of the product and supports two attributes-format, the format of the product (flat or raised) with a default of flat; and media, the media type of the product (paper or electronic). For this document, Benjamin wants to enforce a document structure to ensure that information recorded in the document is valid. Therefore, your task will be to create the DTD for the document. Complete the following: 1. Using your text editor, open the prodtxt.xml file from the xml02 review folder provided with your Data Files, enter your name and today's date in the comment section of the file, and then save the file as products.xml. comment section and before the opening tag. a. The products element, containing at least one occurrence of the child element product 2. In the products.xml file, insert an internal DTD for the root element products directly after the 3. Within the internal DTD, declare the following items: b. The product element, containing five child elements in the sequence name, versionDate, desc, an optional isbn, and price c. The name, versionDate, desc, isbn, and price elements, each containing parsed character data 4. Add the following attribute declarations to the product file: a. For the name element, a required pid attribute as an ID b. For the name element, a required category attribute equal to historical, state, or parks Tutorial 2 Validating Documents with DTDs | XML XML 123 . For the versionDate element, an optional surveyDate attribute containing the date of the survey d. For the price element, an optional format attribute equal to either flat or raised, with a 5. On the same line as the format attribute definition, insert a comment containing the text format 6. Save your changes to the products.xml file, and then use Exchanger XML Editor or another XML . Validate the document. If necessary, correct errors one at a time and revalidate until the default of flat e. For the price element, a required media attribute equal to either paper or electronic default is flat. tool to verify that the document is well formed. document is valid. - John Michael - address> [CDATA 41 West Plankton Avenue Orlando, FL 32820 (407) 555-3476 - - OrderDate > 8/11/2017 - item itemNumber-"WM100PL"> 1 - 2 - kitemPrice saleItem "N" >39.95 kitemPrice saleItem Y" 19.90 - Dean Abernath - address> [CDATA 200 Bear Avenue Front Royal, VA 22630 (540) 555-1788 - - OrderDate> 8/1/2017 - 1 + - itemPrice > 29.95 - - - item Price saleltem-"Y"> 24.90- 2 - kitemPrice saleItem "N"14.95 1 - Riverfront High School - address> [CDATA 1950 West Magnolia Drive River Falls, WI 54022 (715) 555-4022 - - Orde rDate> 9/15/20 17 - - 78.90 2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Expert Performance Indexing In SQL Server

Authors: Jason Strate, Grant Fritchey

2nd Edition

1484211189, 9781484211182

More Books

Students also viewed these Databases questions

Question

Explain the need for remedial basic skills training programs

Answered: 1 week ago

Question

1.Which are projected Teaching aids in advance learning system?

Answered: 1 week ago