[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: passing username
Hi Gloria, > I am using (test.xsl + test.xml) to produce another form on the > browser. Is there any way of getting value of the username passed to > the second form (i.e. form that generated from (test.xml + test.xsl) You need to pass the username in as a parameter to test.xsl. Set up test.xsl so that it can accept the parameter, using an xsl:param element at the top level of the stylesheet (i.e. as a child of xsl:stylesheet): <xsl:param name="username" /> Then use this $username when you create the form with test.xsl. For example, to get its value you can use: <xsl:value-of select="$username" /> How you pass in the parameter to the stylesheet depends on what XSLT processor you're using. If you're using MSXML (i.e. doing the transformation client-side with IE) then you need to script the transformation and use the addParameter() method: addParameter('username', form.username) That entails adding some Javascript to the login.html page. See the MSXML SDK documentation for more details. If you're using Cocoon then you can use the URL to pass the parameter, so for example: test.xml?username=Fred will set the username parameter to the string 'Fred'. I hope that helps, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|