Mark Wilson I am the creator of TopXML. I am available for international and local (Australia) contracts. I am a Solution Architect/Business Analyst. I have worked in IT in several countries (NZ, Australia, South Africa, UK) building and training teams for government and very large non-governmental organizations. I am ex-Microsoft Consulting Services. I wrote the first book on Microsoft XML published in 2000 called XML Programming with VB and ASP. Most recently I have been building tools for the SEO industry. Ask me for a 37 point SEO health-checkup for your website.
The xslt_process() function is the
crux of the new XSLT extension. It allows you to perform an XSLT transformation
using almost any type of input source - the containers. This is accomplished
through the use of argument buffers -- a concept taken from the Sablotron XSLT processor (currently the only XSLT processor
this extension supports). The input containers default to a filename
'containing' the document to be processed. The result container defaults to a
filename for the transformed document. If the result container is not specified
- i.e. NULL - than the result is returned.
Warning:
This function has changed
its arguments, since version 4.0.6. Do NOT provide the actual XML or XSL
content as 2nd and 3rd argument, as this will create a segmentation fault, in Sablotron versions up to and including 0.95.
The above example produces a html file but sometimes especially for web development, it
is required to print out the result directly into the web browser. So below
example shows hot to use xslt_process() function to produce result as a variable.
// Process the document,
returning the result into the $result variable