XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
steven matthewsSubject: Assigning a variable
Author: steven matthews
Date: 02 Nov 2006 04:37 AM
Hi There,

I am using an .xsl file to both extract XML data and to create a form that a user can rsspond to.

I have created two variables and populated them, as follows:

<xsl:variable name = "PID" ><xsl:value-of select="ITEM/PS_ID"/></xsl:variable>

<xsl:variable name = "CID" ><xsl:value-of select="ITEM/CLASS_ID"/></xsl:variable>


I later wish to use these variables to pass information to a PHP script via a form , as follows:

<form
name="confirmEnrol"
action="student_enrol.php"
method="POST"
onsubmit_="return true">

<input type = "hidden" name = "Personid" value = "$PID" />
<input type = "hidden" name = "Classid" value = "$CID" />

<INPUT type="submit" value="Confirm Request to Enrol" /><br />
</form>

Unfortunately this does not work ! All that is passed is simply $PID and $CID and not their actual values.

Q How can I use XSL to assign the contents of a variable to a value field in a form ?

Any help very much appreciated,

Steven Matthews


Unknownclass_enrol.xsl
XSL file

Postnext
Ivan PedruzziSubject: Assigning a variable
Author: Ivan Pedruzzi
Date: 02 Nov 2006 08:18 AM

<input type = "hidden" name = "Personid" value = "{$PID}" />
<input type = "hidden" name = "Classid" value = "{$CID}" />

Ivan Pedruzzi
Stylus Studio Team

Posttop
steven matthewsSubject: Assigning a variable
Author: steven matthews
Date: 02 Nov 2006 08:29 AM
Hi Ivan,

THanks a lot !

I have spent a long time over this one ...

regards,

Steven Matthews

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.