Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

sitestxt file sires xsd file siteMap file vs file wfs file Case Problem 1 Data Files needed for this Case Problem: sitemapPS.xml, sitemapVS.xml, sitemapWFS.xml, a

image text in transcribedimage text in transcribed

sitestxt file

image text in transcribed

sires xsd file

image text in transcribed

siteMap file

image text in transcribed

vs file

image text in transcribed

wfs fileimage text in transcribed

Case Problem 1 Data Files needed for this Case Problem: sitemapPS.xml, sitemapVS.xml, sitemapWFS.xml, a sitestxt.xml, sitestxt.xsod 0 Weekend Fun Snacks Cleo Coal created and maintains a website called Weekend Fun Snacks which lists her picks of the best and easiest recipes for kids to cook. The site's popularity convinced her there was room for more specialty recipe sites, so she created two additional websites-Primal Snacks, which features snacks appropriate for a paleo or primal diet, and Veg Snacks, which includes quick bites suitable for vegetarians. Cleo also created a Sitemaps file for each site, which is a document written in XML that provides basic information about each page in a submitted her Sitemaps files to Google and other search services to help them better index her sites. However, she also thinks that the Sitemaps content she's created would be useful in a compound document with a custom vocabulary, which would allow her to view information about all the pages on all of her sites in a single page. Cleo asks for your help with creating this compound document. website, as well as how all the pages are related. Cleo has Figure 4-30 shows a tree diagram highlighting some of the elements from both vocabularies that you'll place in the document Figure 4-30 Tree diagrams of Sitemaps and sites vocabularies Sitemaps vocabulary sites vocabulary urlset lastmod changefreq priority totalPages Cleo has provided you with a truncated version of the Sitemaps file for each of her three websites as well as another XML file containing the administrative information on her sites. Your job will be to create a compound document combining the features of the two vocabularies. Complete the following: 1. In your XML editor, open the sitestxt.xml and sitestxt.xsd files from the xml04casei folder, enter your name and today's date in the comment section of each file, and then save the files as sites.xml and sites.xsd, respectively, in the same folder. 2. In the sites.xml file, add a namespace declaration to the root sites element, associating the xs prefix with the URI for the XML Schema namespace. Specify the default namespace http://example.com/weekendfunsnacks/sites for the file. Specify sites.xsd as the location of the schema for the default namespace. 3. In your XML editor, open the sitemapPS.xml, sitemapVS.xml, and sitemapWFS.xml files from the xml04 casel folder. These files contain the Sitemaps for Cleo's three websites. In the sitemapWFS.xml file, copy the contents from the opening curlset> tag through the closing tag to the Clipboard, and then paste them into the sites.xml file just before the closing tag for the Weekend Fun Snacks site. Repeat to copy and paste the content from the sitemapPS.xml file into the site element for the Paleo Snacks site, and the content from the sitemapVS.xml file into the site element for the Veg Snacks site. Save your changes to the sites.xml file. 4. In each of the opening curlset> tags you pasted in the previous step, remove the XML Schema namespace declaration and the schema location, leaving the default namespace declaration for each element. Save your work. 5. In the sites.xsd file, in the root element, specify the target namespace as http://example.com/ weekendfunsnacks/sites, and then associate the prefix ee with the target namespace. Associate the prefix sm with the namespace http://www.sitemaps.org/schemas/sitemap/O.9. Specify that elements are qualified by default, and that attributes are unqualified by default. 6. Add code to import the schema for the http://www.sitemaps. namespace from the location http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd. 7. Immediately following the declaration of the totalPages element, add a reference to the urlset element from the http://www.sitemaps.org/schemas/sitemap/O.9 namespace. Save your work. 8. Validate the sites.xml file, and then, if necessary, fix any validation errors. - Weekend Fun Snacks 127 - Paleo Snacks 52 - Veg Snacks 17 ?xml version-"1.0" encoding "UTF-8" standalone "yes"? New Perspectives on XML Tutorial 4 Case Problem 1 Cleo Coal sites vocabulary schema Author: Date: Filename: sites.xsd Supporting Files: <:complextype> type="xs: string" name="name"/> type="xs : byte" name="total Pages"/> element> sequence> /xs:complexType> element> schema> ?xml version-"1.0" encoding="UTF-8" standalone-"true"?> - - http://example.com/primalsnacks/?cat= 18 2017-09-19T17:13:19+00:00 - http://example.com/primalsnacks/?cat=54 /url> url> loc > http://example.com/primalsnacks/?cat=52 2017-09-28T21:03:11+00:00 - http://example.com/primalsnacks/?cat= 201 2017-10-06T07:03:26+00:00 http://example.com/primalsnacks/?cat-11 ?xml version="1.0" encoding="UTF-8" standalone-"true"?> -New Perspectives on XML Tutorial 4 Case Problem 1 Cleo Coal Veg Snacks Sitemap Author: Date: Filename: sitemapvs.xml Supporting Files: --> - http://example.com/vegsnacks/?cat-102 - http://example.com/vegsnacks/?cat=23 - curl loc>http://example.com/vegsnacks/?cat-1 - loc>http://example.com/vegsnacks/?cat-55 2017-06-12T08:05:32+00:00 - http://example.com/vegsnacks/?cat= 201 - loc>http://example.com/vegsnacks/?cat-87 ?xml version="1.0" encoding-"UTF-8" standalone-"true"?> !--New Perspectives on XML Tutorial 4 Case Problem 1 Cleo Coal weekend Fun Snacks sitemap Author: Date: Filename: sitemapwFS.xml Supporting Files: --> - http://example.com/weekendfunsnacks/?cat=58 - http://example.com/weekendfunsnacks/?cat=2 - loc> http://example.com/weekendfunsnacks/?cat= 15 <24:04><:complextype><24:04>

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

Step: 3

blur-text-image

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

Database Concepts

Authors: David M. Kroenke, David J. Auer

7th edition

133544621, 133544626, 0-13-354462-1, 978-0133544626

More Books

Students also viewed these Databases questions