Topic: XSLT and Query Strings (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=11163" title="Pages that link to Topic: XSLT and Query Strings (Page 1 of 1)" rel="nofollow" >Topic: XSLT and Query Strings <span class="small">(Page 1 of 1)</span>\

 
pitcher17
Obsessive-Compulsive (I) Inmate

From: Canada
Insane since: Feb 2004

posted posted 03-04-2004 17:16

Does anyone know of a way to access a value from a query string within an XSLT (.xsl) document in order to change the behaviour of the transformation in some way?

Thanks.


We don't stop laughing because we grow old. We grow old because we stop laughing.

Cameron
Bipolar (III) Inmate

From: Brisbane
Insane since: Jan 2003

posted posted 03-04-2004 18:34

AFAIK, XSL(T) is only conserned with XML data, not meta data about the means in which a document is retrived. Seing as the URI of the document has very little to with the data the document contains, you really shouldn't be wanting to process this with XSL anyways.

You should use a scripting language (like PHP, ASP or maybe Javascript) when you want to process URI data.

Q: I'm curious, why would you need to do this anyhow?

Karl
Bipolar (III) Inmate

From: Phoenix
Insane since: Jul 2001

posted posted 03-05-2004 16:41

Pitcher,
Cameron is right, XSLT is not aware of the querystring value in the browser. You can easily pass the value to XSLT using server side code, like ASP. What I tend to do is convert the entire querystring to a XML piece (again, using ASP) ending up with something like this:

<QUERYSTRING>
<Q name="user_name">Karlos</Q>
<Q name="icq_num">22861496</Q>
</QUERYSTRING>


More on XSLT parameters (straight out of XML Core SDK):

Passing Values into XSLT Using Global Parameters
To pass a value into an XSLT style sheet at run time, you must perform the following steps.

Declare a global XSLT parameter in the style sheet.
Call the addParameter method on the XSLProcessor object, from a script, to assign a value to the parameter.

... the rest of this found here --- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsdk/htm/xsl_advanced1_82yb.asp

Karl

pitcher17
Obsessive-Compulsive (I) Inmate

From: Canada
Insane since: Feb 2004

posted posted 04-10-2004 06:34

Thanks for the help guys.

We don't stop laughing because we grow old. We grow old because we stop laughing.



Post Reply
 
Your User Name:
Your Password:
Login Options:
 
Your Text:
Loading...
Options:


« BackwardsOnwards »

Show Forum Drop Down Menu