Mostly harmless (corto) wrote,
Mostly harmless
corto

java...

Java Geeks... please help.

There's this little boy... grade 4... he's a genius.
No really.

Anyways... he cornered me at the end-of-school-year bar-bq at the school the other night...
He is the web master for the school web site.
He's having a Java / Sax error that he can't sort out and thought I might be of help.

I've no clue... but I told him I'd ask some friends.

So...
Here's his text describing the problem...
and under the cut are the actual full text displays of the referenced tml and dtd files.

::::::::: The letter.
Attached to this message are both the xml file
being parsed by this application (6.tml) and its
DTD (tml.dtd).
The error message displayed is as follows:

Fatal Error while parsing test file: A '(' character or an element type is required in the declaration of element type "mcq". At Line 43 column 24.

(the bold part of the sentence is the actual error given by SAX, the rest is added by the error handling method of the parsing class).



( I messed with deleting a bunch of cr's to shorten this up, so the line numbers in the error message are proly off)
Here follows (between the ::'s) the file "6.tml" (which is supposed to be in subdirectory below the directory hosting the next file - the dtd file.)

Ok... I tried to post the files here... but I can't get the angle braces to work properly... even if I replace 'em all with the &rt; etc...
If you know about this stuff and have a minute... please let me know, I'll email you the two files in their proper format.

:::::: 6.tml :::::::::::::::::::::::::::::










54 x 0.1 = ?


5.4







Which
group of numbers is ordered from least to greatest?



  1. 4.8, 4.7, 4.2, 2.5, 5.9


  2. 8.5, 9.3, 5.714, 3002, 8.995


  3. 3.2, 20.3, 100.1, 362.5, 555.556


  4. 5.55, 545.2, 556.06, 54.54, 10.1


  5. I don't know




c



What is the thousandths place in 1 234.53421?

4





Calculate and round to the nearest
thousand: 344 x 5.

2000



6.4423 - 0.5 = ?

5.9423





If Sarah bought $5.55 dollars worth
of pens and payed with a $20 bill what was her change?



  1. 14.45


  2. 500.35


  3. 5.36


  4. 18.39




a







Show the ratio of 12 to 9 in the lowest possable terms.



  1. 2:45


  2. 3:4


  3. 4:3


  4. I don't know




b





If three gel pens cost $2.40 how much do 10 cost?

$8.00






Which is prime?

13, 15, 21

13





This morning on the MacIntosh farm 800 red apples and 200 green apples were picked. What percent of the apples were green?

20%





If 1 600 people visit a museum per day, and the museum is open 6 days a week, how many people visit in two weeks?

19 200





A family is driving 3 500 km to Whitehorse to visit friends. They drive at 80 km/h for 6 hours a day. How long will it take to get to Whitehorse?

[Error: Irreparable invalid markup ('<ol [...] a">') in entry. Owner must fix manually. Raw contents below.]

<b>Java Geeks...</b> please help.

There's this little boy... grade 4... he's a genius.
No really.

Anyways... he cornered me at the end-of-school-year bar-bq at the school the other night...
He is the web master for the school web site.
He's having a Java / Sax error that he can't sort out and thought I might be of help.

I've no clue... but I told him I'd ask some friends.

So...
Here's his text describing the problem...
and under the cut are the actual full text displays of the referenced tml and dtd files.

::::::::: The letter.
Attached to this message are both the xml file
being parsed by this application (6.tml) and its
DTD (tml.dtd).
The error message displayed is as follows:

Fatal Error while parsing test file: <b>A '(' character or an element type is required in the declaration of element type "mcq"</b>. At Line 43 column 24.

(the bold part of the sentence is the actual error given by SAX, the rest is added by the error handling method of the parsing class).

<lj-cut text="here follows the text of the related files...">

( I messed with deleting a bunch of cr's to shorten this up, so the line numbers in the error message are proly off)
Here follows (between the ::'s) the file "6.tml" (which is supposed to be in subdirectory below the directory hosting the next file - the dtd file.)

Ok... I tried to post the files here... but I can't get the angle braces to work properly... even if I replace 'em all with the &rt; etc...
If you know about this stuff and have a minute... please let me know, I'll email you the two files in their proper format.

:::::: 6.tml :::::::::::::::::::::::::::::
<?xml version="1.0" encoding="ISO-8859-1"?>

<!-- Standard test file for JMET v1.0 -->

<!DOCTYPE test SYSTEM "tml.dtd" >

<test>

<question>

54 x 0.1 = ?
<answer>

5.4

</answer>

</question>

<mcq>

Which
group of numbers is ordered from least to greatest?

<ol type="a">

<li>4.8, 4.7, 4.2, 2.5, 5.9</li>

<li>8.5, 9.3, 5.714, 3002, 8.995</li>

<li>3.2, 20.3, 100.1, 362.5, 555.556</li>

<li>5.55, 545.2, 556.06, 54.54, 10.1</li>

<li>I don't know</li>

</ol>

<mca>c</mca>

</mcq>

<question> What is the thousandths place in 1 234.53421?

<answer>4</answer>

</question>

<question>

Calculate and round to the nearest
thousand: 344 x 5.

<answer>2000</answer>

</question>

<question>6.4423 - 0.5 = ?

<answer>5.9423</answer>


</question>


<mcq>If Sarah bought $5.55 dollars worth
of pens and payed with a $20 bill what was her change?

<ol type="a">

<li>14.45</li>

<li>500.35</li>

<li>5.36</li>

<li>18.39</li>

</ol>

<mca>a</mca>

</mcq>


<mcq>


Show the ratio of 12 to 9 in the lowest possable terms.

<ol type="a">

<li>2:45</li>

<li>3:4</li>

<li>4:3</li>

<li>I don't know</li>

</ol>

<mca>b</mca>

</mcq>

<question>

If three gel pens cost $2.40 how much do 10 cost?

<answer>$8.00</answer>


</question>

<question>

Which is prime?

13, 15, 21

<answer>13</answer>

</question>

<question>

This morning on the MacIntosh farm 800 red apples and 200 green apples were picked. What percent of the apples were green?

<answer>20%</answer>

</question>

<question>

If 1 600 people visit a museum per day, and the museum is open 6 days a week, how many people visit in two weeks?

<answer>19 200</answer>

</question>

<mcq>

A family is driving 3 500 km to Whitehorse to visit friends. They drive at 80 km/h for 6 hours a day. How long will it take to get to Whitehorse?

<ol type="a>

<li>Exactly 7 days</li>

<li>A little more than 7 days</li>

<li>Exactly 8 days</li>

<li>A little more than 8 days</li>

</ol>

<mca>b</mca>

</mcq>

<mcq>

Estimate the length of a piece of paper in meters.

<ol type="a">

<li>0.003 m</li>

<li>0.03 m</li>

<li>0.3 m</li>


<li>3 m</li>


</ol>

<mca>c</mca>

</mcq>

<mcq>

3 km = _____ m


<ol type="a">


<li>0.003 m</li>


<li>0.03 m</li>



<li>300 m</li>



<li>3 000 m</li>



</ol>



<mca>d</mca>


</mcq>


<question>



If rectangle has perimeter of 36m and a length of 12 m what is it's height?



<img src="6\16-1.gif"/>


<answer>6</answer>


</question>

<question>

What is the area of the shaded triangle?

<img src="6\17-1.gif"/>


<answer>12</answer>


</question>

How much carpet is needed to carpet the room below?


<img src="6\19-1.gif"/>

<answer>29</answer>


</question>


<question>


What size angle must be added to 36° to make a right angle (90°)?


<img src="6\23-1.gif"/>


<answer>54</answer>


</question>

<mcq>
How many small cubes are in this shape?
<img src="6\24-1.gif"/>
<ol type="a">
<li>81</li>
<li>47</li>
<li>64</li>
<li>73</li>
</ol>
<mca>c</mca>
</mcq>
<question>
State the next number in the pattern.
0, 1, 3, 6, 10, __
<answer>15</answer>
</question>
<mcq>
Which statement best describes this number pattern from left to right?
48, 24, 12, 6, 3, ...
<ol type="a">
<li>Each number is doubled</li>
<li>Each number is halved</li>
<li>Each number is tripled</li>
<li>Each number is divided by three</li>
</ol>
<mca>b</mca>
</mcq>
<question>
Megan counted the pens and pencils in her pencil case. Altogether there was a total of twelve. She has twice as many pens as pencils. How many pencils does she have?
<answer>4</answer>
</question>
<question>
What is the second most popular car brand?
<img src="6\35-1.gif"/>
<answer>C</answer>
</question>
<question>
What number is the median of this list?
80, 72, 81, 54, 79
<answer>79</answer>
</question>
<question>Karen is choosing a new car. She has a choice between a 2 or 4 door model. She can also choose the colour - black, red, blue or silver. Between colour and model how many choices does she have over all?<answer>8</answer></question><question>During what month did sales decrease the most?<img src="6\40-1.gif"/><answer>April</answer></question></test>
:::::::::::::::::::::: end of 6.tml :::::::::::::::::::::::::::::::::::::::

And now the file tml.dtd.

:::::::::::::::: tml.dtd :::::::::::::::::::::::::::::::::::::::::::::::::::
<!-- DTD for TML -->
<!-- copyright 2006 by ### ###### -->
<!-- version 1.0 (complies with JMET v1.0) -->
<!ELEMENT test (question|mcq)* >
<!ELEMENT question (#PCDATA|answer|br|img)* >
<!ELEMENT answer (#PCDATA) >
<!ELEMENT mcq (mca|ol|#PCDATA|br|img)* >
<!ELEMENT ol (li)* >
<!ATTLIST ol type CDATA #FIXED "a" >
<!ELEMENT li (#PCDATA|img|br)* >
<!ELEMENT mca (#PCDATA) >
<!ELEMENT br EMPTY >
<!ELEMENT img EMPTY >
<!ATTLIST img src CDATA #IMPLIED >


::::::::::::::::::: end of tml.dtd :::::::::::::::::::::::::::::::::::::
Subscribe
  • Post a new comment

    Error

    default userpic

    Your IP address will be recorded 

    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.
  • 7 comments