Chrome refuses to render XML to HTML with XSL
But firefox latest will.
Look up the bug report. I am not going to bother to do the research for you because I am ANGRY about the way it has been handled. A security flaw is claimed, that looking at a local XML file with a XSL file on a different machine is somehow a security flaw when all the XSL does is to generate STATIC HTML. I am pissed because I went and created lots of XML files that now I have to remember do not render with Chromium. I may remember to use Firefox so well that I will make it my default browser and warn visitors to my site that they can't look at my files with Chrome and to use any other browser, since Chrome is the only one with this policy. Tell me, why am I always angry with Google? Is it because it has become the 600 lb. ape in the room? And I feel that way about Apple too.Oh, and here is the real kicker. Chrome won't let you save the static HTML that is generated. That may be a web standard, to keep the product separate from the source, but to not allow one access to the result when a security decision has been made not to allow for possibly dynamic results goes too far when those results are static.
And on top of that, Chrome is so rude that it doesn't even issue an error. It gives the type of message that suggests that your web server is broken or misconfigured. When I use Mozilla with the same local serer and my files reside on the same disk as my home dir, I get no such misleading message. It is as if I should sue chromuim.org for time lost because some engineer is too lazy to say "Sorry, Chromium doesn't render XML to HTML with XSL, anymore."
1 comment:
I am Bruce Salem. I found a solution to the XML problem.
There is a command line tool that comes with Gnome called xsltproc. I takes an XSL/XSLT stylesheet and an XML file and produces an HTML file on stdout, so the command:
$ xsltproc style.xsl foo.xml > foo.html
does the trick. It was much harder to figure out how to get bash to rename a bunch of files from a for loop. I solved this problem by routing the output files to a subdir and then renaming them:
$ mkdir subdir
$ for f in *.xml; do xsltproc style.xsl $f > subdir/$f; done
$ cd subdir
$ for f in *; do mv $f ($f/xml/html); done
After proving that the file type was indeed HTML and not XML. The magic is in the bash substitute that doesn't need an awk on the filenames. neat huh!
Post a Comment