Welcome to WebmasterWorld Guest from

Forum Moderators: httpwebwitch

Message Too Old, No Replies

Calling XSL templates from within hyperlink



12:22 pm on Apr 15, 2010 (gmt 0)

5+ Year Member

I am making my own XSL stylesheet and I want to perform different views and sorting of the data.

My XML file is quite large so i want to avoid diplsying the same data in different views on the same page and it seems pointless.

What i want to do is have some links at the top of the page where i can click a link and be presented with that view.

I had the idea but don't know how to do it and that is to call the template for any view that i wanted.

I would presume it would occur here but no idea how to make it work. Can anyone please help?

<code dump snipped>

[edited by: httpwebwitch at 7:55 pm (utc) on May 21, 2010]
[edit reason] removed code dump [/edit]


7:54 pm on May 21, 2010 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member

You'll need one stylesheet for each kind of view

When the user clicks a link, load the page with a different querystring. Based on the querystring, include a different XSLT stylesheet.


Use a server-side scripting language like PHP to render the right XSLT stylesheet

Featured Threads

Hot Threads This Week

Hot Threads This Month