...

View Full Version : is .xslt a "file type"?



swmr
05-16-2003, 12:36 PM
I have downloaded a couple of coding examples from online articles which use .xslt files, but I have no support for *.xslt, so I was wondering what my system is missing to recognize this file-type...

... in other words, should I have an icon for .xslt files--just as I do for .xsl--or should XSLT be saved as .xsl, instead?

liorean
05-16-2003, 02:55 PM
Chose whatever file extension you wish. No one is better than the next one. The only thing that counts, is that the file is sent with the correct Content-Type header, namely 'text/xml' (not 'text/xslt' as Microsoft seems to believe).

swmr
05-16-2003, 06:13 PM
Well that information certainly simplifies the issue... thanks :)

mpjbrennan
05-16-2003, 11:04 PM
Liorean,

Are you sure you have that right? I thought you have to give an xsl stylesheet the .xml suffix, but put text/xsl in the header to ensure that it renders in both Mozilla &c. and IE.

Clarification would be appreciated.

patrick

jkd
05-16-2003, 11:26 PM
Originally posted by mpjbrennan
Liorean,

Are you sure you have that right? I thought you have to give an xsl stylesheet the .xml suffix, but put text/xsl in the header to ensure that it renders in both Mozilla &c. and IE.

Clarification would be appreciated.

patrick

The file extension never matters. Because IE is stupid, put text/xsl in the <?xml-stylesheet?> processing instruction, but serve as text/xml or application/xml.

liorean
05-16-2003, 11:32 PM
If you want, you can use the extension .jpeg for your XSLT files. The ONLY thing that matters is the HTTP Content-Type header - at least for files that are served over the HTTP protocol. As Jason said, you have to use 'text/xsl' in the xml-stylesheet PI to get IE to interpret the file, though. IE has a faulty content type handling - a bit strange, in fact, since both NCSA Mosaic and Netscape Navigator, it's predecessors/competitors has had correct content-type handling since before Microsoft even looked at the internet as their business area.

swmr
05-17-2003, 04:16 AM
If you want, you can use the extension .jpeg for your XSLT files.

:D that's funny! :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum