TriviaCenter Question File Format

Below is the proposed DTD for TriviaCenter’s new question and answer format.

I’ve got to admit that it’s heavily based on the style of ‘You Don’t Know Jack’ ( ) – a fantastic trivia game that I really do suggest you try and buy. The humor is fantastic, the style is slick and professional and it’s just downright fun.

Anyway, now that I’ve sung their praises, it’s time to rip them off and build a free alternative.

So, the basic layout will be similar to this…

<triviacollection name=”Television”> 

   <category name=”Katanas and Paint Brushes”>

      <question text=”Which of the Teenage Mutant Ninja Turtles wore the blue mask?”/>

      <answer text=”Leonardo” correct=”yes”/>

      <answer text=”Michaelangelo”/>

      <answer text=”Donatello”/>

      <answer text=”Raphael”/>




Of course, this format doesn’t offer much that is new – apart from perhaps allowing more or less than four answers.

Where it WILL get interesting is our new ‘Action’ tag. This tells TriviaCenter to play some multimedia content – show a picture, play a video or play a sound – to do with our question.

You can place an action element almost anywhere in your XML – for example, on a category, a question or an answer.

They also have an ‘event’ attribute that allows you to choose when you want the event to occur. If ‘Pre’, it happens BEFORE the category or answer is chosen (when it has focus) or before the question appears. If ‘Post’, it happens after, and on ‘When’ it happens AS you make your choice.

So in the above example, you could have a voice introduction by putting in the following XML…

    <question text=”Which of the Teenage Mutant Ninja Turtles wore the blue mask?”>

        <action event=”Pre”> 




Likewise, you can chat AFTER the question has been revealed (but before the answers are) by making a Post event. You can then read the possible answers out using their Pre events, comment on their choice using the Post event, wrap up the question with the Post event for the entire category… as you can see, there’s a lot of room here to make your interface very chatty and make it feel like a real show. 

Proposed DTD:

<!ELEMENT triviacollection (category*,action*)>
<!ATTLIST triviacollection

<!ELEMENT category (question,answer*,action*)>
<!ATTLIST category

<!ELEMENT action (sound?,graphic?,video?,text?)>
<!ATTLIST action
 event (pre|post|when) “when”

<!ELEMENT question (action*)>
<!ATTLIST question

<!ELEMENT answer (action*)>
<!ATTLIST answer

correct (yes|no) “no” 

<!ELEMENT sound (#PCDATA)>

<!ELEMENT graphic (#PCDATA)>

<!ELEMENT video (#PCDATA)>


Leave a Reply

Your email address will not be published. Required fields are marked *