Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Volker Dusch's Blog:
Creating your custom PHPUnit output formats
Jan 20, 2011 @ 14:36:00

Volker Dusch has a new post to his blog today talking about PHPUnit and how you can make custom output formats to get the results exactly how you need them. The trick is in using XSLT for transformation.

While tackling with someones question i decided it's time to play around with xslt for learning purposes and i found something useful to do. He wanted to extend the --testdox-html output and i proposed to just transform phpunits xml output using an xslt since i didn't see a easy way to prove a custom implemenation for PHPUnit/Util/TestDox/ResultPrinter/HTML.php and i didn't want to change the file its self.

He gives an example of how to use the textdox output method to generate an XML document of the unit test run's results and a simple XSLT style sheet to format the results as a custom HTML page. He uses the "xsltproc" command line tool to make the translation happen.

tagged: phpunit textdox xml xslt convert output format

Link:

Hernani Cerqueira's Blog:
XSLT as a templating engine for PHP
Jan 05, 2010 @ 16:12:57

Hernani Cerqueira has posted a quick introduction to using XSLT (an XML-based markup for styling XML documents) as a templating engine for PHP.

One thing that I miss is a good unobtrusive template engine for PHP. Of course there is smarty, and a bunch of pear packages as well as some other free or commercial projects, and I’m honest to say that I’d never tried none of these, simply because I still see XSLT as a perfectly valid and powerful solution This post is a small tutorial about using XSLT as a templating engine for PHP.

He takes some time to explain what XSLT is and why it's a good choice (from his opinion) for templating your site. A code example is included where he builds a simple XML document (with the DOMDocument functionality of PHP) and creates a XSLT style sheet to take that information and change it into a formatted HTML document. Outputting the result is easy with the creation of a new XSLTProcessor object and a push out the other side with a transformToXML method call.

tagged: xslt template language tutorial

Link:

Community News:
XPath Explained (by Tobias Schlitt and Jacob Westhoff)
Feb 12, 2009 @ 16:28:04

Tobias Schlitt and Jacob Westhoff have written up and article (and posted it over on Tobias' blog) that wants to help you understand XPath better - whether you're a novice or have been using it for a while.

This paper will give an overview on XPath an addressing language for XML documents. XPath is a W3C recommendation currently in version 1.0. XPath was created in relation to the XSL recommendation and is intended to be used with XSLT and XPointer. Beside that, XPath can be used in a variety of programming languages, commonly in combination with a DOM API.

The article starts with an introduction to the concept of XPath, moves on to addressing, talks about XPath axes, mentions functions/operators/conditions and looks at styling XML with XPath and XSLT.

tagged: xpath xslt address axes function operator condition

Link:

Raphael Stolt's Blog:
Getting a visualization of a Phing buildfile
Oct 28, 2008 @ 17:03:41

Raphael Stolt recently spent some time working up a tool to visualize Phing buildfiles and he's blogged about it in this new post.

Out of the box the Phing -l option can be used to get a first overview of all available targets in a given buildfile but it doesn't untangle the target dependencies and sometimes a picture is still worth a thousand words. Luckily the Ant community already provides several tools to accomplish the visualization of Ant buildfiles, reaching from solutions that apply a Xslt stylesheet upon a given buildfile.

Using the ant2dot tool along with the Graphiz graphic library, he transforms the XML from the build file into a simple graphic showing the flow of the build. An example image is included.

tagged: phing visualize buildfile ant2dot graphiz stylesheet tutorial xslt

Link:

IBM developerWorks:
Create a Yahoo! SearchMonkey application
Oct 16, 2008 @ 14:36:20

The IBM developerWorks has a new tutorial they've posted (free registration required) looking at making a Yahoo! SearchMonkey application by combining an RDF document, transforming it with XSLT and binding it all together with PHP.

SearchMonkey is the first product from a mainstream search engine provider that takes advantage of Semantic Web technologies to enable you to produce more relevant search results and thus drive more traffic to your Web site. With common Web development technologies such as PHP, XSLT, and XPath, provide a better experience for searchers as you use structured data encoded in Web pages using Semantic Web standards such as Microformats, eRDF, and RDFa.

They start the tutorial by introducing the SearchMonkey technology and a sample application showing how to interface with it (enhancing the search results for the blogspot.com blogs). The XSLT comes in when formatting the RDF data (DataRSS) by overlaying the data on existing websites.

tagged: rdf xslt tutorial searchmonkey yahoo search result

Link:

Community News:
Liip Job Openings (including PHP/XSLT developer)
Apr 11, 2008 @ 16:25:13

Christian Stocker has pointed out that Liip is hiring, including a position for a PHP/XSLT developer:

With our new office, we have more space, with more space, we can hire more people. Therefore and without further ado, I'll recommend you liip.ch/jobs, if you're looking for an interesting and fulfilling new job in an innovative and fascinating environment.

Details on the PHP position can be found here and info on the others are here: Java/Flash developer, Linux sysadmin and Clerk.

tagged: liip job opening developer xslt

Link:

Community News:
ODF-XSLT Project Released
Jan 09, 2008 @ 18:03:00

A note was passed along to me about a new project that's been created to help make the generation of ODF-XSLT documents simpler - the ODF-XSLT Project from Lone Wolves.

Lone Wolves is happy to announce the ODF-XSLT project [1]. The ODF-XSLT Document Generator is a library written in PHP 5 that brings the full power of XSLT to your OpenDocument files. It enables you to use ODF files as if they were plain XSLT templates. It also includes a few extra parsing options that allow you to edit the XSLT parts of these ODF from within your favourite office suite.

The tool was developed by Tribal Internet Marketing and is being released under a GNU Public license, version 3. You can get more information about the project from its homepage including things like downloads, the manual and their subversion repository address.

tagged: pdf xslt library documentation opendocument document lonewolves pdf xslt library documentation opendocument document lonewolves

Link:

Community News:
ODF-XSLT Project Released
Jan 09, 2008 @ 18:03:00

A note was passed along to me about a new project that's been created to help make the generation of ODF-XSLT documents simpler - the ODF-XSLT Project from Lone Wolves.

Lone Wolves is happy to announce the ODF-XSLT project [1]. The ODF-XSLT Document Generator is a library written in PHP 5 that brings the full power of XSLT to your OpenDocument files. It enables you to use ODF files as if they were plain XSLT templates. It also includes a few extra parsing options that allow you to edit the XSLT parts of these ODF from within your favourite office suite.

The tool was developed by Tribal Internet Marketing and is being released under a GNU Public license, version 3. You can get more information about the project from its homepage including things like downloads, the manual and their subversion repository address.

tagged: pdf xslt library documentation opendocument document lonewolves pdf xslt library documentation opendocument document lonewolves

Link:

Gergely Hodicska's Blog:
What is new in PHP 5.3 - Part 4
Nov 20, 2007 @ 15:38:00

Gergely Hodicska has posted part four of his "what's new in PHP 5.3" series - a sort of "wrapup" for some of the smaller features that have been added. Among them are:

  • __callStatic
  • OpenID support
  • user.ini user defined ini functionality
  • dynamic static calls
  • XSLT profiling

...and many more. Check out the post for more to add to the list and for some brief examples of the ones already mentioned.

tagged: callstatic openid xslt profiling userini new php5 callstatic openid xslt profiling userini new php5

Link:

Gergely Hodicska's Blog:
What is new in PHP 5.3 - Part 4
Nov 20, 2007 @ 15:38:00

Gergely Hodicska has posted part four of his "what's new in PHP 5.3" series - a sort of "wrapup" for some of the smaller features that have been added. Among them are:

  • __callStatic
  • OpenID support
  • user.ini user defined ini functionality
  • dynamic static calls
  • XSLT profiling

...and many more. Check out the post for more to add to the list and for some brief examples of the ones already mentioned.

tagged: callstatic openid xslt profiling userini new php5 callstatic openid xslt profiling userini new php5

Link:


Trending Topics: