[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Is this possible in XSL?

Subject: RE: Is this possible in XSL?
From: Robert Stuart <Robert.Stuart@xxxxxxxxxxxxxxxxx>
Date: Wed, 3 Oct 2001 09:07:24 +0100
RE:  Is this possible in XSL?
I would not bother pre-computing combinations of answers - the list of
possible combinations will be enormous.

Why not do it in XML?  In-line the answers with the questions ...

<questions>
	<question id="1">
		<text>This is a question</text>
		<option opt="A">This is response A</option>
		<option opt="B">This is response B</option>
		<option opt="C">This is response C</option>
		<correct_answer>A</correct_answer>
	</question>
	<question id="2">
		<text>This is another question</text>
		<option opt="A">This is response A</option>
		<option opt="B">This is response B</option>
		<option opt="C">This is response C</option>
		<correct_answer>A</correct_answer>
		<correct_answer>C</correct_answer>
	</question>
</questions>


Option i)
Serve the questions, with options (but not correct_answers) to the user.
You might indicate the number of answers required - depends on your rubric.

On your server, compare the options selected with the correct options.


Option ii)
Serve the full file as is to the end users, and let the browser check the
responses (use Java/JavaScript/other language).


Depending on your environment, you may need to review the simplicity of the
models above, and the chances of people perusing your files (security).



From: Mark Nahabedian [mailto:naha@xxxxxxxxxx]
Sent: Tuesday, October 02, 2001 12:48 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  Is this possible in XSL?


Uslu, Cihan Y (MED) writes:
 > Hi;
 > Is it possible to get all the answers'  item-ids in a way that covers
 > all the possible correct answer combination. 
 > For example I have this multiple choice question in XML and the
correct
 > answers are "A" "B" and "H". 
 > What I want to output is to get all the possible correct answer
 > combination like this: 
 > 			"ABH | AHB | BAH | BHA | HAB | HBA"
 > 
 > How can I do this in XSL?

How would you do it in another language?

Are the "item-id" attributes always a single character in length?

Is there some maximum number of <answer> elements for all <question>s?
I.e. can the script assume that no <question> will ever have more than
5 <answer>s?  If so, you can precompute all possible permutations and
just use the elements of the precomputed permutation as indexes into
the <answer> elements for a given <question>.






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.