RE: [xsl] Using URL parameters in XSL

Subject: RE: [xsl] Using URL parameters in XSL
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 12 Aug 2003 08:37:56 +0100
> This all taking place in a local environment, in a web 
> browser. In fact 
> it's a web page which generates the parameter (the whole URL 
> to the XML 
> file, actually) which somehow needs to be passed to the XSLT code in 
> question. I don't see how that web page can have the facility to pass 
> them into the XSLT code as parameters.

Of course you can pass parameters into the transformation when you
invoke it from script on your HTML page.

Are you saying that you are invoking the transformation using the
<?xml-stylesheet?> PI? If that's the case, then I agree your options are
very limited.

Michael Kay


 You're talking about the 
> application writing out the XSLT with the pertinent parameter intact, 
> right? Or am I misunderstanding? Any way to pass info from 
> one page to 
> another, such that the xslt processor in the second page can 
> get access 
> to that info before the transform, in a local environment, would be 
> sufficient, but I'm starting to think I will have to use a 
> much messier 
> javascript solution.
> 
> Thanks,
> 
> J
> 
> On Monday, August 11, 2003, at 02:12 AM, Michael Kay wrote:
> 
> > You need to extract the relevant components of the URL in 
> the calling 
> > application, and pass them from the application to the XSLT code as 
> > stylesheet parameters.
> >
> > Michael Kay
> >>
> >> Hi,
> >>
> >> I'm trying to gain access to the URL parameters used to 
> load an xml 
> >> file. For instance, can robin.xsl, used to process batman.xml, get 
> >> the imageNum parameter in its URL?
> >>
> >> http://bla.bla/batman.xml?imageNum=3
> --
> Julian Wood
> 
> Programmer/Analyst
> Learning Commons, University of Calgary
> 
> 
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread