tags:

views:

45

answers:

3

Hello! I'm learning XSLT and, for testing purposes, would like be able to simply display my XSL code inside of a browser via a link from another page. With the following anchor tag...

<a href="transform.xsl">My Test XSL Transform Code</a>

The code isn't displayed when the link is clicked, it's executed. How can I display the code when I click that link?

Thanks in advance for all your help!

UPDATE

I found the solution, it was to add the following line at the top of my XSL stylesheet...

<xsl:output method="html" version="4.0" encoding="iso-8859-1" indent="yes"/>
A: 

Not sure about doing this with a web browser (other than changing the mime type, which can be a pain), but you may consider using an XML editor for that purpose. There are a few free ones, such as

mjv
A: 

rename it, or create a server side script that reads it and pushes it's textual form.

Sinan
A: 

Below is an XSL document that opens in IE when I serve it from LocalHost. What does yours look like? Are you referencing your target in it?

No Refunds No Returns