Results 1 to 2 of 2
Jul 12, 2011, 10:30 #1
- Join Date
- Jul 2011
- 0 Post(s)
- 0 Thread(s)
transformToFragment on webkit browsers
I just want to document a solution to a problem I was having with transformToFragment.
I was having trouble with XSLTProcessor::transformToFragment() returning null on WebKit browsers (Safari and Chrome). Having read comments about issues with the load() method and xsl:import element, I used XMLHttpRequest and a very simple stylesheet and XML document for testing. Even after having eliminated the well-known problems, I was still disappointed to get a null return value from transformToFragment().
Finally, I noticed that one example used:
<xslutput method="html" />
where I had been using:
<xslutput method="xml" ... />
When I changed my method to "html", the transformToFragment() worked.
I hope this small bit of information will help someone.