You changed the question after I received it. (Don't know how you do that...)
Generally, the answer is to extract the query parameters from the URL in the calling application and pass them as stylesheet parameters to the transformation.
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference