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

XSLT

  • From: SwetaG@r...
  • To: xml-dev@l...
  • Date: Mon, 02 Jul 2001 07:39:39 -0500

onclick in xslt
Hi,
     I have the following XML and XSL files,
XML file :

<SurveyList surveyid="1">
<Survey>
<questionid questdepend="1" ansdepend="2">1</questionid>
<question>How much do you know about the technology team?</question>
<answers><answer questid="1" ansid="1">Fully</answer>
<answer questid="1" ansid="2">Partially</answer>
<answer questid="1" ansid="3">Not at all</answer>
</answers>
<defaultoption>1</defaultoption>
<delflagQ>N</delflagQ>
<controltype>radio</controltype>
</Survey>

and the following is the part of the xsl file

<xsl:variable name="questdepend" select
="questionid/@questdepend"></xsl:variable>
<xsl:variable name="ansdepend" select
="questionid/@ansdepend"></xsl:variable>
<xsl:variable name="questid" select="questionid"></xsl:variable>


<xsl:element name="INPUT">
     <xsl:attribute name="type"><xsl:value-of select
="$controltype"/></xsl:attribute>
     <xsl:attribute name="value"><xsl:value-of select="
@ansid"/></xsl:attribute>
     <xsl:attribute name="name"><xsl:value-of select
="$questid"/></xsl:attribute>
     <xsl:attribute name="onclick">enableQuestion
($questid,$questdepend,$ansdepend)</xsl:attribute>
</xsl:element>

at runtime i am including the attribute "onclick" and for onclick i am
calling a function named 'enableQuestion' with parameters which i want to
pass from the xml... i am doing it as above...i am keeping the xml values
in the variables and then writing them as the parameters of the function...

but this is not working fine the varibles values are not being replaced by
the value but the variable names are coming as it is like enableQuestion
($questid,$questdepend,$ansdepend) when i am transforming the xsl.

Can some body tell me how do i read the xml values as function
parameters...
Thanx,
Sweta


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.