Are XslTs clientside or serverside?
I'm coding some XSLts for the company I work for, but they've asked me to make sure the XSLts are clientside (the clients pc does all the work, not our webservers). Is there a way I can ensure this, or are they clientside ANYWAY...?
Public Comments
- XSLT transformations can be performed on either the server or client side, but are generally handled on the server side down to poor/inconsistent support on clients. It sounds like your company is only intending support for IE clients, which is extremely poor form - push them to do the transformations on the server if possible.
- XSLT can be done both on the serverside and client side. To serve client side, you need to be serving your documents as MIME type application/xml and include an XML stylesheet declaration. e.g. <?xml version="1.0" ?> <?xml-stylesheet type="text/xsl" href="/myxslt.xsl"?> <rest of xml document .......> Browsers support is not actually so bad. IE5.5+, FireFox, Safari, Opera, Konqueror will all handle correctly. For extra brownie points you could also implement a browser detect and look for the browers "Accept" header (firefox's accept header looks like: Accept: text/xml, application/xml, application/xhtml+xml, text/html; q=0.9, text/plain; q=0.8, image/png, */*; q=0.5 ) If application/xml is not in the header you can fall back to serverside. The number of clients that you end up serving serverside transforms to will be very small.
Powered by Yahoo! Answers