6

In Internet Explorer, the default stylesheet used to display XML documents can be found at:

res://msxml.dll/DEFAULTSS.xsl

In Firefox, the equivalent can be found at

chrome://global/content/xml/XMLPrettyPrint.xsl

Is there something equivalent in Chrome?

ObiWanKenobi
  • 14,526
  • 11
  • 45
  • 51

2 Answers2

1

The CSS for the XML viewer specifically is https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/xml/XMLViewer.css. That file, in combination with https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/css/view-source.css, should give you all the detail you need.

Also remember that you're able to use the Web Inspector on XML files to see the rendered HTML, which should help you piece together exactly how the view works.

Mike West
  • 5,097
  • 25
  • 26
  • Great, thanks, the CSS files will be useful, but what I'm really after is the XSLT stylesheet that will transform the XML into HTML. Do you know where I can find that as well? – ObiWanKenobi Feb 27 '12 at 12:54
0

Do have a look at:

https://code.google.com/codesearch#OAMlx_jo-ck/src/third_party/WebKit/Source/WebCore/xml/XMLViewer.js

Also, if you want to see yet another XSLT transformation that produces precise and good-loking in the browser XML representation, do have a look at the transformation used by the XPath Visualizer -- both for IE and for FF.

Dimitre Novatchev
  • 240,661
  • 26
  • 293
  • 431