Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts

    is .xslt a "file type"?

    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?

  • #2
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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).
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #3
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Well that information certainly simplifies the issue... thanks

  • #4
    Regular Coder
    Join Date
    Jun 2002
    Location
    Newcastle, England
    Posts
    178
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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

  • #5
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    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.

  • #6
    Master Coder
    Join Date
    Feb 2003
    Location
    UmeŚ, Sweden
    Posts
    5,575
    Thanks
    0
    Thanked 83 Times in 74 Posts
    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.
    liorean <[lio@wg]>
    Articles: RegEx evolt wsabstract , Named Arguments
    Useful Threads: JavaScript Docs & Refs, FAQ - HTML & CSS Docs, FAQ - XML Doc & Refs
    Moz: JavaScript DOM Interfaces MSDN: JScript DHTML KDE: KJS KHTML Opera: Standards

  • #7
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts
    If you want, you can use the extension .jpeg for your XSLT files.


    that's funny!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •