This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Passing parameter from a form


Another challenging question! I have a web page which contains a glossary,
which has many categories. I want to give the user the option of viewing all
items or by category. I also want to give the option of the output being in
HTML or PDF format. The user would use a simple form from a XSL stylesheet
to deterimine the output. The form component of the stylesheet is below.

Ideally, I was hoping to have the page divided into a table, with the top
part containing the form and the bottom the output. But this would require
<SPAN> tags and may be too complicated at the moment. (If this is possible,
are there any examples?)

My next choice would be to pass the selections to another page for
processing. I could pass it to a XSL. But for this, could someone please
provide a sample of how to accept the parameters? (ie: accept parameters,
print parameters). Alternatively, I am thinking of using ASP to dynamically
generate the XSL stylesheet for me. (Of course, since I am using Cocoon2,
how to get the items connected is another story....) Any recommendations?
 

Here is what I have for the form component of my stylesheet:
<xsl:template match="glossary">
<form name="criteria" method="get" action="nothing.htm">
<table><tr><td nowrap="nowrap" valign="top">
    Select one:<br />
<input type="radio" name="sorting" checked="checked" value="All">All
Categories</input><br />

	<xsl:for-each select="glossaryitem[count(. | key('sort-by-category',
category)[1]) = 1]">
		<xsl:sort select="category" />
<input type="radio" name="sorting" value="{.}">
			<xsl:value-of select="category"/>
		</input><br />
	</xsl:for-each>
</td><td width="50"></td>
<td valign="top">Choose Output:<br />
<input type="radio" name="output" checked="checked" value="">HTML</input><br
/>
<input type="radio" name="output" value="PDF">Adobe PDF</input>
</td></tr><tr><td>
<center><input type="submit" value="Generate Report" name="SubmitButton"
/></center>
</td></tr></table>
</form>
</xsl:template>

Doug Hewko
952-1121
mailto:doug.hewko@ccra-adrc.gc.ca

Chief Building Emergency Warden, Billings Bridge Tower
First Aid Co-ordator, Billings Bridge Tower
BN Project programmer



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]