到目前为止,我使用过的所有 XML / XSLT 都采用 XML 文档,并使用 XSLT 文件将其转换为独立的 HTML 网页。
在我的 Web 应用程序中,我使用 Web 服务来检索 XML 文档,我需要呈现该文档并使之易于阅读,然后将该格式化内容插入母版页中的内容占位符中。
最简单的方法是将 XSLT 附加到检索到的 XML 文件并将其链接到内容占位符,但我知道我不能这样做。
我查看了这些 堆栈 溢出页面,但他们只想渲染直接的XML,而我想要转换后的 XML。另外,我需要能够将其放入我的母版页模板中。
So far all the XML / XSLT I've worked with takes an XML document and transforms it to a standalone HTML webpage using an XSLT file.
In my web application, I'm using a web service to retrieve the XML document, which I need to render and make human-readable, and then insert that formatted content into a content placeholder in my master page.
The easiest way would be to append the XSLT to the retrieved XML file and link that to the content placeholder, but something tells me I can't just do that.
I took a look at these Stack Overflow pages, but they just want to render the straight XML whereas I want a transformed XML. Also, I need to be able to put it into my master page template.
发布评论
评论(1)
本文介绍了如何:
http://www.codeproject.com/Articles/37868/Beginners-Introduction-To-XSL-Transform-Rendering-XML-Data-using-XSL-Get-HTML-output.aspx
即使拼写和我的一样糟糕...
添加了
这里有另一个链接,展示了如何操作,也许更简单一点
http://www.aspfree.com/c/a/XML/Applying-使用 ASP.NET/2/XSLT 转 XML
This article shows how:
http://www.codeproject.com/Articles/37868/Beginners-Introduction-To-XSL-Transform-Rendering-XML-Data-using-XSL-Get-HTML-output.aspx
even if the spelling is as bad as mine...
Added
And here's another link that shows how, perhaps a bit more simply
http://www.aspfree.com/c/a/XML/Applying-XSLT-to-XML-Using-ASP.NET/2/