<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sat, 25 May 2013 22:45:49 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Lukas Smith's Blog: Transforming end user queries to Solr]]></title>
      <guid>http://www.phpdeveloper.org/news/14735</guid>
      <link>http://www.phpdeveloper.org/news/14735</link>
      <description><![CDATA[<p>
In some of his recent work <i>Lukas Smith</i> has been testing the waters of what <a href="http://lucene.apache.org/solr/">Solr</a> (the fast, open source search platform) has to offer. In his work with it he needed a way to convert the queries that come in from users into something Solr can understand. In <a href="http://pooteeweet.org/blog/0/1796#m1796">this new post</a> he explains how and shares the code for his solution (<a href="http://symfony-project.org">symfony</a>-based).
</p>
<blockquote>
In this blog post I want to talk about a <a href="http://github.com/lsmith77/phpSolrQueryParser">prototype class I threw together</a> (Look ma', I'm using git!) by working <a href="http://svn.ezcomponents.org/viewvc.cgi/trunk/Search/src">ezcSearch</a> to help me in parsing and transforming end user queries into complex Solr queries.
</blockquote>
<p>
He includes a few examples of Solr queries and what sort of data they'd return as well as the source for the library he's created to extend the <a href="http://github.com/rande/sfSolrPlugin">sfSolrPlugin</a> translate something coming in from a form into a simple Solr-formatted query.
</p>]]></description>
      <pubDate>Thu, 01 Jul 2010 13:36:07 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ibuildings techPortal: Transforming XML with PHP and XSL]]></title>
      <guid>http://www.phpdeveloper.org/news/13682</guid>
      <link>http://www.phpdeveloper.org/news/13682</link>
      <description><![CDATA[<p>
New on the Ibuildings techPortal today is an article from <i>Michael</i> looking at <a href="http://techportal.ibuildings.com/2009/12/16/transforming-xml-with-php-and-xsl/">XML transformation</a> with PHP and XSL (XML-based "style sheets").
</p>
<blockquote>
If you want to transform XML from one format to another, and especially if either the input or output XML is complicated or the transformation itself is difficult or awkward to express, then XSL may be a good choice. XSL is the eXtensible Stylesheet Language; a family of three W3C recommendations to do with the transformation and presentation of XML documents. This article will walk through some examples of how XSL and PHP can be used to achieve these types of XML tranformations.
</blockquote>
<p>
He starts off by describing what XSL looks like and how it relates back to the XML you're applying it to. XSL allows you to take an XML file and work with it as a data source to pull bits of information out of or modify and push back out the other side. He gives three specific examples: pulling information out of an XML file, rewriting URLs and one of the more handy things PHP allows you to do - directly call PHP script inside the XSL document for those things that the normal XSL standards don't include.
</p>]]></description>
      <pubDate>Wed, 16 Dec 2009 08:35:37 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Adam Jensen's Blog: Output Transformation in a Zend Framework Model Layer]]></title>
      <guid>http://www.phpdeveloper.org/news/12285</guid>
      <link>http://www.phpdeveloper.org/news/12285</link>
      <description><![CDATA[<p>
<i>Adam Jensen</i> has <a href="http://jazzslider.wordpress.com/2009/04/06/output-transformation-in-a-zend-framework-model-layer/">a new post</a> to his blog today looking at a solution he's created to be able to access the raw input a user has entered.
</p>
<blockquote>
I've run into a minor problem, and I'm not sure my solution is particularly ideal. See, the Zend_Form approach described above does a great job of implementing Chris Shiflett's <a href="http://shiflett.org/blog/2005/feb/my-top-two-php-security-practices">Filter Input, Escape Output</a> principle...user input is filtered for invalid HTML before it's ever saved to the model, and can then be escaped as appropriate in the view layer. But what happens if you need to be able to retrieve the user's original unfiltered input later?
</blockquote>
<p>
While working with the raw data could be dangerous, he has created a custom model that, through the getters and setters and doing validation/sanitization and the presentation layer rather than behind the scenes. It's not ideal but he's <a href="http://jazzslider.wordpress.com/2009/04/06/output-transformation-in-a-zend-framework-model-layer/#comments">willing to take suggestions</a>...
</p>]]></description>
      <pubDate>Mon, 06 Apr 2009 13:43:06 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Tim Koschuetzki's Blog: How To Transform HTML To Textile Markup - The CakePHP TextileHelper Revisite]]></title>
      <guid>http://www.phpdeveloper.org/news/8518</guid>
      <link>http://www.phpdeveloper.org/news/8518</link>
      <description><![CDATA[<p>
<i>Tim Koschuetzki</i> has a <a href="http://php-coding-practices.com/cakephp-specific/how-to-transform-html-to-textile-markup-the-cakephp-textilehelper-revisited/">new tutorial</a> posted today for CakePHP users out there - it's a method for transforming HTML content into Textile markup via the TextileHelper CakePHP helper.
</p>
<blockquote>
For a current project of mine I had to find a way to decode html into textile markup. Why? Because we are using tinyMCE to process our textareas as wyciwyg editors, which generate HTML. However, we want all output controlled via textile to allow only the textile tags. Yes, we could do it with strip_tags(), but textile is much more elegant. Plus, it was a requirement by the client. Come on and find out how to detextile html.
</blockquote>
<p>
Code is <a href="http://php-coding-practices.com/cakephp-specific/how-to-transform-html-to-textile-markup-the-cakephp-textilehelper-revisited/">included</a>  to work on the transformation: detextile, processTag, detextile_process_glyphs and detextile_process_lists. An example is included as well, showing how to input a block of HTML content to be "textile-ized". The full code is available for cutting and pasting at the bottom of <a href="http://php-coding-practices.com/cakephp-specific/how-to-transform-html-to-textile-markup-the-cakephp-textilehelper-revisited/">the post</a>.
</p>]]></description>
      <pubDate>Thu, 23 Aug 2007 08:34:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Raphael Stolt's Blog: Transforming data centered XML into SQL statements]]></title>
      <guid>http://www.phpdeveloper.org/news/7798</guid>
      <link>http://www.phpdeveloper.org/news/7798</link>
      <description><![CDATA[<p>
In <a href="http://raphaelstolt.blogspot.com/2007/05/transforming-data-centered-xml-into-sql.html">this new post</a> on <i>Raphael Stolt</i>'s blog, he shows a way that you can take XML that holds SQL information (in his example INSERTs and DELETEs) and transforms them into SQL statements via XSL stylesheets.
</p>
<blockquote>
A canny data import technique that emerged from praxis, while working on the import of data-centered XML resources, is utilitizing the abilities of Xslt. The generation of the required SQL statements actually only needs a simple Xsl stylesheet which might import for an PHP XSLTProcessor object or pass to the <a href="http://xmlsoft.org/XSLT/xsltproc.html">xsltproc</a> command line tool. Both further described approaches are based upon the libxslt library and are assuming the use of XSLT 1.0.
</blockquote>
<p>
He starts with an example bit of XML that has the XSL stylesheet at the top that will be used to transform the data and the information to perform inserts on several "partner" values in the XML below. Following this, he <a href="http://raphaelstolt.blogspot.com/2007/05/transforming-data-centered-xml-into-sql.html">creates</a> a PHP class to load the file and apply the stylesheet.
</p>
<p>
He also mentions a few different approaches to the same problem - XSLTProcessor class approach returning a single SQL string , xsltproc approach and the XSLTProcessor class approach using the ability to use PHP functions as XSLT functions.
</p>]]></description>
      <pubDate>Tue, 08 May 2007 10:27:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Community News: HTML2PHP - Transformation Tool]]></title>
      <guid>http://www.phpdeveloper.org/news/4720</guid>
      <link>http://www.phpdeveloper.org/news/4720</link>
      <description><![CDATA[Via a post over on digg.com today, there's an interesting little tool called <a href="http://www.quasarcr.com/html2php/">HTML2PHP</a> that could be useful in some certain situations.
<p>
<a href="http://www.quasarcr.com/html2php/">The tool</a> takes in whatever text input you have and performs operations on it. For example, paste in some HTML and hit the button to submit it and out the other side pops HTML formatted to echo in PHP (using print). There are other options on the tool - the ability to use printf and echo along with print, to add in newlines, and to add parenthesis (depending on your preference).
<p>
It's nothing overly impressive, but if you have a large block of HTML that you need to work with, you might <a href="http://www.quasarcr.com/html2php/">check into it</a>...]]></description>
      <pubDate>Tue, 24 Jan 2006 07:11:39 -0600</pubDate>
    </item>
  </channel>
</rss>
