如何实现xsl [英] How to implement xsl

查看:112
本文介绍了如何实现xsl的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是所有这一切的新手,我一直在寻找地狱,并且找不到任何先前知识缺乏的指南。因此,如果你能尽可能简单地保持答案,那对我们新手来说会很好:)

I'm new to all of this, and I've been searching like hell, and can't find any guide that assumes little prior knowledge. So if you could keep answers as simple as possible, that would be great for us newbies :)

我有一个文件,xml.xml,我想要转换使用另一个名为xslt.xsl的文件

I have a document, xml.xml, that I would like to transform using another file called xslt.xsl

我使用了 W3schools tryit编辑器获取这两个文件的代码。

I've used the W3schools tryit editor to get the code for both files.

现在我如何让它们到达在我的电脑上一起工作?

Now how do I get them to work together on my computer?

我试过添加

<?xml-stylesheet type='text/xsl" href="http://www.dansitrepairs.com/XSLT.xsl"?>

到我的xml文件的第二行,但它不起作用。

to the second line of my xml file, but it doesn't work.

我尝试将其链接到Dreamweaver和msxsl也是。显然我必须忽略一些重要的东西,因为它不应该这么难(我不认为)

I've tried linking it in Dreamweaver and msxsl too. Clearly I must have ignored something important, because it shouldn't be this hard (I don't think)

谢谢

已添加

作为outili在评论中,部分是由于我提供的代码中的拼写错误,即type ='text / xsl应该是双引号。

As outilined in the comments, it was partly due to a typo in the code I provided, namely type='text/xsl" should be double quoted.

但是,它只是两个文件都是本地文件时有效。当xsl引用在服务器上时,我得到的不是我想要的:

However, it only works when both files are local. When the xsl reference is on a server, I get this instead of what I want:

已添加#2


可能是在您的浏览器上实现的跨源策略。当两个文件都位于同一域上的服务器上时,
应该有效。

It probably is a cross-origin policy implemented on your browser. It should work when both files are on a server on the same domain.

这是另一个问题

推荐答案

它可能是在您的浏览器上实施的跨源策略。当两个文件都位于同一域上的服务器上时,它应该有效。

It probably is a cross-origin policy implemented on your browser. It should work when both files are on a server on the same domain.

这篇关于如何实现xsl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆