A Few Examples
Now that you understand the theory, let’s look at a few examples that put it all in context. This section illustrates some common examples of XSLT usage, including using it to generate documents in multiple formats and transforming a dynamically generated XML document.
Transforming a Dynamically Generated XML Document
The standard transformation approach I’ve been using through this chapter involves reading XML and XSLT data from static files, converting this data into a single string, and processing it all at once with xslt_process(). Most of the time, this process works well; however, as discussed previously, there is an alternative approach that makes it possible to use dynamically generated XML (that is, XML built using data ...
Get XML and PHP now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.