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

pass variables to next form on submit from XSL file

Subject: pass variables to next form on submit from XSL file
From: himanshu padmanabhi <himanshu.padmanabhi@xxxxxxxxx>
Date: Tue, 17 Feb 2009 18:40:42 +0530
 pass variables to next form on submit from XSL file
How to pass variables from XSL file to next form on form submit?

CODE

myfile.cgi

    $str=$in{'some_value'};
    my $parser = XML::LibXML->new();
    my $xslt = XML::LibXSLT->new();

    my $source = $parser->parse_file($xmlfile);
    my $style_doc = $parser->parse_file($xslfile);

    my $stylesheet = $xslt->parse_stylesheet($style_doc);

    my $results = $stylesheet->transform($source, string  =>
"'$str'",val => "'1'");
    print $stylesheet->output_string($results);


myfile.xsl

<form name="form1" method="POST" action="file1.cgi">
     <tr>
            <td>
                         <xsl:value-of select="label"/>
            </td>
            <td>
                        <xsl:value-of select="desc"/>
            </td>
            <td>
                   <select>
                           <xsl:call-template name="str:tokenize">
                           </xsl:call-template>
                  </select>
           </td>
    </tr>
</form>

<xsl:choose>
<xsl:when test="$val &gt; 1">
<script>
        document.mon.submit();
</script>
 </xsl:when>
 </xsl:choose>

</xsl:template>


file1.cgi

Here I want to access $string and $val.XSL should give them on form
submit.How to access those here?
----------------------------
Regards,
Himanshu Padmanabhi

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.