View Full Version : inside form element,form.submit not working

Mar 5th, 2009, 01:53 PM
#print "<form action=main.cgi method=post name=formname>";
#If I uncomment above line,form.submit in xsl file doesn't work
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);
#print "</form>"
Above code otherwise works(form.submit in xsl works).But If I uncomment form lines above,then form.submit doesnt work.what can be the problem?

<xsl:stylesheet version="1.0"

<xslutput method="html"/>

<xsl:template match="tracks">
<form name="form1" method="POST" action="abc.cgi">
<table border="1">
<td> Parameter </td>
<td> Description </td>
<td> Value </td>

<xsl:template match="abc">
<xsl:value-of select="label"/>
<xsl:value-of select="desc"/>
<xsl:if test="label = 'machine name'">
<input type="text" name="args1" value="">



<?xml version='1.0'?>
<?xml-stylesheet href="abc.xsl" type="text/xsl"?>

<label>machine name</label>
<desc>specify machine name</desc>


Mar 5th, 2009, 01:56 PM
Please follow http://www.codingforums.com/postguide.htm
1) Do not cross post your question in multiple forum categories- When posting, there is no excuse to post the same question in multiple categories in hopes of getting a quicker response. This is called spamming, and can get you banned. Choose one category that best accommodates your question, and post it there, once. If you're following up on a question, reply to the original thread, not start a new one! Everyone here is volunteering their time to help out others. The least you can do is make their jobs easier and less confusing.

Mar 5th, 2009, 03:00 PM
My problem was a combination of HTML,Javascript,XML,XSL.Perl.
So I was really confused which forum I should post.
If you take a look at it,it is very difficult to categorize the problem.
At least it is for me.
otherwise I would not made multiple posts of the same question.
I respect all the forum people a lot and value their time.