Product Overview

No Nonsense XML Web Development With PHP

Corrections & Typos

Found a mistake that’s not listed here? You clever monkey! Contact us to let us know!

Confirmed typos in the April 2006 1st edition reprint:

  • p.65 paragraph 5
    |!ELEMENT should be !ELEMENT.
  • p.124 paragraph 1
    "<xsl:when> plays host" should be "<xsl:choose> plays host".
  • p.235 code listing 1
    Line 5 is missing a parenthesis. The code should be as follows:
      while (($file = readdir($handle)) !== FALSE) {

Confirmed typos in the July 2005 1st edition:

  • p.20
    Although the book shows you where to find a validating parser at this point, the current example cannot be checked for validity, because it has no DTD associated with it (see p.14). Validating parsers will come in handy later in the book, but for now if you run the current example XML file (the product listing), you'll get an avalanche of error messages, because the document does not provide a DTD for validation.
  • p.48 paragraph 2
    "whenever there in only whitespace" should be "whenever there is only whitespace".
  • p.134 code listing 3
    The template given here doesn't perform the sort as described. When $SORTBY is given as the value of the <xsl:sort> tag's select attribute, the style sheet simply evaluates the value of $SORTBY (which will always be the same) for each element in the list, which doesn't sort the list at all. To achieve the desired sort, you can use this template instead:
    	<xsl:template match="sitemap">
    <ul>
    <xsl:choose>
    <xsl:when test="$SORTBY='type'">
    <xsl:apply-templates>
    <xsl:sort select="type" />
    </xsl:apply-templates>
    </xsl:when>
    <xsl:when test="$SORTBY='date'">
    <xsl:apply-templates>
    <xsl:sort select="created" />
    </xsl:apply-templates>
    </xsl:when>
    <xsl:otherwise>
    <xsl:apply-templates>
    <xsl:sort select="headline" />
    </xsl:apply-templates>
    </xsl:otherwise>
    </xsl:choose>
    </ul>
    <p><small>sorting by: <u><xsl:value-of select="$SORTBY"/></u></small></p>
    </xsl:template>
  • p.144 code listing 1
    xml should be xsl in the second occurrence of the line
    xml.async = false;
  • p.146 code listing
    xml should be xsl in the second occurrence of the line
    xml.async = false;
  • p.203 paragraph 1
    RDF should be RSS.
  • p.235 code listing 1
    Line 5 is missing a parenthesis. The code should be as follows:
      while (($file = readdir($handle)) !== FALSE) {
  • p.326 code listing 1
    First line ($filename = ...) should be removed.
  • p.331 code listing
    Line beginning with $filename = ... should be removed.
  • p.335 code listing
    Line beginning with $filename = ... should be removed.


Special Bonus

Bonus $9.95 PHP Poster!

FREE with every purchase of ‘No Nonsense XML Web Development With PHP’ made through sitepoint.com (Hard copy only)

PHP Poster

Features:

  • Large, time-saving, format (17” x 24”)
  • Lists all the most commonly-used Array, MySQL, String functions and more.
  • Includes a complete PHP date & time format reference
  • Puts tricky Regular Expressions syntax (POSIX and PCRE) at your fingertips
  • Is ONLY available while stocks last
Take a closer look »
* Note: Hard copy purchases only

SitePoint Books

  • advocate best practice techniques
  • lead you through practical examples
  • provide working code for your web site
  • make learning easy and fun

100% Money Back Guarantee