reading parameters from URL to XSLT

Discussion in 'XML' started by Pablo Gomes Ludermir, Dec 10, 2004.

  1. 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
     
    Pablo Gomes Ludermir, Dec 10, 2004
    #1
    1. Advertising

  2. 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.


    --

    Martin Honnen
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, Dec 10, 2004
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    947
  2. anonymous
    Replies:
    1
    Views:
    4,657
    Francisco Padron
    May 8, 2005
  3. Gaurav  Agarwal
    Replies:
    2
    Views:
    775
    Gaurav Agarwal
    Jan 31, 2005
  4. Just D.
    Replies:
    0
    Views:
    551
    Just D.
    Aug 11, 2004
  5. Randell D.

    Reading parameters using js, from a url

    Randell D., Jul 23, 2005, in forum: Javascript
    Replies:
    1
    Views:
    72
Loading...

Share This Page