Teacher is very picky, document must have all these things Sean has a new project for you to work on. In addition to digital games, the Harpe Gaming Store also sells board games. Sean is working on a page describing a few sample board games. He has created an XML document named games.xml that contains the description of two games, as well as scores the store has given the games on a 1 to 10 scale in seven categories. Sean also has an XML document named game_reviews.xml containing reviews written up in other gaming websites and an XML document named reviewers.xml that describes those websites. Sean wants all of this information collected and displayed using a customized style sheet. He would like the style sheet to calculate the average score given to the selected board game and wants all numeric values and dates to be nicely formatted. Figure 6-46 shows a preview of the completed project. 1. Using your editor, open the gamestxt.xml and gamestxt.xsl .Enter your name and the date in the comment section of each ?le and save them as games.xml and games.xsl , respectively. 2. Go the games.xml ?le in your editor. Take some time to review the contents of the ?le and then link the games.xsl style sheet file to the file. Close the games.xml file, saving your changes. 3. View the contents of the game_reviews.xml and reviewers.xml ?le in your editor, taking note of the structure and content of each document. Close the files. You do not have to save any changes to these documents. 4. Sean also has created a library of functions youll use in this project. Open the hgfunctions.xsl ?le in your editor and study the contents. The document has two templates. One template matching the releaseDate element is used to convert date values from the mm/dd/yyyy format to the Month Day, Year format. The second template, named imageRow, is used to create a row of inline images. The imageRow template has two parameters: the imgFile parameter speci?es the name of the image ?le, and the imgCount parameter speci?es the number of images to be displayed. After studying the ?les, close the document. You dont have to save any changes. 5. Go to the games.xsl ?le in your editor. Directly after the opening tag, use the include element to include the contents of the hgfunctions.xsl style sheet. 6. Directly after the include element, create the following global parameters and variables: a. The gameID parameter with a default value of bg210. This parameter will be used to select different board games to display in the web page. b. The currentGame variable containing the /games/game[@gid=$gameID] node set. This variable will be used to select the game to display in the report. c. The externalReviews variable containing the /reviews/review[@gid=$gameID] node set from the game_reviews.xml ?le. ( Hint : Use the document() function.) This variable will be used to access customer reviews for the current game. d. The externalReviewers variable containing the /reviewers node set from the reviewers.xml ?le. This variable will be used to access the list of reviewers for the report. 7. Go to the root template and make the following style changes so that the report displays information for the current game selected by the user: a. Go to the
Looking for a solution written from scratch with No plagiarism and No AI?
WHY CHOOSE US?
We deliver quality original papers |
Our experts write quality original papers using academic databases.We dont use AI in our work. We refund your money if AI is detected |
Free revisions |
We offer our clients multiple free revisions just to ensure you get what you want. |
Discounted prices |
All our prices are discounted which makes it affordable to you. Use code FIRST15 to get your discount |
100% originality |
We deliver papers that are written from scratch to deliver 100% originality. Our papers are free from plagiarism and NO similarity.We have ZERO TOLERANCE TO USE OF AI |
On-time delivery |
We will deliver your paper on time even on short notice or short deadline, overnight essay or even an urgent essay |