Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

view the html source of an xml document transformed by xsl

This is a fairly simple case. I have an xml document, linked to an xsl stylesheet, that can be viewed in a web browser. Now that the output is not really what I expected, so I want to look at the (output) html code to see what happened. However, when I say "view source", the browsers just throw the original xml file at me.
Please show me how to view the html source :)

updated
Actually I can view it with Chrome (by right clicking and say "Inspect element"), but that's somewhat browser dependent. Additionally I don't want to install anything just for this small treat. Is there any general solution (i.e. something that works with all (or most) browsers)?

like image 606
phunehehe Avatar asked Sep 25 '09 15:09

phunehehe


People also ask

How can XSLT transform XML into HTML explain with example?

The standard way to transform XML data into other formats is by Extensible Stylesheet Language Transformations (XSLT). You can use the built-in XSLTRANSFORM function to convert XML documents into HTML, plain text, or different XML schemas. XSLT uses stylesheets to convert XML into other data formats.

Is XML with XSLT equivalent to HTML?

With XSLT you can transform an XML document into HTML.


2 Answers

In Firefox, if you select the entire text (eg Ctrl-A) on the page, you can right-click and select "View Selection Source" which will show you what's been rendered, rather than the document source.

like image 137
richsage Avatar answered Sep 28 '22 18:09

richsage


If the browser is Firefox, you can install Firebug and view generated HTML.

like image 22
manji Avatar answered Sep 28 '22 18:09

manji