Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


xsl:param reading a passed parameter in a browser

From: LutzMIRSL@---.---
To: NULL
Date: 2/5/2007 7:40:00 AM

Hi all,

this got to be easy but I can't figure it out.

This is what I am trying to do:

I would like to open a xml-file in a browser and pass a parameter to
it like this:

http://127.0.0.1//searchdata.xml?searchfor=thisword

My xsl looks like this:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/
Transform">

<xsl:template match="/">
	<xsl:param name="searchfor" select="''"/>
	<HTML>
	<HEAD>
	<TITLE></TITLE>
	</HEAD>
	<BODY>
	search for this string: <xsl:value-of select="$searchfor"/><br/>
	</BODY>
	</HTML>
</xsl:template>

</xsl:stylesheet>

So it should just show the parameter that has been passed. - Well, it
doesn't. No error... just blank after the "search for this string:"

What I have found until now:

1) <xsl:param has to be right the next element to <xsl:template
2) It should work when it is done with a xsl-t processor.
3) a lot of people are having similar problems but found a solution in
using different xsl-t engines or whatever ... I have to use the
browsers engine (Internet Explorer 6)

I am going slightly mad ... I must be easy ... I just want to read the
parameter.

I really hope that someone here has a nice idea about this ...



transparent
Print
Mail
Digg
delicious
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent