forms, xslt and python

  • Thread starter =?iso-8859-15?Q?=F8ystein?=
  • Start date
?

=?iso-8859-15?Q?=F8ystein?=

Hi!

I got an xml file that goes like this.

<question id=10 correct_answer=2>
<alternative>Answer 1</alternative>
<alternative>Answer 2</alternative>
<alternative>Answer 3</alternative>
<alternative>Answer 4</alternative>
</question>

I've made an xslt transformation and put the alternatives into radio
buttons (html form) so the user can choose the correct answer by

I am able to list all the questions and the id's via via python and return
them to the webpage. Put how can I get the value from the alternative
element? How can I verify that the user have answered correct?


Regards
Frengky
 
U

Uche Ogbuji

Firstly, that isn't an XML file. You're missing quotes around
attribute values.

Secondly, your question is very unclear. Are you looking for an XSLT
way to correlate the correct_answer attribute to the alternative
element in corresponding order? Are you looking for a Python means to
do this?


--
Uche Ogbuji Fourthought, Inc.
http://uche.ogbuji.net http://4Suite.org http://fourthought.com
Use CSS to display XML -
http://www.ibm.com/developerworks/edu/x-dw-x-xmlcss-i.html
Introducing the Amara XML Toolkit -
http://www.xml.com/pub/a/2005/01/19/amara.html
Be humble, not imperial (in design) -
http://www.adtmag.com/article.asp?id=10286Querying WordNet as XML -
http://www.ibm.com/developerworks/xml/library/x-think29.html
Manage XML collections with XAPI -
http://www-106.ibm.com/developerworks/xml/library/x-xapi.html
Default and error handling in XSLT lookup tables -
http://www.ibm.com/developerworks/xml/library/x-tiplook.html
Packaging XSLT lookup tables as EXSLT functions -
http://www.ibm.com/developerworks/xml/library/x-tiplook2.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top