473,614 Members | 2,328 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dynamically switching between different XSLT stylesheets

20 New Member
Hello,

I'd like to use XML + XSLT to create a sortable table. The XML stores the data, and two different XSL stylesheets display the table, sorted in two different ways. What I don't understand is how to allow the user to switch between the two stylesheets (and hence two sorting options).

I can provide code snippets if that would help, but I'm basically looking for the general concept here - how can you dynamically switch XSLT stylesheets (if it's helpful, my reference point is CSS stylesheets, which are pretty easy to switch using php)?

Thanks!
Nov 30 '07 #1
2 2655
Dököll
2,364 Recognized Expert Top Contributor
Hello,

I'd like to use XML + XSLT to create a sortable table. The XML stores the data, and two different XSL stylesheets display the table, sorted in two different ways. What I don't understand is how to allow the user to switch between the two stylesheets (and hence two sorting options).

I can provide code snippets if that would help, but I'm basically looking for the general concept here - how can you dynamically switch XSLT stylesheets (if it's helpful, my reference point is CSS stylesheets, which are pretty easy to switch using php)?

Thanks!
Hello, TAL651!

Here's an example code I pulled up for you, see if that helps:
http://www.xml.com/pub/a/2000/07/26/xslt/xsltstyle.html

Have a good week-end!
Dec 1 '07 #2
TAL651
20 New Member
Thanks for that webpage; looks promising!
Dec 16 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

3
2186
by: Andy Dingley | last post by:
I've just started on a new project and inherited a huge pile of XSLT (and I use the term "pile" advisedly !) It runs at glacial speed, and I need to fix this this. Platform is MSXML 4 / ASP Any advice on benchmarking tools / techniques ? I have no budget for tool-building, so if there's anything already out there, that would be good to know.
1
1360
by: Piet L. | last post by:
hey, I have a huge database (MySQL), and now I want to display that information on my website. I want to organize it in such way that the user can say what he wants to see. For example, only cd's from the years 2000, or all books from author x, ... I'v looked around on the net, and this is what I came up with: use a script that returns xml, use xslt to extract the wanted information out of the xml, in the right order, formatted in the
1
2159
by: Mr. Clean | last post by:
Am I able to switch xsl stylesheets on the fly? I need to have three different stylesheets for specific sorting criteria as well as some specif xsl:choose elements.
6
2857
by: David Walker | last post by:
Hi, I have an XML file created by a third party in which an element with a simple content model has a text value consisting of 2 parts separated by a colon, like this <link>machine:port</link> Is XSLT capable of parsing the value of a <link> element, to separately extract the portions before and after the colon?
3
2002
by: thomas.porschberg | last post by:
Hi, I want to read records from a database and export it in an arbitrary format. My idea was to feed a class with a String array fetched from the database and let this class fire SAX events as processor input. The basic class hierarchy is:
4
3641
by: Ed Jay | last post by:
I generate a DHTML page (a medical report) with dynamically generated text based on user input (answers to questions). The page length changes dynamically. I desire that when the page is printed and reaches a specific length, it terminates printing that page, prints a page number, and then begins to print the next page using the same header and format as the previous page. The page uses no tables or paragraph elements, only CSS. IOW, I...
1
2411
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT stylesheets, that generates .NET assemblies) 2. Performance improvements in the XslCompiledTransform
5
1584
by: maya | last post by:
hi, I'm using this script to switch stylesheets dynamically (in response to user input..) http://www.dynamicdrive.com/dynamicindex9/stylesheetswitcher.htm (sorry can't show url, am in process of changing webhosts right now..) it works pretty well, when user switches from page to page colors are
1
1673
by: Dave Rado | last post by:
Hi A while ago I discovered a way of creating css pseudo-frames, that offer users the important benefits of real frames (i.e. the navigation remains visible when you scroll down the page), but without most of the drawbacks (in particular, unlike real frames, this method is bookmarks-friendly and search engine-friendly). However, the method still has sufficient drawbacks from an accessibility point of view that I have been planning to...
0
8198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8142
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8591
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8444
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4058
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4138
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2575
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1438
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.