Save Time & improve Grades
- Questions Asked
- Experts
- Total Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!
Computer Science Homework Help Intro XML Authoring Document must look like the screenshot. Benjamin needs your help with a document that lists some of Map Finds For You- map products. Figure 2-32 shows the tree structure of Benjamin- 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- date in the comment section of the ï¬Âle, and then save the ï¬Âle as products.xml . 2. In the products.xml le, 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 flat . 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.
Ask a question
Experts are online
Answers
Login/SignUp to view answers