ICT-4540 Homework 1
Purpose
The starter files include four alternate text files (*faq.txt) and one CSS file (faq.css).
The goal is to modify your selected text file, using the instructions below,
to convert it to a well-formed XML file.
The tags must match those in the CSS file to make the output look reasonable
(see inset for a possible view of one FAQ)
What to Hand In
Please hand in a listing for each file requested, formatted in an easy-to-read style.
Ensure your name, and the name of the file is available in a comment at the top of
the file.
Also, ensure that you have a sample of the output from the result, a screen shot from
your
browser. If you do not see a document, but rather an error,
hand in the screen shot of your error listing as your output.
Problems
- XML vocabulary of Interest
-
Determine an XML vocabulary of potential interest to you for your final project, and describe its application (that is, what kind of projects or problems is this vocabulary useful for). Summarize your result in a neat and understandable paragraph for submission -
Note: This does not commit you to that vocabulary for your final project; the goal is to achieve understanding and purpose of some of the XML dialects, and start you thinking about what you would like to produce for your final project
-
- Create a valid XML File from an Internet FAQ
-
Open the text file with your editor -
Save the file with the same name, and the extension “.xml” -
You may now wish to open the XML file with your browser or your IDE's viewer. You will want to refresh the browser view after each step to see what has occurred to the file. What does the file look like in the browser now? -
Create the XML prolog as the first line of the XML document -
Insert comments at the beginning of the file, including the name of the file, your name, and the date -
Create a root element named FAQ. To keep your document “balanced”, you should also create the matching element close at the end of the document. What does the file look like in the browser now? -
Add the processing instruction that attaches the "css" file as a the stylesheet to the XML document. What does the file look like in the browser now? -
Find the text that should be the title, the subtitle (if any), original website (if any), and the author. Put these in the appropriate elements title, subtitle, author, and website. What does the file look like in the browser now? -
The rest of the text is a set of questions and answers, organized into sections. Create a section element for each section, and be sure to close the section before the next one starts. When you display the document in the browser, these form the major divisions of the FAQ. -
Within each section, put the question in a question element, and the answer in an answer element. Each answer should be captured as CDATA. Within the browser, this should now resemble the sample output. -
(Optional) You are free to play with the content of the CSS to make a nicer looking display if you like, so long as the result shows the basic structure is identified and preserved. Please do not invent and add new tags to the CSS. Note that the job of structuring the data is completely independent of modifying its appearance. -
Hand in the resulting XML file (and the CSS file if you modified it), as well as a copy of the resulting screen. If you were unable to get output successfully, please also include a copy of any output error messages you get.
-
Notes
-
Assignment submission instructions: For this, and all assignments, please collect your files for submission (the paragraph, the XML document, and the screen shot) and collect them in an archive (say, a zip file).
Open Canvas to the assignment, and submit the zip file as your attachment. -
Preferred formats: - Text files for text documents (.txt). .doc or .docx or .odt accepted, but not preferred
- Image files for images (.jpg, .png). Pasting into a document accepted but not preferred
- Source files in their "raw" format (.xml, .xsl, .css, .js, etc.). Pasting into a document is not accepted.
-
The FAQs below are from internet sources (albeit somewhat dated); a portion of them is copied below. If you use the URL in the text file, you can view or retrieve the entire source for the FAQ. -
You will find the CSS and starter text files for all the FAQs in the HWstarter zip file. Pick the CSS and one FAQ of your choice. - faq.css
- dodo-faq.txt
- rocky_horror_faq.txt
- standup_faq.txt
- weird-al-yankovic-faq.txt
I've added a couple of new ones, as well, just for variety.
- instagram_faq.txt
- woodworking_faq.txt
-
Use the tags provided in the selected CSS file. Do not invent and add your own, please. -
See the evaluation criteria below to see how your submission will be evaluated. It is your responsibility to have all parts included in your submitted assignment.
Evaluation
Criteria | Weight |
---|---|
XML vocabulary (dialect) research paragraph | 35 |
Text file modified to XML file exclusively using available tags | 50 |
Screen shot of XML file displayed in browser | 15 |