I use XML and XSLT in my current project and I would like to know if it’s good to let the browser render the XML into HTML with stylesheet instead to use something like the PHP xsltprocessor.
One main reason I use the Browser xslt processor is to allows API to access my XML data in a near future. So I want the transformation client-side so my XML is still available.
I might be wrong about the PHP xsltprocessor, but when a xml is processed via PHP , the data received is the rendered XML (in my case HTML) and the XML data is no longer available. Is that right?
Thank you for clearing things out.
It all depends on what your end goal is. I work on an application that produces reports as xml and we send the xml and xslt to the browser to do the processing. There are a few reasons for this approach:
In certain cases we do the transform on the server. e.g. we transform to an html table and then change the http content type to send the result as excel.