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

evaluate a interview

Subject: evaluate a interview
From: "Markus Hanel" <markus.hanel@xxxxxx>
Date: Thu, 9 Oct 2003 09:23:20 +0200 (MEST)
how to evaluate an interview
hallo,
I have a problem to evaluate a interview at example at school. there are a
few forms with different questionforms.
 In a table should be the points listet if the answer is right
(solution/@points) or wrong (0 points).
problem 1:
I want a variable that includes the valid_input of the solution.
problem 2:
This variable should compare the valid_input and the given answer.
problem 3:
Whats to do if there is a option box??????

Many thanks
Markus


<interview>
  <form>
    <OneQuestOneAnswer>
      <question>Wie heißt der Mount Everest ( 8846 m ) in der Sprache der
Einheimischen?</question>
      <solution type="text" points="100"
valid_input="Tschomolungma"></solution>
    </OneQuestOneAnswer>
    <OneQuestOneAnswer>
      <question>Josef hat sich die Grippe geholt. Schreiben Sie eine
Möglichkeit auf, wie er sie bekommen haben könnte?</question>
      <solution type="text" points="2" valid_input="Übertragung
Keime"></solution>
    </OneQuestOneAnswer>
  </form>
  <form>
    <OptionBoxQuestion>
    <question>Elektrische Energie beim Betrieb einer Lampe: Ist die Menge
der entstandenen Lichtenergie </question>
      <option number="1">
            <text>größer</text>
            <solution type="bool" points="0" valid_input="0"></solution>
       </option>
       <option number="2">
            <text>kleiner</text>
            <solution type="bool" points="1" valid_input="1"></solution>
       </option>
       <option number="3">
            <text>gleich</text>
            <solution type="bool" points="0" valid_input="0"></solution>
       </option>
       <question_annotation>der Menge der verwendeten elektrischen
Energie?</question_annotation>
    </OptionBoxQuestion>
    <OneQuestOneAnswer>
      <question>Wann beginnt bzw. endet der Dreißigjährige Krieg
?</question>
      <solution type="text" points="3" valid_input="1618-1648"></solution>
    </OneQuestOneAnswer>
  </form>
</interview>


the xsl code:
<table>
<tr>
<!-- jede form wird durchlaufen -->
<xsl:for-each select="interview/form">
<!-- je frageform pro form eine zelle -->
<xsl:for-each select="OneQuestOneAnswer|OptionBoxQuestion">
<td>
<xsl:choose>
  <xsl:when test="self::OneQuestOneAnswer">
    <xsl:variable name="solution"
select="child::solution[string="'@valid_input'"]" />
    <xsl:choose>
      <xsl:when test="contains(solution, '$solution')">
        <xsl:value-of select="solution/@points" />
      </xsl:when>
      <xsl:otherwise>
        <p>0</p>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:when>
  <xsl:when test="self::OptionBoxQuestion">
    <xsl:choose>
      <xsl:when test="??????????">
        <xsl:value-of select="solution/@points" />
      </xsl:when>
      <xsl:otherwise>
        <p>0</p>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:when>
</xsl:choose>
</td>
</xsl:for-each>
<!-- ENDE je frageform pro form eine zelle -->
</xsl:for-each>
<!-- ENDE je form eine zelle -->
</tr>
</table>

-- 
NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien...
Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService

Jetzt kostenlos anmelden unter http://www.gmx.net

+++ GMX - die erste Adresse für Mail, Message, More! +++


 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.