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

how to pass a paramter to xsl in a simple way?

Subject: how to pass a paramter to xsl in a simple way?
From: "Hubert Holtz" <Turnhose_alt@xxxxxxx>
Date: Sun, 26 Jan 2003 21:26:00 +0100
xsl if eq
Hello,

I read some articles about passing parameters to xsl in the archive of this list, but couldn't find a simple solution for the following problem.

I have xsp documents with a xml structure for two languages, so the same structure twice in one xsp document, and depending on
the value of the "lang" request parameter of the url it generates this structure in the one language or the other:

I used this:

<xsp:logic>
		if (<xsp-request:get-parameter name="lang"/>.equals("1")){

So that's working fine. My XSL generates an html document, but the problem is, that it has to write different html-code, depending on the language.
This code is something like "Here is your list of countries", or for the other language "Hier ein Liste der Länder".
So depending on the language parameter the html code (here just simple text but this is only an example) has to be different.

The best way to solve this would be something like that (in my eyes)

<xsl:if test="lang&eq;'1'">  <!-- don't know if &eq; stands for = but that's not the problem -->
			<tr>
				<td width="610" height="5" colspan="3"><img width="1" height="1" src="fake.kill/img/pixel.gif"/></td>
			</tr>
</xsl:if>

But how can i pass the paramter from the url to the xsl in a simple way?
Or if there is a complex solution ( read something about creating different kinds of XSL files depending on thta paremter, but it wasn't written how), please give me a detailed description.

Thanks.

Homer30 


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


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.