I have a TEI XML text that I'm trying to display with XSL. It's at http://jonathanreeve.github.io/corpus-mansfield-garden-party-TEI/garden-party.xml (and the XML/XSL source is at https://github.com/JonathanReeve/corpus-mansfield-garden-party-TEI). Firefox displays it as expected, but it doesn't work in Chrome. Chrome says it doesn't have an associated stylesheet, but it does. How can I get Chrome to display this XML file correctly?
Asked
Active
Viewed 2,885 times
0
-
If removing the slash in your processing instruction doesn't work, you can also try to either use the HTML output method or add the HTML namespace to your result document (see [this question](http://stackoverflow.com/questions/2981524/how-can-i-make-xslt-work-in-chrome)). – nwellnhof Nov 21 '15 at 17:29
2 Answers
1
Remove the slash /
in <?xml-stylesheet type="text/xsl" href="garden-party.xsl"/ ?>
and use <?xml-stylesheet type="text/xsl" href="garden-party.xsl"?>
instead.

Martin Honnen
- 160,499
- 6
- 90
- 110
0
As mentioned in the above answer, removing '/' is not a solution for the given issue.You have to put the .xml and .xsl files (for instance test.xml and test.xsl) in a server (probably in the localhost) and try to access them with the browser - Chrome, with its absolute path. For instance, if it is in the directory called "site" in the localhost, the URL must be http://localhost/site/test.xml and http://localhost/site/test.xsl In this method, the Google Chrome web browser interprets the XML and XSL files Yours Truly [Chathura Wijekoon][1]

Webengineer
- 19
- 5