Topic: XSLT styleswitching (Page 1 of 1) |
|
---|---|
Neurotic (0) Inmate Newly admitted From: |
posted 08-29-2004 21:39
Is there a way of switching XsLT styles in a similar way that Sowdon's styleswitcher does for css? If possible, I would like to port the user choices I have on http://smirk.herts.ac.uk to pages controlled by xslt. |
Paranoid (IV) Inmate From: Brisbane, Australia |
posted 08-29-2004 21:58
Not that I'm aware of, and given the way you declare XSLT I highly doubt it. |
Obsessive-Compulsive (I) Inmate From: |
posted 08-29-2004 23:45
thanks, Cameron. The skin change I want is for a fairly complicated xhtml+smil output and thus xsl(t)is being favoured. Thus, the only browser support is IE5.5 or above but that is ok in the sense that what we achieve is not supported by other browsers but we also output a pure smil version for realplayer, etc. For reasons of accessibility, our audience (university students) needs to be able to change background and font colour on only a section of the output. I was hoping that somebody had already written and tested some javascript to do this at the browser level. |
Paranoid (IV) Inmate From: schillmania.com |
posted 10-20-2004 02:59
You -could- do this client-side via the XMLHTTP object etc. (just recreate the XSLT object and load a new stylesheet into it) - but this would only work on IE 5.x/win32 and Mozilla 1-point-something. I don't think Safari (1.2 currently out at time of writing) has a native Javascript XSLT processor. code: var xmlFile = "file.xml";
|
Bipolar (III) Inmate From: Umeå, Sweden |
posted 10-20-2004 03:16
Well, it's kinda hard to do a style switcher for XSLT - XSLT isn't a style sheet language, it's a transformation sheet language. It works by changing the document into another structure. XSLT transforms a source document into another generated document. The DOM works on this generated document, not the source document, and thus you can't use the DOM for changing the transformation sheet. At least, I don't think there is a good API for doing it. I'd hunt around http://unstable.elemental.com/mozilla and http://msdn.microsoft.com/ before I say anything more final, though, there might be APIs that I have overlooked. |