473,320 Members | 1,947 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

reading variables from a URL in an XSL page.

Hi,

Trying to display only a certain type of data depending on a variable
passed through a url. For example if I had a list of CDs and I wanted
to display only the ones by greenday I would pass the variable
greenday via the url (http://www.somewhere.com/CDs.xml?
artist=greenday)

so I could then use: <xsl:for-each select="catalog/
cd[artist='greenday']">

I'm not sure how to retrieve the artist from the URL? I have accepted
the possibility that I may not be able to retrieve the data in this
way at all. If that is the case what is another method I could use?

Thanks,
Oliver

Apr 30 '07 #1
2 2434
It sounds like you're looking for the document() function.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Apr 30 '07 #2
McGowan wrote:
Trying to display only a certain type of data depending on a variable
passed through a url. For example if I had a list of CDs and I wanted
to display only the ones by greenday I would pass the variable
greenday via the url (http://www.somewhere.com/CDs.xml?
artist=greenday)

so I could then use: <xsl:for-each select="catalog/
cd[artist='greenday']">
If you have server-side scripting (e.g. ASP or JSP or PHP or similar)
then you can solve it like this
http://example.com/transform.asp?xml...rtist=greenday
where your server-side script reads out the query string to find the XML
document and possible parameters, then loads the stylesheet and an XSLT
processor to pass in the parameters (stylesheet needs e.g.
<xsl:param name="artist"/>
), runs the transformation and sends the transformation result (e.g.
HTML document) back to the client.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Apr 30 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Sugapablo | last post by:
I have a dynamic form that that creates input variables named different things based on what it reads from the database. So, for example, it may create three fields, named ex12, ex23, and ex45...
4
by: Xah Lee | last post by:
# -*- coding: utf-8 -*- # Python # to open a file and write to file # do f=open('xfile.txt','w') # this creates a file "object" and name it f. # the second argument of open can be
5
by: Phil Grimpo | last post by:
I have a very odd situation here. I have an administration page, where based on a users permissions, a recordset is called from the SQL server which has a list of paths to "Module Menus". Each of...
2
by: ven | last post by:
Hello i have a question about two aspx files...I have a variable in one page called login.aspx and when user correctly loged another page is opening...this second page is called default.aspx.......
4
by: darrel | last post by:
Karl has helped me in the past in regards to communicating between controls and pages: http://www.openmymind.net/communication/index.html#3.1 I ended up going down the interfaces path and...
1
by: Francis | last post by:
Hello, I am trying to build a webapplication in ASP, vbscript, that keeps a logfile (database) with the exact time and page of the visit by a registered user. Is it possible to build a running...
10
by: EOZyo | last post by:
Hi, i'm trying to set pagination for a search i run on my website, i'll try to explain the easiest i can: When i click the search button on search.php, data is received and stored in variables...
3
by: yossimotro | last post by:
Hi, I have a class in the APP_CODE folder which needs access to Session variables. When I try to read them I the following error: Session state can only be used when enableSessionState is set...
6
by: efrenba | last post by:
Hi, I came from delphi world and now I'm doing my first steps in C++. I'm using C++builder because its ide is like delphi although I'm trying to avoid the vcl. I need to insert new features...
19
by: Hapa | last post by:
Does only reading (never writing) of a variable need thread synchronisation? Thanks for help? PS. Anybody knows a Visual C++ news group?
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.