views:

156

answers:

2

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  A: 

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/

David Stratton
That first link did the trick, even if I had to think about every other misspelled word. Weird how his spelling is horrendous but his grammar is fine.
tridium
A: 

Time ago I wrote a little example on a subset of this problem, sorry, it's in italian, but I think the code is understandable anyway.

link

tanathos