OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
xsl variable
This page's ID:
25186
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I'm doing a project on E-Quiz. I've declared a variable but how can i let the user choose the topic he/she wants and display the question out? I was asked to display the question in an ASP. I'm not sure whether I have did the correct thing. <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="ISO-8859-1"/> <xsl:template match="/"> <xsl:variable name="concept" select="0" /> <xsl:variable name="topic" select="0" /> <xsl:variable name="level" select="0" /> <xsl:variable name="question" select="0" /> <table border="1"> <tr><xsl:for-each select="entry"> <td> Concept = <xsl:value-of select="$concept" /><br /> Topic = <xsl:value-of select="$topic" /><br /> Level = <xsl:value-of select="$level" /><br /> Question = <xsl:value-of select="$question" /><br /> <xsl:if test="$concept = 1"> <xsl:value-of select="concept1" /><br /> </xsl:if> <xsl:if test="$concept = 2"> <xsl:value-of select="concept2" /><br /> </xsl:if> <xsl:if test="$topic = 1"> <xsl:value-of select="topic1" /><br /> </xsl:if> <xsl:if test="$topic = 2"> <xsl:value-of select="topic2" /><br /> </xsl:if> </td></xsl:for-each> </tr> </table> </xsl:template> </xsl:stylesheet>
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »