Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Apress
committed
Oct 7, 2016
0 parents
commit c7b8262
Showing
125 changed files
with
5,392 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,195 @@ | ||
<html xmlns:o="urn:schemas-microsoft-com:office:office" | ||
xmlns:w="urn:schemas-microsoft-com:office:word" | ||
xmlns="http://www.w3.org/TR/REC-html40"> | ||
|
||
<head> | ||
<meta http-equiv=Content-Type content="text/html; charset=windows-1252"> | ||
<meta name=ProgId content=Word.Document> | ||
<meta name=Generator content="Microsoft Word 11"> | ||
<meta name=Originator content="Microsoft Word 11"> | ||
<link rel=File-List href="errata_6331_files/filelist.xml"> | ||
<link rel=Preview href="errata_6331_files/preview.wmf"> | ||
<title>Errata for 419-3 Trolsen (corrected in the second printing)</title> | ||
<!--[if gte mso 9]><xml> | ||
<o:DocumentProperties> | ||
<o:Author>Richard Ables</o:Author> | ||
<o:LastAuthor>Nicole Faraclas</o:LastAuthor> | ||
<o:Revision>2</o:Revision> | ||
<o:TotalTime>3</o:TotalTime> | ||
<o:Created>2006-10-12T21:56:00Z</o:Created> | ||
<o:LastSaved>2006-10-12T21:56:00Z</o:LastSaved> | ||
<o:Pages>1</o:Pages> | ||
<o:Words>51</o:Words> | ||
<o:Characters>295</o:Characters> | ||
<o:Company>Apress</o:Company> | ||
<o:Lines>2</o:Lines> | ||
<o:Paragraphs>1</o:Paragraphs> | ||
<o:CharactersWithSpaces>345</o:CharactersWithSpaces> | ||
<o:Version>11.6568</o:Version> | ||
</o:DocumentProperties> | ||
</xml><![endif]--><!--[if gte mso 9]><xml> | ||
<w:WordDocument> | ||
<w:SpellingState>Clean</w:SpellingState> | ||
<w:GrammarState>Clean</w:GrammarState> | ||
<w:DisplayHorizontalDrawingGridEvery>0</w:DisplayHorizontalDrawingGridEvery> | ||
<w:DisplayVerticalDrawingGridEvery>0</w:DisplayVerticalDrawingGridEvery> | ||
<w:UseMarginsForDrawingGridOrigin/> | ||
<w:ValidateAgainstSchemas/> | ||
<w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> | ||
<w:IgnoreMixedContent>false</w:IgnoreMixedContent> | ||
<w:AlwaysShowPlaceholderText>false</w:AlwaysShowPlaceholderText> | ||
<w:Compatibility> | ||
<w:BreakWrappedTables/> | ||
<w:SnapToGridInCell/> | ||
<w:WrapTextWithPunct/> | ||
<w:UseAsianBreakRules/> | ||
<w:UseWord2002TableStyleRules/> | ||
</w:Compatibility> | ||
<w:BrowserLevel>MicrosoftInternetExplorer4</w:BrowserLevel> | ||
</w:WordDocument> | ||
</xml><![endif]--><!--[if gte mso 9]><xml> | ||
<w:LatentStyles DefLockedState="false" LatentStyleCount="156"> | ||
</w:LatentStyles> | ||
</xml><![endif]--> | ||
<style> | ||
<!-- | ||
/* Font Definitions */ | ||
@font-face | ||
{font-family:Verdana-Bold; | ||
panose-1:0 0 0 0 0 0 0 0 0 0; | ||
mso-font-alt:Verdana; | ||
mso-font-charset:77; | ||
mso-generic-font-family:auto; | ||
mso-font-format:other; | ||
mso-font-pitch:auto; | ||
mso-font-signature:50331648 0 0 0 1 0;} | ||
@font-face | ||
{font-family:Verdana; | ||
panose-1:2 11 6 4 3 5 4 4 2 4; | ||
mso-font-charset:0; | ||
mso-generic-font-family:swiss; | ||
mso-font-pitch:variable; | ||
mso-font-signature:536871559 0 0 0 415 0;} | ||
/* Style Definitions */ | ||
p.MsoNormal, li.MsoNormal, div.MsoNormal | ||
{mso-style-parent:""; | ||
margin:0in; | ||
margin-bottom:.0001pt; | ||
mso-pagination:widow-orphan; | ||
font-size:12.0pt; | ||
font-family:"Times New Roman"; | ||
mso-fareast-font-family:"Times New Roman";} | ||
span.SpellE | ||
{mso-style-name:""; | ||
mso-spl-e:yes;} | ||
span.GramE | ||
{mso-style-name:""; | ||
mso-gram-e:yes;} | ||
@page Section1 | ||
{size:8.5in 11.0in; | ||
margin:1.0in 1.25in 1.0in 1.0in; | ||
mso-header-margin:.5in; | ||
mso-footer-margin:.5in; | ||
mso-paper-source:0;} | ||
div.Section1 | ||
{page:Section1;} | ||
--> | ||
</style> | ||
<!--[if gte mso 10]> | ||
<style> | ||
/* Style Definitions */ | ||
table.MsoNormalTable | ||
{mso-style-name:"Table Normal"; | ||
mso-tstyle-rowband-size:0; | ||
mso-tstyle-colband-size:0; | ||
mso-style-noshow:yes; | ||
mso-style-parent:""; | ||
mso-padding-alt:0in 5.4pt 0in 5.4pt; | ||
mso-para-margin:0in; | ||
mso-para-margin-bottom:.0001pt; | ||
mso-pagination:widow-orphan; | ||
font-size:10.0pt; | ||
font-family:"Times New Roman"; | ||
mso-ansi-language:#0400; | ||
mso-fareast-language:#0400; | ||
mso-bidi-language:#0400;} | ||
</style> | ||
<![endif]--> | ||
</head> | ||
|
||
<body lang=EN-US style='tab-interval:.5in'> | ||
|
||
<div class=Section1> | ||
|
||
<p class=MsoNormal>Errata for 1-59059-633-1 </p> | ||
|
||
<table class=MsoNormalTable border=1 cellspacing=0 cellpadding=0 width=939 | ||
style='width:563.4pt;border-collapse:collapse;border:none;mso-border-top-alt: | ||
solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;mso-border-right-alt: | ||
solid gray 1.0pt;mso-padding-alt:0in 5.4pt 0in 5.4pt'> | ||
<tr style='mso-yfti-irow:0;mso-yfti-firstrow:yes'> | ||
<td width=84 style='width:.7in;border:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; | ||
mso-layout-grid-align:none;text-autospace:none'><b style='mso-bidi-font-weight: | ||
normal'><span style='font-size:14.0pt;mso-bidi-font-size:16.0pt;font-family: | ||
Verdana-Bold;mso-hansi-font-family:Verdana-Bold;mso-bidi-font-family:"Times New Roman"; | ||
color:#333333'>Page</span></b><span style='font-size:14.0pt;mso-bidi-font-size: | ||
16.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> | ||
</td> | ||
<td width=428 style='width:256.5pt;border:solid gray 1.0pt;border-left:none; | ||
mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; | ||
mso-layout-grid-align:none;text-autospace:none'><b style='mso-bidi-font-weight: | ||
normal'><span style='font-size:14.0pt;mso-bidi-font-size:16.0pt;font-family: | ||
Verdana-Bold;mso-hansi-font-family:Verdana-Bold;mso-bidi-font-family:"Times New Roman"; | ||
color:#333333'>Original Text</span></b><span style='font-size:14.0pt; | ||
mso-bidi-font-size:16.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> | ||
</td> | ||
<td width=428 style='width:256.5pt;border:solid gray 1.0pt;border-left:none; | ||
mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; | ||
mso-layout-grid-align:none;text-autospace:none'><b style='mso-bidi-font-weight: | ||
normal'><span style='font-size:14.0pt;mso-bidi-font-size:16.0pt;font-family: | ||
Verdana-Bold;mso-hansi-font-family:Verdana-Bold;mso-bidi-font-family:"Times New Roman"; | ||
color:#333333'>Corrected Text</span></b><span style='font-size:14.0pt; | ||
mso-bidi-font-size:16.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> | ||
</td> | ||
</tr> | ||
<tr style='mso-yfti-irow:1;mso-yfti-lastrow:yes'> | ||
<td width=84 style='width:.7in;border:solid gray 1.0pt;border-top:none; | ||
mso-border-top-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;tab-stops:28.0pt 56.0pt 84.0pt 112.0pt 140.0pt 168.0pt 196.0pt 224.0pt 3.5in 280.0pt 308.0pt 336.0pt; | ||
mso-layout-grid-align:none;text-autospace:none'><span style='font-size:11.0pt; | ||
mso-bidi-font-size:16.0pt;font-family:Verdana;color:#333333'>189<o:p></o:p></span></p> | ||
</td> | ||
<td width=428 style='width:256.5pt;border-top:none;border-left:none; | ||
border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: | ||
solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;mso-layout-grid-align:none; | ||
text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>Using | ||
the instantiated object, $<span class=SpellE>dom</span>, you can build the | ||
tree using load() to load from a string and using <span class=SpellE>loadXML</span>() | ||
to load from a resource</span><span style='font-size:11.0pt;mso-bidi-font-size: | ||
16.0pt;font-family:Verdana;color:#333333'><o:p></o:p></span></p> | ||
</td> | ||
<td width=428 style='width:256.5pt;border-top:none;border-left:none; | ||
border-bottom:solid gray 1.0pt;border-right:solid gray 1.0pt;mso-border-top-alt: | ||
solid gray 1.0pt;mso-border-left-alt:solid gray 1.0pt;padding:0in 5.4pt 0in 5.4pt'> | ||
<p class=MsoNormal style='mso-pagination:none;mso-layout-grid-align:none; | ||
text-autospace:none'><span style='font-size:10.0pt;font-family:"Courier New"'>Using | ||
the instantiated object, $<span class=SpellE>dom</span>, you can build the | ||
tree using <span class=SpellE><span class=GramE>loadXML</span></span><span | ||
class=GramE>(</span>) to load from a string and using load() to load from a | ||
resource.</span><span style='font-size:11.0pt;mso-bidi-font-size:16.0pt; | ||
font-family:Verdana;color:#333333'><o:p></o:p></span></p> | ||
</td> | ||
</tr> | ||
</table> | ||
|
||
<p class=MsoNormal><o:p> </o:p></p> | ||
|
||
</div> | ||
|
||
</body> | ||
|
||
</html> |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
$isostring = "contenu d'élément"; | ||
|
||
/* Conversions from ISO-8859-1 to UTF-8 */ | ||
$utf8string = iconv("ISO-8859-1", "UTF-8", $isostring); | ||
$uft8string2 = mb_convert_encoding($isostring, "UTF-8", "ISO-8859-1"); | ||
|
||
/* Additional DOM code here */ | ||
$newelement = new DOMElement('newelement', $utf8string); | ||
$newelement2 = new DOMElement('newelement2', $utf8string2); | ||
/* Additional DOM code here */ | ||
|
||
/* Retrieve the content from newelement set above */ | ||
$value = $newelement->nodeValue; | ||
|
||
/* Conversions from UTF-8 to ISO-8859-1 */ | ||
$isostring1 = iconv("UTF-8", "ISO-8859-1", $value); | ||
$isostring2 = mb_convert_encoding($value, "ISO-8859-1", "UTF-8"); | ||
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<test xmlns:xi="http://www.w3.org/2001/XInclude"> | ||
<xi:include href="testxinclude.xml" parse="xml" /> | ||
</test> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<testinclude>Included Content</testinclude> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?php | ||
/* Document Nodes */ | ||
$doctype = DOMImplementation:: createDocumentType("book", | ||
"-//OASIS//DTD DocBook XML V4.1.2//EN", | ||
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"); | ||
$dom = DOMImplementation:: createDocument(NULL, "book", $doctype); | ||
|
||
$dom->encoding = "UTF-8"; | ||
|
||
|
||
/* Creating Elements */ | ||
$bookinfo = $dom->createElement("bookinfo"); | ||
|
||
$bititle = $dom->createElement("title", "DOM in PHP 5"); | ||
|
||
$biauthor = $dom->createElementNS(NULL, "author"); | ||
|
||
$trash = $dom->createElementNS("http://www.example.com/trash", "tr:trash"); | ||
|
||
$firstname = new DOMElement("firstname", "Rob"); | ||
$surname = new DOMElement("surname", "Richards"); | ||
|
||
try { | ||
$test = new DOMElement("123"); | ||
} catch (DOMException $e) { | ||
var_dump($e); | ||
} | ||
|
||
$nsElement = new DOMElement("nse:myelement", NULL, "http://www.example.com/ns"); | ||
|
||
|
||
/* Inserting Elements */ | ||
$dom->documentElement->appendChild($bookinfo); | ||
|
||
$biauthor->appendChild($surname); | ||
$biauthor->insertBefore($firstname, $surname); | ||
|
||
$biauthor->appendChild($firstname); | ||
$biauthor->appendChild($surname); | ||
|
||
$bookinfo->appendChild($biauthor); | ||
|
||
$dom->formatOutput = TRUE; | ||
print $dom->saveXML(); | ||
|
||
|
||
$bookinfo->insertBefore($bititle, $biauthor); | ||
|
||
|
||
/* Attribute Nodes */ | ||
$bookinfo->setAttribute("lang", "en"); | ||
|
||
|
||
/* Text Nodes */ | ||
$yeartxt = $dom->createTextNode("2005"); | ||
$yeartxt = new DOMText("2005"); | ||
|
||
/* Create and Append a copyright element */ | ||
$copyright = $bookinfo->appendChild(new DOMElement("copyright")); | ||
|
||
/* Create year element */ | ||
$year = $dom->createElement("year"); | ||
|
||
/* Append text node to set content */ | ||
$year->appendChild($yeartxt); | ||
$copyright->appendChild($year); | ||
|
||
/* Append a newly created holder element with content "Rob Richards" */ | ||
$copyright->appendChild(new DOMElement("holder", "Rob Richards")); | ||
|
||
/* If content is not whitespace then ... */ | ||
if (! $yeartxt->isElementContentWhitespace()) { | ||
/* Print substring at offset 1 and length 2: 00 */ | ||
print $yeartxt->substringData(1,2)."\n"; | ||
|
||
/* Append the string -2006 to the content and print output: 2005-2006 */ | ||
$yeartxt->appendData("-2006"); | ||
print $yeartxt->nodeValue."\n"; | ||
|
||
/* Delete content at offset 4 with length of 5 and print output: 2005 */ | ||
$yeartxt->deleteData(4,5); | ||
print $yeartxt->nodeValue."\n"; | ||
|
||
/* Insert string "ABC" at offset 1 and print output: 2ABC005 */ | ||
$yeartxt->insertData(1, "ABC"); | ||
print $yeartxt->nodeValue."\n"; | ||
|
||
/* Replace content at ofset 1 with length of 3 with an empty string: 2005 */ | ||
$yeartxt->replaceData(1, 3, ""); | ||
print $yeartxt->nodeValue."\n"; | ||
} | ||
|
||
$dom->formatOutput = TRUE; | ||
print $dom->saveXML(); | ||
?> |
Oops, something went wrong.