reading parameters from URL to XSLT

  • Thread starter Pablo Gomes Ludermir
  • Start date
P

Pablo Gomes Ludermir

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
 
M

Martin Honnen

Pablo Gomes Ludermir wrote:

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.

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top