himanshu.padmanabhi has asked for the wisdom of the Perl Monks concerning the following question:
abc.cgi my $parser = XML::LibXML->new(); my $xslt = XML::LibXSLT->new(); my $source = $parser->parse_file("abc.xml"); my $style_doc = $parser->parse_file("abc.xsl"); my $stylesheet = $xslt->parse_stylesheet($style_doc); my $results = $stylesheet->transform($source, args => "' '",val => "'2 +'"); print $stylesheet->output_string($results);
abc.xml <?xml version='1.0'?> <?xml-stylesheet href="abc.xsl" type="text/xsl"?> <tracks> <abc> <label>machine name</label> <desc>specify machine name</desc> </abc> </tracks>
abc.cgi works as stated here. But if I take it under my formabc.xsl <xsl:template match="tracks"> <form name="form1" method="POST" action="logic.cgi"> <table border="1"> <tr> <td> Parameter </td> <td> Description </td> <td> Value </td> </tr> <xsl:apply-templates/> </table> </form> <script> document.form1.submit(); </script> </xsl:template> <xsl:template match="abc"> <tr> <td> <xsl:value-of select="label"/> </td> <td> <xsl:value-of select="desc"/> </td> <td> <xsl:if test="label = 'machine name'"> <input type="text" name="args1" value=""> </input> </xsl:if> </td> </tr> </xsl:template> </xsl:stylesheet>
then it I get my form elements printed from XSL file,but form1.submit from it doesn't work. Please help.Since this is combination of XML,XSL,CGI,I am unware which forum should i try.print "<form action=someform.cgi method=post name=somename>"; abc.cgi code print "</form>";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: code under "form" not working
by frieduck (Hermit) on Mar 05, 2009 at 15:53 UTC | |
|
Re: code under "form" not working
by dHarry (Abbot) on Mar 05, 2009 at 16:03 UTC |