Connecting Tech Pros Worldwide Forums | Help | Site Map

reading parameters from URL to XSLT

Pablo Gomes Ludermir
Guest
 
Posts: n/a
#1: Jul 20 '05
Hey guys,

I have a simple XML document that I want to put on my website (no
server side programming whatsoever). This xml is rendered using a xslt
document which needs to read some parameter from the URL in order to
know which data from the XML document to show.
It would be something like:

http://www.myserver.com/mydocument.xml?myParam=ABC

I have inserted the param tag (<xsl:param name="myParam"/>), but if I
try to open from the browser it does not work. I am using both IE6 and
Firefox 1.0.

Regards,
Pablo

Martin Honnen
Guest
 
Posts: n/a
#2: Jul 20 '05

re: reading parameters from URL to XSLT




Pablo Gomes Ludermir wrote:

[color=blue]
> I have a simple XML document that I want to put on my website (no
> server side programming whatsoever). This xml is rendered using a xslt
> document which needs to read some parameter from the URL in order to
> know which data from the XML document to show.
> It would be something like:
>
> http://www.myserver.com/mydocument.xml?myParam=ABC
>
> I have inserted the param tag (<xsl:param name="myParam"/>), but if I
> try to open from the browser it does not work. I am using both IE6 and
> Firefox 1.0.[/color]

You would need to put a HTML page on your server that then scripts the
transformation, when you script a transformation you can pass in parameters.
There is no way to read out the query string when the browser does the
transformation automatically.


--

Martin Honnen
http://JavaScript.FAQTs.com/
Closed Thread