CSCI 4230.1
Software Tools
Spring 1999
Final Examination

Answer all questions.  One hour and 20 minutes.

Return both questions and answers.

Name: _________________________________________      Grade: __________________

(1)    Write a simple JavaScript program to show ISO-Latin-1 codeset values using the HTML numeric representation, which uses a "&#" and a ";" to enclose the number.  For example, &#38; is the character "&", &#60; is "<", &#64; is "@" and &#65; is "A".  Note that the printable characters range from 33 to 254.  Furthermore, JavaScript supports the function String.fromCharCode(num) that returns the character corresponding to the input ISO-Latin-1 value num.  For example, String.fromCharCode(38) returns "&".  Write a JavaScript program to print out a table of all numeric special characters using the &# method.  You should write your program to display as close to the one below as possible.

(2)    Write a Cold Fusion program. liststudent.cfm, (ASP program not acceptable) to accept a the first character of a country name and display the name of all students, with email addresss links, categorized by country.  You may assume that you can access to the DSN "student" that contains a table Student with:

Student(StudentID, Name, Email, Country).

A row of the table student may be:

(1, "Jiang Xu", "xu@lattes.uhcl.edu", "China")

For example, if the url is:

http://lattes.uhcl.edu/demo/liststudent.cfm?countryFirstChar=c

Your display must look like this:

Note that there is a comma separating any two names.  Also, there may be more than one student with the same name.

(3)    Consider the following file t2aq3.xml.

<?xml version="1.0" ?>
<?xml-stylesheet href="t2aq3.css" type="text/css" ?>
<!DOCTYPE t2aq3 SYSTEM "t2aq3.dtd">

<Chapter>
   <author name=yue gender=male>
   <title>Cold Fusion</title>
   <para>
         Cold Fusion is a server-side technology.
         <sidenote>Cold Fusion Files ends with the file extension .cfm.</sidenote>
         <sidenote>Cold Fusion is a product of Allaire</sidenote>
   <para>
         Cold Fusion tag starts with a "CF".  For example, <CFOUTPUT>.
</chapter>

(a)    It is not well-formed.  Correct the file to make it well-formed.  Note that only the tag author is empty.

(b)    Write a minimal DTD for the corrected XML file.

(c)    Write the CSS file t2aq3.css to display the XML file (in IE 5.0) as below:

Note that: