Assignment intro xml authoring- on the same line as the


Assignment: Intro XML Authoring

Document must look like the screenshot.

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

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 ?le from the xml02 review folder provided with your Data Files, enter your name and today's date in the comment section of the ?le, and then save the ?le as products.xml .

2. In the products.xml file, insert an internal DTD for the root element products directly after the comment section and before the opening tag.

3. Within the internal DTD, declare the following items:

a. The products element, containing at least one occurrence of the child element product
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 ?le:

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
c. 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 default of flat
e. For the price element, a required media attribute equal to either paper or electronic

5. On the same line as the format attribute de?nition, insert a comment containing the text format default is ?at.

6. Save your changes to the products.xml ?le, and then use Exchanger XML Editor or another XML tool to verify that the document is well formed.

7. Validate the document. If necessary, correct errors one at a time and revalidate until the document is valid.

Attachment:- Tree structure of Benjamins XML Document.rar

Request for Solution File

Ask an Expert for Answer!!
: Assignment intro xml authoring- on the same line as the
Reference No:- TGS02300772

Expected delivery within 24 Hours