05.05.2013 Views

Programming PHP

Programming PHP

Programming PHP

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Example 11-12. News XSL transform<br />

<br />

<br />

<br />

<br />

<br />

<br />

Current Stories<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

()<br />

<br />

[ More ]<br />

<br />

<br />

<br />

<br />

<br />

Example 11-13 is the very small amount of code necessary to transform the XML<br />

document into an HTML document using the XSL style sheet. We create a processor,<br />

run the files through it, and print the result.<br />

Example 11-13. XSL transformation from files<br />

<br />

Example 11-14 contains the same transformation as Example 10-13 but uses XML<br />

and XSL values from an array instead of going directly to files. In this example there’s<br />

This is the Title of the Book, eMatter Edition<br />

Copyright © 2002 O’Reilly & Associates, Inc. All rights reserved.<br />

Transforming XML with XSLT | 279

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!