开发者

Quick question, how can I display my XSL code in a browser

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"/>


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


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜