XML/XSL Portal

Multiple Stylesheet Aware
HideXML Documenting CodeHide
     
  
 
 

Change Stylesheet

This is an IE5 PowerToy that will allow the user to select the stylesheet of the current document from a list of alternate stylesheets in the xml document.

If your xml document contains.

<?xml-stylesheet type="text/xsl" href="/xml/styles/toc.xsl" title="MainStyle"?>

<?xml-stylesheet type="text/xsl" href="/xml/styles/blue.xsl" title="BlueRooms" alternate="yes"?>

<?xml-stylesheet type="text/xsl" href="/xml/styles/red.xsl" title="RedRooms" alternate="yes"?>

then

MainStyle

BlueRooms

RedRooms

will be available on the menu.

Download

If you are in a situation where you don't want a Power Toy and want to put a button on the page to change the stylesheet like this then download this.

Download

Include the following lines in your XSL

<head> <script language="JavaScript" src="changestylesheet.js"></script> ... </head> ... <button onclick="setupChangeStylesheet()"> <img src="/xml/images/multiple.gif" /> </button>

 
 
  
     
Open

Delete

View XML
View XSL