100% found this document useful (4 votes)
493 views

Study Resources For Test Bank For Introduction To JavaScript Programming With XML and PHP: 0133068307

Introduction

Uploaded by

siejkaheriqo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (4 votes)
493 views

Study Resources For Test Bank For Introduction To JavaScript Programming With XML and PHP: 0133068307

Introduction

Uploaded by

siejkaheriqo
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 55

Full download solution manuals or test banks for textbooks at testbankmall.

com

Test Bank for Introduction to JavaScript


Programming with XML and PHP : 0133068307

https://testbankmall.com/product/test-bank-for-introduction-
to-javascript-programming-with-xml-and-php-0133068307/

OR CLICK BUTTON

DOWNLOAD NOW

Download more solution manual or testbank from https://testbankmall.com


Instant digital products (PDF, ePub, MOBI) available
Download now and explore formats that suit you...

Solution Manual for Introduction to JavaScript Programming


with XML and PHP : 0133068307

https://testbankmall.com/product/solution-manual-for-introduction-to-
javascript-programming-with-xml-and-php-0133068307/

testbankmall.com

Test Bank for PHP Programming with MySQL The Web


Technologies Series, 2nd Edition

https://testbankmall.com/product/test-bank-for-php-programming-with-
mysql-the-web-technologies-series-2nd-edition/

testbankmall.com

Solution Manual for PHP Programming with MySQL The Web


Technologies Series, 2nd Edition

https://testbankmall.com/product/solution-manual-for-php-programming-
with-mysql-the-web-technologies-series-2nd-edition/

testbankmall.com

Vector Calculus Colley 4th Edition Solutions Manual

https://testbankmall.com/product/vector-calculus-colley-4th-edition-
solutions-manual/

testbankmall.com
Lehninger Principles of Biochemistry 6th Edition Nelson
Solutions Manual

https://testbankmall.com/product/lehninger-principles-of-
biochemistry-6th-edition-nelson-solutions-manual/

testbankmall.com

Test Bank for State and Local Government The Essentials,


6th Edition

https://testbankmall.com/product/test-bank-for-state-and-local-
government-the-essentials-6th-edition/

testbankmall.com

Solution manual for Fundamentals of Machine Component


Design Juvinall Marshek 5th edition

https://testbankmall.com/product/solution-manual-for-fundamentals-of-
machine-component-design-juvinall-marshek-5th-edition/

testbankmall.com

Test Bank for M Finance 3rd Edition by Cornett

https://testbankmall.com/product/test-bank-for-m-finance-3rd-edition-
by-cornett/

testbankmall.com

Test Bank for Payroll Accounting 2015, 25th Edition,


Bernard J. Bieg, Judith A. Toland

https://testbankmall.com/product/test-bank-for-payroll-
accounting-2015-25th-edition-bernard-j-bieg-judith-a-toland/

testbankmall.com
Test Bank For Enhanced Discovering Computers ©2017 (Shelly
Cashman Series) 1st Edition

https://testbankmall.com/product/test-bank-for-enhanced-discovering-
computers-2017-shelly-cashman-series-1st-edition/

testbankmall.com
Description:
This is the eBook of the printed book and may not include any
media, website access codes, or print supplements that may
come packaged with the bound book. For a one-semester
JavaScript programming course for students who have
knowledge of HTML and CSS. This text also serves as a useful
reference for individuals interested in learning JavaScript
Programming with XML and PHP. ¿ Introduction to JavaScript
Programming with XML and PHP is a hands-on book that focuses
on the "how-to" aspects of JavaScript, with a focus on enhancing
and extending websites.¿¿

1. Introduction to JavaScript® Programming with XML and PHP Creating Dynamic and
Interactive Web Pages
2. Preface
3. Organization of the Text
4. Brief Chapter Overviews
5. Features of the Text
6. Supplements
7. Contents
8. Location of VideoNotes in the Text
9. Chapter 0: Computer Basics
10. Chapter Objectives
11. 0.1 A Brief History of Computers
12. What Is a Computer?
13. Personal Computers
14. Today’s Computers
15. 0.2 A Brief History of the Internet
16. Packet Switching
17. Transmission Control Protocol / Internet Protocol (TCP/IP)
18. Try It Yourself
19. What Is a URL?
20. The Protocol
21. The Web Server
22. The Domain
23. The Path
24. Is It All Necessary?
25. 0.3 Computer Basics
26. Input
27. Processing
28. Storage
29. Internal Memory
30. Mass Storage Devices
31. Output
32. 0.4 What Is Programming?
33. The History of Programming
34. A Brief Timeline
35. Types of Software
36. Application Software
37. System Software
38. Programming and Scripting Languages
39. Machine Language
40. Assembly Language
41. Machine Language Instruction:
42. Assembly Language Equivalent:
43. High-Level Languages
44. Writing Programs
45. Scripting Languages versus Programming Languages
46. 0.5 Browsers
47. What Is a Browser?
48. Overview of Major Browsers
49. How Does A Browser Work?
50. Is the World Wide Web the Same As the Internet?
51. What Does This Mean to You?
52. 0.6 JavaScript and the Acronyms: XHTML, DOM, PHP, XML
53. A Brief History of JavaScript
54. Web Pages and XHTML
55. Server-Side and Client-Side Technologies
56. JavaScript Overview
57. A Dynamic Language
58. First-Class Functions
59. A Multiparadigm Language
60. How JavaScript Is Used
61. Overview of DOM, PHP, and XML
62. The Document Object Model (DOM)
63. Hypertext Preprocessor (PHP) or Personal Home Page Tools
64. Extensible Markup Language (XML)
65. Chapter Review and Exercises
66. Key Terms
67. Review Exercises
68. Fill in the Blank
69. True or False
70. Short Answer
71. Chapter 1: JavaScript Programming Basics
72. Chapter Objectives
73. 1.1 What Is Programming?
74. A General Problem-Solving Strategy
75. The Program Development Cycle
76. Emphasis on Step 4: Test the Program Extensively!
77. 1.2 The Structure of a Program
78. Input-Processing-Output
79. Input
80. Processing
81. Output
82. The Control Structures
83. The Sequential Structure
84. The Decision (or Selection) Structure
85. The Loop (or Repetition) Structure
86. 1.3 Data Types and Operations on Data
87. Numerical Data
88. String Data
89. Boolean Data
90. Variables and Named Constants
91. Assignment Statements
92. Operations on Data
93. Arithmetic Operators
94. Assignment Operators
95. The Concatenation Operator (+) Used on Strings
96. 1.4 Problem Solving: The Importance of Logical Thinking
97. Pseudocode
98. Flowcharts
99. Flowchart Symbols
100. 1.5 JavaScript in the Web Page
101. The <script></script> Tag Pair
102. The <noscript></noscript> Tag Pair
103. JavaScript in a Web Page <body>
104. JavaScript in the document <head> section
105. The <body> onload Event
106. 1.6 Introduction to Objects
107. What is an Object?
108. Properties and Methods
109. Attributes and Functions
110. The Document Object
111. Dot Notation
112. The write() Method
113. The getElementById() Method and the innerHTML Property
114. getElementById()
115. innerHTML
116. The open() and close() Methods
117. 1.7 Introduction to JavaScript Functions and Events
118. Introduction to JavaScript Functions
119. Parameters
120. The prompt() Function
121. Introduction to JavaScript Events
122. Event Driven Programming
123. 1.8 Putting It to Work
124. Greg’s Gambits: Creating an About You Page
125. Developing the About You Page
126. Writing the Code
127. Prompting for the Player’s Name
128. Prompting for the Player’s Username
129. Selecting an Avatar
130. Finishing the Code
131. Carla’s Classroom: Creating an About You Page
132. Developing the About Me! Page
133. Writing the Code
134. Prompting for the Child’s Name, Age, and Favorite Subject
135. Prompting for the Child’s Favorite Teacher
136. Finishing the Code
137. Chapter Review and Exercises
138. Key Terms
139. Review Exercises
140. Fill in the Blank
141. True or False
142. Short Answer
143. Programming Challenges
144. On Your Own
145. Chapter 2: Building Blocks: Variables and Operators
146. Chapter Objectives
147. 2.1 What Is a Variable?
148. Memory Locations
149. Variable Names
150. Naming Tips
151. Declaring Variables
152. 2.2 Data Types
153. A Loosely Typed Language
154. Numbers
155. Strings and Characters
156. Named Constants
157. 2.3 Arithmetic Operators and Some Important Functions
158. The Modulus Operator
159. The Hierarchy of Operations
160. The Concatenation Operator
161. Parsing Integers and Floating Point Numbers
162. 2.4 Relational Operators
163. ASCII Code
164. Relational Operators
165. 2.5 Logical Operators and the Conditional Operator
166. Logical Operators
167. A Truth Table for the AND , OR , and NOT Operators
168. Boolean Logic and Boolean Operators
169. The Order of Operations for Logical Operators
170. Conditional Operator
171. 2.6 Putting It to Work
172. Greg's Gambits: Creating Your Own Story
173. Developing the Program
174. Writing the Code
175. The charAt() function
176. Finishing the Code
177. Carla's Classroom: A Spelling Lesson
178. Developing the Program
179. Functions
180. The showPrompt1() and showResult1() functions
181. Putting It Together
182. Finishing Up
183. Chapter Review and Exercises
184. Key Terms
185. Review Exercises
186. Fill in the Blank
187. True or False
188. Short Answer
189. Programming Challenges
190. On Your Own
191. Chapter 3: Making Decisions: The Selection Structure
192. Chapter Objectives
193. 3.1 What if? Types of Selection Structures
194. 3.2 The Single Alternative Structure: The if Statement
195. A Note about the Test Condition
196. A Note about the Curly Brackets
197. 3.3 The Dual Alternative Structure: if... else Statements
198. 3.4 Nested Selection Structures
199. 3.5 Compound Conditions
200. Combining Relational and Logical Operators
201. Logical Operators Revisited
202. A Note about Syntax
203. Using AND and OR
204. 3.6 Multiple-Alternative Selection Structures
205. The if... else if... Structure
206. Using if... else if for a Rating System
207. Error Checking: Just the Beginning
208. The Switch Statement
209. Using a switch Statement for Page Color
210. 3.7 Putting It to Work
211. Greg's Gambits: Madame Vadoma Knows All
212. The Math Object
213. The Math.random() and Math.floor() Methods
214. Developing the Program
215. Writing the Code
216. Putting It All Together
217. Finishing Up
218. Carla's Classroom: An Arithmetic Lesson
219. Developing the Program
220. The return Statement
221. The Counter
222. Writing the Code
223. 3.7.2.4.1 The Plan
224. The Code in Pieces
225. 3.7.2.5.1 Level One Code
226. 3.7.2.5.2 Level Two Code
227. 3.7.2.5.3 Level Three Code
228. 3.7.2.5.4 A Comment about Checking the Counter
229. Putting It All Together
230. Finishing Up
231. Chapter Review and Exercises
232. Key Terms
233. Review Exercises
234. Fill in the Blank
235. True or False
236. Short Answer
237. Programming Challenges
238. On Your Own
239. Chapter 4: Going Round and Round: The Repetition Structure
240. Chapter Objectives
241. 4.1 Computers Don’t Get Bored with Repetition
242. Loop Basics
243. Iterations
244. Writing Test Conditions
245. 4.1.1.2.1 Beware the Infinite Loop!
246. 4.1.1.2.2 Don’t Let the User Get Trapped in a Loop
247. 4.2 Types of Loops
248. Pre-Test and Post-Test Loops
249. The Pre-Test while Loop
250. Writing Test Conditions
251. The Post-Test do...while Loop
252. Why Use One and Not the Other?
253. Formatting the Output: The toFixed() Method
254. Sentinel-Controlled Loops
255. Formatting the Output: The toLowerCase() and toUpperCase() Methods
256. Counter-Controlled Loops
257. Using a Counter
258. Shortcut Operators
259. 4.3 The for Loop
260. The for Statement
261. The Initial Value
262. The Test Condition
263. The Increment/Decrement Statement
264. The Careful Bean Counter
265. Curly Braces: Do We Really Need Them?
266. 4.4 Data Validation
267. The isNaN() Method
268. Checking for Integers
269. Using Compound Conditions for Data Validation
270. The charAt() Method
271. The length Property
272. 4.5 Putting It to Work
273. Greg’s Gambits: Encoding Secret Messages
274. What Is Encryption?
275. The charCodeAt() and String.fromCharCode() Methods
276. 4.5.1.2.1 Unicode and ASCII Code
277. 4.5.1.2.2 The charCodeAt() Method
278. 4.5.1.2.3 The String.fromCharCode() Method
279. Developing the Program
280. Writing the Code
281. Putting It All Together
282. Finishing Up
283. Carla’s Classroom: Advanced Arithmetic Lessons
284. Developing the Program
285. Writing the Code
286. The Code in Pieces
287. 4.5.2.3.1 Level One Addition Code
288. 4.5.2.3.2 Level Two and Level Three Addition Code
289. 4.5.2.3.3 Subtraction
290. Putting It All Together
291. 4.5.2.4.1 A Note about Code
292. Finishing Up
293. Chapter Review and Exercises
294. Key Terms
295. Review Exercises
296. Fill in the Blank
297. True or False
298. Short Answer
299. Programming Challenges
300. On Your Own
301. Chapter 5: Advanced Decisions and Loops
302. Chapter Objectives
303. 5.1 Some Simple Schoolroom Statistics
304. It All Adds Up
305. Computing Averages
306. The Range
307. Odd and Even
308. Integer Accuracy: Math Methods
309. The Math.round() Method
310. The Math.floor() and Math.ceil() Methods
311. 5.2 To Continue or Not to Continue?
312. The break Statement
313. The continue Statement
314. 5.3 Nested for Loops
315. Desk Checking
316. Different Ways to Nest Loops
317. Which Way Should Loops Be Nested?
318. 5.4 Drawing Shapes and Patterns with Loops
319. Drawing Shapes
320. Using Loops to Create Patterns
321. The mouse Events
322. 5.5 Putting It to Work
323. Greg’s Gambits: The Battle between Wizard and Troll
324. Developing the Program
325. 5.5.1.1.1 The Button As a Link
326. 5.5.1.1.2 The Web Pages
327. Writing the Code
328. Putting It All Together
329. Finishing Up
330. Carla’s Classroom: A Grammar Lesson
331. Developing the Program
332. Writing the Code
333. The Code in Pieces
334. 5.5.2.3.1 The Function and the Outer Loop
335. 5.5.2.3.2 Check for Valid Selections
336. 5.5.2.3.3 Displaying the Story
337. Putting It All Together
338. Finishing Up
339. Chapter Review and Exercises
340. Key Terms
341. Review Exercises
342. Fill in the Blank
343. True or False
344. Short Answer
345. Programming Challenges
346. On Your Own
347. Chapter 6: Forms and Form Controls
348. Chapter Objectives
349. 6.1 What Is a Form?
350. The Most Basic Form
351. The <form> </form> Tag Pair
352. The submit and reset Buttons
353. Returning Form Submissions
354. The Common Gateway Interface (CGI)
355. Returning Form Data by Email
356. Returning Form Data to a Program
357. 6.2 Form Controls
358. Radio Buttons
359. Checkboxes
360. The checked Property
361. Textboxes
362. The Label, Fieldset, and Legend Elements
363. Textarea Boxes
364. The email action
365. 6.3 Hidden Fields and Passwords
366. The Hidden Form Element
367. The Password Form Element
368. The substr() Method
369. 6.4 Selection Lists and More
370. Selection Lists
371. The size Attribute
372. The multiple Attribute
373. Enhancements for Form Elements
374. The tabindex Attribute
375. The accesskey Attribute
376. The onfocus Event
377. An Introduction to the this Keyword
378. An Image As an OK Button
379. 6.5 Putting It to Work
380. Greg’s Gambits: Player Information and Inventory
381. Developing the Program
382. 6.5.1.1.1 The Web Page Design
383. Writing the Code
384. 6.5.1.2.1 The Textbox Functions
385. 6.5.1.2.2 The Radio Buttons Function
386. 6.5.1.2.3 The Checkbox Functions
387. Putting It All Together
388. Finishing Up
389. Carla’s Classroom: Carla’s Progress Report Form
390. Developing the Program
391. 6.5.2.1.1 Carla’s Categories
392. 6.5.2.1.2 The Page Design
393. Creating the Form
394. Writing the Code
395. 6.5.2.3.1 The Textbox Functions
396. 6.5.2.3.2 The Radio Buttons Functions
397. 6.5.2.3.3 The Textarea Function
398. 6.5.2.3.4 Generating the Email
399. Putting It All Together
400. Finishing Up
401. Chapter Review and Exercises
402. Key Terms
403. Review Exercises
404. Fill in the Blank
405. True or False
406. Short Answer
407. Programming Challenges
408. On Your Own
409. Chapter 7: Keeping it Neat: Functions and JavaScript Source Files
410. Chapter Objectives
411. 7.1 Functions
412. Built-In Functions
413. User-Defined Functions
414. 7.2 The Scope of a Variable
415. Global Variables
416. Local Variables
417. 7.3 Sending Information to a Function
418. Passing Arguments to Parameters
419. The return Statement
420. Passing Values: A Complex Issue
421. Passing by Value
422. 7.4 Objects and Object-Oriented Concepts
423. The Math Object
424. More JavaScript Objects
425. Passing by Reference
426. The Boolean Object
427. 7.4.2.2.1 The new Keyword
428. The Date Object
429. The setTimeout() Function
430. 7.5 JavaScript Source Files
431. Work Smarter, Not Harder
432. Creating and Accessing a JavaScript Source (.js) File
433. JavaScript Source Files Cascade
434. Creating a Library of Functions
435. 7.6 Putting It to Work
436. Greg’s Gambits: Hangman
437. Developing the Program
438. 7.6.1.1.1 The Man in the Noose
439. 7.6.1.1.2 The Secret Words
440. Writing the Code
441. 7.6.1.2.1 The startHangman() Function
442. 7.6.1.2.2 The setCharAt() Function
443. 7.6.1.2.3 The replace() Method and Regular Expressions
444. 7.6.1.2.4 The Revised checkWord() Function
445. Putting It All Together
446. Finishing Up
447. Carla's Classroom: Reading Comprehension
448. Developing the Program
449. Creating the First Page
450. Writing the Code
451. 7.6.2.3.1 Password Protection
452. 7.6.2.3.2 The First Web Page:
453. 7.6.2.3.3 Use the visibility Property to Create a Hidden Button
454. 7.6.2.3.4 Building the Page with Questions
455. 7.6.2.3.5 What the Student Sees
456. Putting It All Together
457. Finishing Up
458. Chapter Review and Exercises
459. Key Terms
460. Review Exercises
461. Fill in the blanks
462. True or False
463. Short Answer
464. Programming Challenges
465. On Your Own
466. Chapter 8: Arrays
467. Chapter Objectives
468. 8.1 One-dimensional Arrays
469. Creating an Array in JavaScript
470. The Array Object
471. A Note About Array Names
472. The length Property
473. Some Methods of the Array Object
474. 8.2 Populating Arrays
475. Loading Arrays Directly
476. Loading Arrays Interactively
477. Displaying Arrays
478. 8.3 Parallel Arrays
479. Why Use Arrays?
480. 8.4 Using Array Methods
481. The push() Method
482. The length Property Can Be Used to Find the Length of an Array
483. The unshift() Method
484. The splice() Method
485. 8.5 Multi-Dimensional Arrays
486. Introduction to Two-Dimensional Arrays
487. Declaring and Filling Two-Dimensional Arrays
488. 8.6 Putting It to Work
489. Greg’s Gambits: The Game of 15
490. Developing the Program
491. 8.6.1.1.1 Setting the Stage
492. 8.6.1.1.2 Creating the Array with the setup() Function
493. 8.6.1.1.3 Populating the Array with the Math.random() Function
494. 8.6.1.1.4 The Code to Exchange Cell Values
495. 8.6.1.1.5 The Code to Check for a Winner
496. Putting It All Together
497. Carla’s Classroom: Images and Imagination
498. Setting Things Up
499. Developing the Program
500. 8.6.2.2.1 Setting the Stage
501. 8.6.2.2.2 The Image Swap
502. 8.6.2.2.2.1 Practice the Image Swap
503. 8.6.2.2.3 The Slide Show
504. Putting It All Together
505. Chapter Review and Exercises
506. Key Terms
507. Review Exercises
508. Fill in the Blank
509. True or False
510. Short Answer
511. Programming Challenges
512. On Your Own
513. Chapter 9: Searching and Sorting
514. Chapter Objectives
515. 9.1 Sorting Arrays
516. The sort() Method
517. Sorting Numbers with the sort() Method
518. The reverse() Method
519. 9.2 The Bubble Sort
520. Swapping Values
521. Using the Bubble Sort Algorithm
522. Passing Arrays
523. 9.3 The Selection Sort
524. 9.4 Searching Arrays: The Serial Search
525. The Serial Search
526. Using the Serial Search with Parallel Arrays
527. 9.5 Searching Arrays: The Binary Search
528. The Binary Search
529. Making Life Easier: The indexOf() Method
530. The indexOf() Method
531. The lastIndexOf() Method
532. Time Out! Using the setInterval() and clearInterval() Methods
533. 9.6 Putting It to Work
534. Greg’s Gambits: Greg’s Boggle
535. Developing the Program
536. Setting the Stage
537. 9.6.1.2.1 Creating the boggle() Function
538. 9.6.1.2.2 The toString() Method
539. 9.6.1.2.3 The boggle() Function
540. Putting It All Together
541. Carla’s Classroom: A Factoring Lesson
542. Factoring Integers
543. Developing the Program
544. Setting the Stage
545. The Code in Pieces
546. 9.6.2.4.1 The External File
547. 9.6.2.4.2 The Beginning
548. 9.6.2.4.3 Selecting the Number and Some Housekeeping Tasks
549. 9.6.2.4.4 The splice() Method
550. 9.6.2.4.5 Getting Student Responses
551. Putting It All Together
552. Chapter Review and Exercises
553. Key Terms
554. Review Exercises
555. Fill in the Blank
556. True or False
557. Short Answer
558. Programming Challenges
559. On Your Own
560. Chapter 10: The Document Object Model and XML
561. Chapter Objectives
562. 10.1 The Document Object Model: DOM
563. A Brief History of DOM
564. DOM Nodes and Trees
565. The Family: The Parent-Child Model
566. Creating and Inserting Elements
567. The createTextNode() Method
568. Replacing and Removing Elements
569. The removeChild() Method
570. The replaceChild() Method
571. The childNodes Property
572. 10.2 Using DOM Methods with Timers and Styles
573. The setAttribute()and getAttribute() Methods
574. The setInterval() and clearInterval() Methods
575. 10.3 XML Basics
576. What Is XML?
577. Why Do We Need XML?
578. XML Components
579. The XML Declaration
580. XML Elements
581. Comments and File Names
582. XML Attributes
583. XML Entities
584. Whitespace
585. Well-Formed XML Documents
586. XML Parsers and DTDs
587. XML Internal DTDs
588. XML External and Public DTDs
589. 10.4 Adding Style and XSL Transformations
590. Using Cascading Style Sheets with XML Documents
591. The Extensible Style Sheet Language (XSL)
592. An Important Note
593. 10.5 XML Namespaces and Schemas
594. XML Namespaces
595. The Uniform Resource Identifier (URI)
596. Namespace Declarations
597. XML Schemas
598. Creating a Reference to a Schema in an XML Document
599. There’s More . . .
600. XML Schema Data Types
601. Creating an XML Schema
602. 10.6 Putting It to Work
603. Greg’s Gambits: Greg’s Avatars
604. Developing the Program
605. Setting the Stage
606. Creating the XML, XSL, and JavaScript Pages
607. 10.6.1.3.1 Creating the XML Page
608. 10.6.1.3.2 Creating the XSL Page
609. 10.6.1.3.3 Creating the JavaScript Page and the DOM Code
610. Putting It All Together
611. Carla’s Classroom: A Spelling Lesson
612. Developing the Program
613. Setting the Stage
614. The Code in Pieces
615. 10.6.2.3.1 The Functions to Extract Values from the Selected Image and
Spelling
616. 10.6.2.3.2 The Function to Compare the Values
617. 10.6.2.3.3 The Function to Check for Success
618. Putting It All Together
619. Chapter Review and Exercises
620. Key Terms
621. Review Exercises
622. Fill in the Blank
623. True or False
624. Short Answer
625. Programming Challenges
626. On Your Own
627. Chapter 11: PHP: An Overview
628. Chapter Objectives
629. 11.1 A Brief History of PHP
630. What Does a Server Do?
631. HTTP get and post Request Types
632. The Apache HTTP Server, MySQL, and PHP
633. The Apache HTTP Server
634. The MySQL Database
635. PHP and XAMPP
636. 11.2 XAMPP
637. Installing XAMPP
638. Security
639. The License
640. The Install
641. Try It
642. Let’s Get Started
643. Your First PHP Program
644. 11.3 PHP Basics
645. PHP File Names, the htdocs Folder, and Viewing Your PHP Pages
646. Variables and Methods
647. Converting Data Types with the settype() and gettype() Methods
648. Converting Data Types by Type Casting
649. PHP Keywords
650. Operators
651. Unary Operators
652. Binary Operators
653. 11.3.4.2.1 Operator Precedence
654. Ternary Operators
655. The Concatenation Operators
656. 11.4 Using Conditionals and Loops
657. Making Decisions: The if Structure
658. The echo Construct
659. The switch Statement
660. 11.4.2 Cycling Through: Repetitions and Loops
661. 11.5 Arrays and Strings
662. Arrays
663. 11.5.1.1 The reset() Method
664. The foreach Construct, the as keyword, and the ==> Operator
665. The key() Method
666. Why Are We Learning All This?
667. Working with Strings
668. Comparing Strings
669. 11.5.3.2 Searching for Expressions: The preg_match() and preg_replace()
methods
670. 11.6 Putting It to Work
671. Greg’s Gambits: PHP Welcome Messages
672. 11.6.1.1 Developing a New Format for Greg’s Pages: Organizing a Site
673. The Header and Footer Files
674. Setting the Stage
675. The ajax_post() Function
676. 11.6.1.4.1 What Is Ajax?
677. 11.6.1.4.2 The onclick = "javascript:ajax_post();" event
678. 11.6.1.4.3 Field-Value Pairs
679. 11.6.1.4.4 The ajaxDataPipe.php Page
680. Putting It All Together
681. 11.6.2 Carla’s Classroom: Using PHP for Hints
682. Developing the Program
683. 11.6.2.1.1 The Folders
684. 11.6.2.1.2 The header.php File
685. 11.6.2.1.3 The footer.php File
686. 11.6.2.1.4 The carla_phpDemo.php File
687. 11.6.2.1.5 The showHint() Function
688. 11.6.2.1.6 The gethint.php File
689. 11.6.2.1.7 The $_GET superglobal Variable
690. 11.6.2.1.8 The count() Method
691. 11.6.2.1.9 The strtolower() Method
692. Putting It All Together
693. Chapter Review and Exercises
694. Key Terms
695. Review Exercises
696. Fill in the Blank
697. True or False
698. Short Answer
699. Programming Challenges On Your Own
700. Chapter 12: Using PHP With Cookies and MySQL
701. Chapter Objectives
702. 12.1 Cookies
703. Types of Cookies
704. Writing Cookies
705. The time() Function
706. Writing Your First Cookie
707. The define() Method
708. The isset() Method
709. The $_SERVER() Method and PHP_SELF
710. 12.2 A Database Server: MySQL
711. An Overview of MySQL
712. The License
713. Setting Up a MySQL User Account
714. Create a New User
715. Assigning Privileges
716. The Database Structure
717. Building a Small Business Database
718. Jackie’s Tables
719. The Primary Key and the Foreign Key
720. Table Fields
721. Field Attributes
722. Creating the Database with phpMyAdmin
723. Create the jackiejewelry Database
724. 12.3 Populating a Database from the Web
725. The Web Page Form
726. The die() Method
727. The mysql_error() Method
728. The mysql_query() Method
729. The mysql_connect() Method
730. The mysql_select_db() Method
731. 12.4 Sending Emails from Database Information Using PHP
732. The Form
733. The mysql_fetch_array() Method
734. The mail() Method
735. 12.5 Putting It to Work
736. Greg’s Gambits: Create or Validate an Account and Log In
737. Creating the Database
738. Creating User Accounts and Login Pages
739. 12.5.1.2.1 The newUser.php File:
740. 12.5.1.2.2 The header.php File:
741. 12.5.1.2.3 The footer.php File:
742. 12.5.1.2.4 Connecting to the Database Using the connectDB.php File:
743. 12.5.1.2.5 Closing the Connection Using the closeDB.php File
744. 12.5.1.2.6 The addUser.php File:
745. Testing It
746. The New Beginning: The index.php Page
747. 12.5.1.4.1 The Session
748. 12.5.1.4.2 The index.php Page
749. 12.5.1.4.3 The logIn.php Page
750. 12.5.1.4.4 The session_start() Method and the $_SESSION Superglobal
751. 12.5.1.4.5 The validate_loginForm(thisform), validate_userName(), and
validate_passWord() JavaScript Functions
752. 12.5.1.4.6 The with() Reserved Word (Keyword)
753. Creating the User Information Page
754. Let’s Play a Game!
755. Putting It All together
756. Carla’s Classroom: Using PHP to Send Student Reports by Email
757. Creating the Database
758. 12.5.2.1.1 The Folders
759. Adding a Student to the Database
760. 12.5.2.2.1 The index.php File
761. 12.5.2.2.2 Inserting a New Record: Making the Connection
762. 12.5.2.2.3 The insert.php File
763. Creating and Sending the Email
764. 12.5.2.3.1 The sendEmail.php File
765. 12.5.2.3.2 The getStudent.php File
766. Putting It All Together
767. Chapter Review and Exercises
768. Key Terms
769. Review Exercises
770. Fill in the Blank
771. True or False
772. Short Answer
773. Programming Challenges
774. On Your Own
775. Appendix A: ASCII Characters The ASCII Character Set: Nonprintable and
Printable Characters
776. Appendix B: Operator Precedence Operators and Operator Precedence
777. Appendix C: HTML Characters and Entities HTML Entities
778. Reserved Characters in HTML
779. ISO 8859-1 Symbols
780. Appendix D: JavaScript Objects JavaScript Objects and Methods
781. Array Object
782. Properties
783. Methods
784. Boolean Object
785. Properties
786. Methods
787. Date Object
788. Properties
789. Methods
790. Math Object
791. Properties
792. Methods
793. Number Object
794. Properties
795. Methods
796. String Object
797. Properties
798. Methods
799. String HTML Wrapper Methods
800. RegExp Object
801. Modifiers
802. Brackets
803. Metacharacters
804. Quantifiers
805. Properties
806. Methods
807. JavaScript Global Properties and Functions
808. Global Properties
809. Global Functions
810. Appendix E: jQuery
811. jQuery
812. What Is jQuery?
813. Downloading jQuery
814. Sample jQuery Code
815. Appendix F: DOM Properties, Methods, and Events
816. DOM Properties, Methods, and Events
817. The Document Object Model: DOM
818. Some DOM Properties
819. Some DOM Methods
820. Some Events
821. Node Properties
822. The nodeName Property
823. The nodeValue Property
824. The nodeType Property
825. Appendix G: PHP Reserved Words
826. PHP Reserved Words and Predefined Constants
827. Keywords
828. Predefined Constants
829. Appendix H: PHP MySQL Functions
830. Common PHP MySQL Functions
831. Appendix I: Answers to Checkpoint Exercises
832. Answers to Checkpoint Exercises
833. Chapter 0
834. Checkpoint for Section 0.1
835. Checkpoint for Section 0.2
836. Checkpoint for Section 0.3
837. Checkpoint for Section 0.4
838. Checkpoint for Section 0.5
839. Checkpoint for Section 0.6
840. Chapter 1
841. Checkpoint for Section 1.1
842. Checkpoint for Section 1.2
843. Checkpoint for Section 1.3
844. Checkpoint for Section 1.4
845. Checkpoint for Section 1.5
846. Checkpoint for Section 1.6
847. Checkpoint for Section 1.7
848. Chapter 2
849. Checkpoint for Section 2.1
850. Checkpoint for Section 2.2
851. Checkpoint for Section 2.3
852. Checkpoint for Section 2.4
853. Checkpoint for Section 2.5
854. Chapter 3
855. Checkpoint for Section 3.1
856. Checkpoint for Section 3.2
857. Checkpoint for Section 3.3
858. Checkpoint for Section 3.4
859. Checkpoint for Section 3.5
860. Checkpoint for Section 3.6
861. Chapter 4
862. Checkpoint for Section 4.1
863. Checkpoint for Section 4.2
864. Checkpoint for Section 4.3
865. Checkpoint for Section 4.4
866. Chapter 5
867. Checkpoint for Section 5.1
868. Checkpoint for Section 5.2
869. Checkpoint for Section 5.3
870. Checkpoint for Section 5.4
871. Chapter 6
872. Checkpoint for Section 6.1
873. Checkpoint for Section 6.2
874. Checkpoint for Section 6.3
875. Checkpoint for Section 6.4
876. Chapter 7
877. Checkpoint for Section 7.1
878. Checkpoint for Section 7.2
879. Checkpoint for Section 7.3
880. Checkpoint for Section 7.4
881. Checkpoint for Section 7.5
882. Chapter 8
883. Checkpoint for Section 8.1
884. Checkpoint for Section 8.2
885. Checkpoint for Section 8.3
886. Checkpoint for Section 8.4
887. Checkpoint for Section 8.5
888. Chapter 9
889. Checkpoint for Section 9.1
890. Checkpoint for Section 9.2
891. Checkpoint for Section 9.3
892. Checkpoint for Section 9.4
893. Checkpoint for Section 9.5
894. Chapter 10
895. Checkpoint for Section 10.1
Another Random Scribd Document
with Unrelated Content
Christian Europe. But meagre accounts of the manufactures and
trade of Moorish Sicily have been transmitted to posterity. It is well
known, however, that commercial relations existed between the
principal ports of the island and the maritime nations of the
Mediterranean. The merchantmen of its thriving seaports exchanged
the products of the East and West in the harbors of Malaga,
Alexandria, Constantinople. No people surpassed the Sicilians in the
delicacy and beauty of their fabrics, and the silks of Palermo,
interwoven with texts and devices in gold, were highly esteemed,
and much sought after by the luxurious potentates and nobles of the
Mohammedan world.
Of all the imposing palaces, baths, and mosques which once
adorned the Moorish cities of the island, unhappily not a vestige now
remains. Nothing but a few scattered and broken inscriptions has
survived the violence of mediæval times, to attest the pomp and
splendor of the Sicilian emirs. The architecture of no other people
has suffered such complete and systematic annihilation. Two or
three structures, erected during the rule of the Norman princes, but
whose proportions and ornamentation, while remarkable, yet
disclose unmistakably the decadence of architectural skill, are all we
have upon which to found an opinion of the magnificence of
Mohammedan Palermo.
It must not be forgotten that the advances of the Sicilian Moslems
in the arts of peace were made under the most discouraging
circumstances. War was the normal state of the country from the
invasion by Asad-Ibn-Forat to the surrender of the last castle to the
Normans. When the Saracens were not engaged in hostilities with
the Christians, they amused themselves by cutting each other’s
throats. In every instance, whether plundered by Greeks or
persecuted by Moslems of an unfriendly sect, the husbandman and
the merchant were always the sufferers. That agriculture and
commerce could exist at all under such difficulties may well awaken
surprise; that a civilization superior to that of any state of Christian
Europe should have been developed and sustained in spite of these
obstacles is an anomaly without precedent in the history of nations.
The administration of the laws by the dominant race was, of
course, based upon the principles of Moslem jurisprudence. It was
not unusual, however, for these laws to be either evaded or
executed with a severity never contemplated by their author.
Constant familiarity with bloodshed and habitual defiance of their
authority by the populace had brutalized the rulers of Sicily. They
affected a reserve characteristic of the worst forms of Oriental
despotism. Their features were unknown to the great body of their
subjects. From motives of caution, or to enhance the mysterious
dignity investing their office, they gave audience and dispensed
justice from behind a curtain which entirely concealed the throne.
Like the most degenerate of the Persian Fatimites, they travelled
unseen in litters, attended by the effeminate ministers of their vices.
The few who attained to military distinction by active operations in
the field died of disease; a large proportion of those who intrusted
the conduct of campaigns to subordinates perished by the hand of
the assassin.
In no part of the domain of Islam was the population of a more
diversified character than in Sicily. Discord and disunion were the
inevitable results of its composition. In the face of an enemy, the
valor of its warriors was never questioned. In the excitement of a
revolution, no man was safe from the dagger of his friend.
Individuals deriving their origin from so many different countries
naturally brought with them the experience, the arts, the industry,
the accomplishments, the vices, of their respective nations. Under a
dynasty of independent and resolute princes able to repress the
outbreaks of tribal discord, Sicily would undoubtedly have risen to
the most exalted rank in the scale of civilization. As it was, with all
her serious impediments to progress, she had no rival excepting
Spain among the kingdoms of Europe. Her armies wrested from the
Byzantine Emperor one of the most valuable provinces of his
dominions. Her navy for a considerable period enjoyed the maritime
superiority of both the Adriatic and the Mediterranean. The country,
in spite of civil commotion and the consequent insecurity, was
densely populated. In 938 the inhabitants of the valley of Mazara
alone amounted to two million,—half of whom were Moslems. The
elegant luxury of Palermo surpassed in taste while it equalled in
splendor the barbaric pomp of Constantinople. The domestic and
social conditions prevailing in Germany, Italy, France, and England
were incomparably inferior in all the qualities by which the
advancement and happiness of nations are promoted to those,
defective as they were, by which society in Moorish Sicily was
organized and controlled. In the province of letters the Sicilian
Moslems seem to have merited distinction not inferior to that
achieved by their Andalusian brethren. A long catalogue of authors,
whose compositions, for the most part, unhappily have perished,
indicate the esteem in which literature was held, as well as the
prodigal liberality by which the efforts of its professors were
rewarded.
The influence of Sicilian civilization upon the Normans exhibits the
counterpart of that exercised by the decaying genius of Rome upon
the fierce and untutored barbarians. But the minds of the former
were far better fitted to receive the impressions imparted by
association and example than were those of the followers of Alaric
and Alboin. They were somewhat accustomed to the conveniences
and the luxuries of life, and not entirely ignorant of the amenities of
social intercourse. They had travelled far and had insensibly made
comparisons between the usages of many nations. The architectural
remains of the mighty empire of the Cæsars had awakened their
admiration. They were familiar with the defaced, but still awe-
inspiring, monuments of Roman grandeur. Tradition, embellished
with a thousand enchanting legends, had brought before them
visions of the majesty and glory of the greatest powers of the
ancient world. Intimate contact with the Greek colonists of Southern
Italy, who still retained in a measure the graces and the refinement
of their ancestors, gave them well-defined ideas of the civilization
enjoyed by the original seat of literary superiority, of architectural
perfection, of artistic excellence. Thus the Normans were ready,
even eager, to receive from their Moorish vassals lessons in those
elegant pursuits whose advantages they had long appreciated, but
had never enjoyed. The Moslems, as a rule, were granted every
courtesy by their Christian neighbors, who quickly recognized their
superior intellectual acquirements. They celebrated in public, and
without molestation, the festivals of their religion. The rich freely
indulged their inclination for splendid attire and imposing retinues.
They had their own ministers of justice and of worship, their
markets, mosques, and judicial tribunals. The majority of the
merchants of Palermo under the Norman domination were
Mohammedans.
Reluctant, perhaps unable, to discriminate, the invaders grew
corrupt, and the evils characteristic of a sensual and luxurious race
were insensibly adopted with the benefits which its culture afforded.
After the Norman conquest, the spirit of Moorish civilization still
remained paramount. The Saracens formed no unimportant part of
the military establishment of their conquerors, maintained both for
service and ostentation. At the siege of Amalfi, in 1096, twenty
thousand of them served under the Norman standard. In 1113,
when Adelaide, mother of Count Roger, went to Ascalon to marry
Baldwin, King of Jerusalem, she presented him with a band of
Moorish archers splendidly uniformed in scarlet and gold. The forms
of government observed by the emirs were retained. Moslem
ministers and magistrates directed the administration of the state,
regulated the finances, dispensed justice. The Arabic tongue
continued to be not only the recognized medium of communication
between all classes of society, but the vehicle of public acts and
edicts, and the official idiom of the courts of law. Over the gateways
of palaces constructed by the princes of the family of De Hauteville
are still to be deciphered legends whose sentiment is unmistakably
Mohammedan. The Norman coins were stamped with sentences
from the Koran and with the date of the Hegira. The dress, the
manners, the etiquette of public audiences, the habits of private
intercourse, became essentially Oriental. The umbrella, an emblem
of royalty borrowed from the Fatimites of Egypt, was borne over the
heads of the Norman kings on occasions of ceremony. The robes of
distinguished personages were interwoven with Arabic texts, whose
characters and whose significance excited the pious horror of the
orthodox. The regulation of the royal household was modelled after
that of the emirate. The very titles of the public officials were Arabic.
The education of youth was committed without reserve to learned
doctors of the Mussulman or the Hebrew faith. In some of the
harems of the Norman lords the inmates were all Mohammedans; in
those of others, Christian damsels shared the favor and the affection
of the licentious noble. No restrictions were imposed upon the
religious prejudices of either, and it is related that the Christians,
convinced by the arguments or the fascinations of their infidel
associates, not infrequently became proselytes to the doctrines of
Islam. Under the enlightened government of the Normans,
persecution was unknown. Indeed, the vanquished people were
regarded with such partiality that Count Roger absolutely forbade
that any Moslem should, even by the most gentle means, be
converted to Christianity. The clergy, unable to resist the prevailing
influence, suffered their sacred edifices to be adorned with
sentences from the Koran, whose monotheistic tendency accorded ill
with the accepted maxims of patristic theology and the infallible
edicts of ecclesiastical councils. From the balcony of the minaret and
the tower of the cathedral the voice of the muezzin or the pealing of
the bell called the pious to worship, and from the altars of every
community arose in unison the praise of Allah and the invocation of
the Triune God.
The traveller Ibn-Haukal and the geographer Edrisi have left us
interesting and lively descriptions of the great Moslem cities of Sicily
under Norman rule. Of these Palermo easily took precedence, not
only on account of its being the metropolis, but by reason of the
superior wealth, intelligence, and culture of its citizens. Of the
number of its inhabitants no data have survived to enable us to form
an approximate computation. They must have amounted, however,
to several hundred thousand, as five hundred mosques were
required for the worship of the Mussulmans, and, as a rule, the
Christian population in every community equalled, if it did not
exceed, that of the sectaries of Islam. Many of these structures were
superb temples, whose costly decorations attested the liberality of
the prince or the devotion of the multitude. Some were of vast
dimensions; the largest could accommodate with ease seven
thousand worshippers. The vanity of private individuals, whose
wealth permitted them to indulge their taste for ostentation and
offer an exhibition of zeal not always above suspicion, possessed
mosques of their own, from which all were excluded save their own
relatives, dependents, vassals, and slaves. But not alone in their
places of worship did the prodigal and luxurious citizens of Palermo
emulate the magnificence of their neighbors. The palaces of the rich
and the great were unsurpassed by those of any Moslem capital
excepting Cordova. The skill and delicacy of the labor expended
upon them corresponded with the rare and precious character of the
materials of which they were composed. The walls were encased
with variegated marbles, the floors were formed of mosaic, the
ceilings exhibited a labyrinth of geometric tracery relieved by brilliant
coloring and resplendent with gold. Rows of aromatic shrubs filled
the court-yards with their fragrance. The predilection of the Arab for
water—the greatest treasure of the Desert—was everywhere
manifested. Aqueducts composed of tiers of towering arches skirted
the mountains in all directions. Canals traversed the plantations and
gardens of the extensive suburbs. Fountains of classic design cooled
the air of parks and promenades or quenched the thirst of the tired
and dusty caravan. The city, from east to west, was intersected by
the market-place, a wide street paved with hewn-stone and lined
with shops filled with the most valuable commodities known to the
commerce of the age. The central or older portion of the city was
the seat of the court and the residence of the monarch. The suburbs
almost entirely surrounded it, and contained the quays, the
warehouses, the markets, the caravansaries, necessary to the traffic
of a great maritime emporium. Like Cordova, Palermo was divided
into five separate quarters, each of which was isolated from the
others when the gates were closed. The houses were of blocks of
polished stone put together with the greatest accuracy, the streets
were lighted, the mansions of commanding height and symmetrical
proportions, the habitations of the poor more commodious than the
dwellings of many of the wealthy burghers of Paris and London. In
the time of Ibn-Jubair, who visited Palermo during the reign of
William the Good, the costumes and the manners of the Christians
were not distinguishable from those of their Moslem vassals. The
ladies wore veils of different colors and garments of mingled silk and
gold. Dainty slippers, embroidered in arabesques with the precious
metals, protected their tiny feet, jewelled ornaments of exquisite
patterns glittered upon their bosoms, and the aroma of costly
essences which enveloped them revealed their passionate love of
perfumes. The fusion of races was nowhere so apparent or so
remarkable as in the unrestricted intimacy maintained, and in the
refined courtesies reciprocated by the once hostile nationalities
which composed the population of the Norman capital. The
amenities of social intercourse required the practice of politeness
and of self-restraint even among enemies. In the time of William the
Good cruelty and rapine were stigmatized as Teutonic vices.
The noble and elevating pursuits of science were not neglected
under the Moors of Sicily and their intelligent and progressive
conquerors, the Norman princes. Geography, astronomy, chemistry,
and medicine were studied with diligence and success. Edrisi, whose
descent from the royal dynasty of Fez has been obscured by the
eminent reputation he attained as a geographer and a philosopher,
made for Roger II. a planisphere which represented at once the
surface of the earth and the positions of the heavenly bodies. From
the minarets of Palermo, the Arab astronomer observed the motions
of the planets, the periodical recurrence of eclipses, the relative
positions and general distribution of the stars in space, by the aid of
instruments invented on the Guadalquivir and the Tigris, and of
tables computed on the plains of Babylon centuries before the
Christian era. The Moslem thus consecrated to the prosecution of
scientific research the towers of his most sacred temples, at a time
when from the cathedrals of Europe doctrines were promulgated
which menaced, with the severest penalties that ecclesiastical
malignity could devise, every occupation which in any way
contributed to the emancipation of reason or the intellectual
progress of humanity. Astrology, that delusive study so flattering to
the vanity of human nature, and so alluring to the imagination from
the preternatural power supposed to be wielded by the charlatans
who practised it, too often discredited the results of astronomical
investigation; just as the vain and costly pursuit of the philosopher’s
stone brought into disrepute at first the pre-eminently useful science
of chemistry. The Sicilians were firm believers in the influence
exerted by the heavenly bodies upon the actions and the destiny of
man. The attempt to extract the precious metals from the most
unpromising substances of nature had long engaged the attention of
the Arab, and the cities of the island swarmed with impostors who
cast horoscopes, interpreted dreams, and predicted future events by
pretended communion with the stars, while the fires in the
laboratory of the alchemist were maintained at the expense of
innumerable dupes of their own credulity, whose hopes were
sustained by mystery and fraud, while their purses were being
systematically depleted. The superior intelligence of the higher
classes afforded no immunity from these popular delusions; the
noble embraced their principles with the same confidence and the
same avidity as were displayed by the plebeian and the slave. The
home of the alchemist was habitually frequented by the highest
officials of the court, and the astrologer, with his peculiar garb, his
long staff engraved with talismanic signs, his flowing beard, and his
air of mysterious assurance, was the most welcome guest in the
palaces of Palermo.
The Arabs of Sicily, with their brethren of Spain, owing to their
extraordinary and thorough proficiency in medicine and surgery,
were the most skilful practitioners in Europe. Their eminence in this
profession was, to a large extent, shared by the Jews, who, as a
race, were the recipients of royal favor and public confidence under
the Norman as well as under the Saracen domination. The peer of
the Moslem in every branch of scientific knowledge, the Hebrew
brought to the study and application of the principles of the healing
art the same keen perception and unerring tact which enabled him
in all ages to rise to the most commanding positions in the
mercantile world.
In their acquaintance with the mechanical arts the Sicilians were
not inferior to their most accomplished contemporaries. Their
hydraulic system was provided with all the appliances which had
been tested by those nations whose arid soil required the artificial
stimulus of irrigation. Their mills dotted the banks of every stream
whose current afforded sufficient motive power for the propulsion of
a water-wheel. The products of their looms were famous for their
exquisite patterns and the fineness of their texture. They seemed to
have also excelled in the invention and manufacture of contrivances
for the measurement of time. A clepsydra belonging to Roger II. has
been commemorated by an inscription which would indicate that it
equalled in ingenuity and perfection the famous one presented by
Harun-al-Raschid to Charlemagne. The hours were marked off by
automatons, which dropped a corresponding number of balls into a
metallic basin, a not unworthy predecessor of the modern clock. A
considerable number of the astrolabes, which, having fortunately
escaped the effects of ecclesiastical fury wreaked upon them as
magical instruments and devices of Satan, are now preserved in the
museums of Europe, are of undoubted Sicilian origin.
Abu-Layth, an architect and engineer, who had been educated in
the schools of Sicily, assisted in the completion of the great mosque
of Seville, erected during the twelfth century, and the globes of
gilded bronze which crowned the summit of the Giralda, whose
extraordinary dimensions and perfect symmetry excited the wonder
of all beholders, were cast and raised to their places under his
supervision. The superiority of the Sicilian Moslems in the
construction and management of military engines has been already
referred to in these pages.
The court of Palermo for more than a century was no less
distinguished for the literary acquirements of those who, attracted
by its reputation and the character of its society, took up their abode
in its precincts, than for the scientific studies pursued with such
ardor under the patronage of its sovereigns. During the Saracen
rule, translations of those classical authors who wrote on philosophy
and natural history were made; the perusal of the works of Aristotle,
for whose doctrines the Moslems of the Middle Ages evinced such a
remarkable predilection, was one of the favorite diversions of the
learned; and the poems of Pagan Arabia were recited in the elegant
idiom of the Desert, amidst the applause of believer and infidel alike,
almost within hearing of the metropolis of Christendom. The
prodigious stores of learning accumulated by the philosophers of the
Alexandrian school, through the boundless munificence of the Greek
dynasty of Egypt, enriched the libraries and cultivated the
understanding of the scholars of Sicily. The writings of Hero, of
Eratosthenes, of Euclid, and of Ptolemy were familiar to the students
in attendance upon the academies and colleges of Palermo and
Messina. The Syntaxis, the Geography, and the Optics of the latter
have survived, mainly through the instrumentality of the Moors, the
indiscriminate destructiveness of the barbarians and the calculating
malice of the clergy, to convey to subsequent generations instructive
and significant ideas of the philosophical attainments and
mathematical knowledge of one of the most accomplished scholars
of antiquity. The great work of Edrisi was compiled under the
auspices of Roger II. The Arab was peculiarly fitted for the treatment
of the comprehensive science of physical and descriptive geography.
His information had been largely obtained by practical experience.
He had served in campaigns conducted on the frontiers of
civilization; in the capacity of a merchant he had traversed with the
plodding caravan vast regions diversified with illimitable plains, lofty
mountains, noble rivers; as a pilgrim he had performed his devotions
at the cradle of the Moslem faith; in the tireless pursuit of learning
he had prosecuted his researches over strange countries and among
strange peoples; his features and his costume were familiar to the
residents of the great European and Asiatic capitals; his
peregrinations had extended from the Douro to the Indus, from the
shores of the Baltic to the sources of the Nile. Thus endowed with
especial qualifications, the Arab geographer was equally at home,
whether recounting to a delighted audience the experiences of an
extended journey or explaining to an assemblage of students the
physical features of the earth and the relative distribution of land
and water as depicted on the surface of a terrestrial globe. The work
of Edrisi is an imperishable monument to the intelligence, the
industry, the criticism, of the compiler, whose studies were confirmed
in many instances by personal observation, and the practical value of
whose undertaking was established by his scientific attainments as
well as by the copious erudition of the illustrious monarch by whose
command it originated and was brought to a successful termination.
In the exact sciences the Arabs of Sicily attained to a proficiency
unsurpassed by any nation since the glorious days of the
Alexandrian Museum, and, in fact, they appropriated and absorbed
much of the knowledge bequeathed to posterity by that immortal
institution. Their geometers applied that knowledge to the
improvement of hydraulic apparatus, to the increase in power and
efficiency of military engines, to astronomical observations which
facilitated the explorations of the navigator, to a thousand inventions
which promoted the convenience and the happiness of domestic life.
The leisure of the emirs and of the Norman princes was amused,
and the literary ambition of their accomplished courtiers excited, by
the recitations of famous bards, who, in a land which still cherished
the memory of the incomparable poetic inspiration of Greece and
Rome, competed for the applause of an audience in whose eyes
ready improvisation and extravagant metaphors were infallible
tokens of the highest excellence.
Of such a character were the material civilization, the scientific
achievements, the intellectual culture of Moorish and Norman Sicily.
Its glories have long since departed. Of the hundreds of palaces and
mosques whose majestic and elegant proportions were the pride of
the Moslem cities, not one has escaped the destructive touch of
plebeian vandalism and ecclesiastical hatred. The Sicilian population,
from being one of the most cultivated, has degenerated into the
most ignorant of Catholic Europe. The suburbs of Palermo, once the
abode of every science and of every art, are now so infested with
brigands that they cannot be traversed in safety by the traveller
without the protection of an armed guard. For the medical
experience and skilful offices of the surgeon have been substituted
arduous penance and the application of suspicious, often spurious
relics. Intellectual liberty and religious toleration have been
supplanted by the repression of thought, by the discouragement of
every noble impulse, by the tyranny of a superstition which degrades
the mind and enfeebles every aspiration which can promote the
material welfare of humanity.
The enterprising spirit of the Arabs which induced them to extend
their conquests to all accessible points on the Mediterranean early
suggested the occupation of the largest islands of that sea, whose
importance as naval stations whence invading armies might be
transported into Europe, and as bases for the equipment of piratical
undertakings, was fully recognized by every nation. The Balearic
Isles were a dependency of the khalifate of Cordova. They paid
tribute to its sovereigns like other provinces of the empire, furnished
troops for its armies, participated largely in its civilization, and,
fortunate in their isolation, survived for nearly two centuries its
overthrow. Sardinia, invaded by Musa in the first years of the eighth
century, was never completely subjugated by the Saracens. The
mountainous and barren interior of that island, sparsely inhabited by
a barbarous and poverty-stricken peasantry, repelled them from a
conquest whose doubtful advantages could not possibly compensate
for the toil and danger necessary to secure it, and the coast with its
harbors seemed the only territory worthy of their attention. For the
space of seventy years the Moors retained a precarious foothold on
the shores of that island, and the possession of a few insignificant
seaports was disputed by the Franks and Italians with a pertinacity
not unworthy of a contest involving the fate of an extensive
kingdom.
In 722 the Saracens, having become familiar with the extensive
traffic in relics carried on by the Catholic clergy and determined to
turn to their own profit the superstitious credulity of the devout,
entered into negotiations with Liutprand, King of the Lombards, for
the sale of the body of St. Augustine, which had reposed in peace
for two hundred years in the metropolitan church of Cagliari. The
transaction was betrayed by the arrival of the messengers of
Liutprand, and the people, incited by the monks, rose in revolt. An
unsuccessful attempt was made to rescue the ashes of the saint, the
Arab garrison was called out to quell the tumult, and seven monks
paid the extreme penalty of their zeal, and perhaps not wholly
disinterested piety. In view of the precious character of these
mementos and of the difficulties attending their transfer, the Arabs
exacted, in addition to the price already agreed upon, the payment
of three pounds of gold and twelve of silver; an amount which
indicates the immense value of the original ransom. The grief of the
devout inhabitants of Cagliari on account of their loss was somewhat
alleviated by the remembrance that the vestments which had been
torn from the bones of the saint in the struggle still remained in their
hands, and the innumerable miracles wrought by these tattered
garments, confirmed by the highest ecclesiastical authority, long
attested the celestial influence and supernatural virtues possessed
by the sacred relics of the deceased Bishop of Hippo.
Crete, captured by refugees from Spain, who, exiled from that
country for treason during the reign of Al-Hakem I., were
subsequently driven from Alexandria by the infuriated populace,
whose hospitality they had abused, remained in the hands of the
Moslems until 961, when it was reconquered by the Greeks. The
Spanish Arabs about the year 806 descended upon the coast of
Corsica. The timely aid of King Pepin prevented the immediate loss
of that island, which, however, was occupied by the Saracens in 810.
The despairing Corsicans, who had betaken themselves to the
mountain solitudes, solicited the aid of Charlemagne, who sent a
powerful fleet to their relief. The Moslems, after a series of
sanguinary engagements, were absolutely exterminated by the
ferocious warriors of the West; but the unfortunate Corsicans fared
little better than their enemies, for it is stated by respectable
authority that nine-tenths of the population perished within less than
three years from the effects of the Saracen invasion. The shores of
the island are still covered with ruins of extensive towns and cities
dating from that period, indicating the former prosperity of the
inhabitants, as well as the frightful calamities which they must have
endured at the hands of the truculent adventurers of Spain and
Africa.
Malta, acknowledged in the Middle Ages, as now, to be the key of
the Eastern Mediterranean, was for two hundred and twenty years
an important dependency of the Sicilian Emirate. Taken by the
Moslems in 870, it was occupied by the Norman troops, led by Count
Roger in person, in 1090. The subjects of the Greek Emperor were
put to death or enslaved, but for the native Maltese the Arabs
manifested an unusual partiality. Their lot was far more tolerable
than that of the tributary Christians of Sicily, their religion was
unmolested, their taxes were moderate, the privileges conceded to
them more favorable than those ordinarily accorded to infidels. The
inhabitants of all these islands, except Sicily, which made war upon
an extensive scale, subsisted by piratical depredations and by trade
in slaves, in which reprehensible practices the Moors of Malta early
obtained an undisputed and infamous pre-eminence.
In this chapter has been traced an incomplete outline of the
origin, progress, and decline of the Moslem domination in Sicily, a
subject which, if elaborated, would embrace many volumes. From
this imperfect sketch, however, the reader may form an idea of a
civilization centuries in advance of that of any contemporaneous
people, with the single exception of the Spanish Arabs; a civilization
which, fostered and perpetuated under the brilliant reign of the
Emperor Frederick II., effected such a memorable revolution in the
ideas and opinions entertained as indisputably correct by the devout
and the credulous of many preceding ages.
CHAPTER XVI
THE PRINCIPALITIES OF MOORISH SPAIN

1012–1044
Immobility of the African Race—Its Hostility to Civilization—Its
Pernicious Influence on the Politics of the Western Khalifate—
Character of Suleyman—Invasion of Ali—He ascends the Throne
—His Tyranny—He is assassinated—Abd-al-Rahman IV. succeeds
Him—Yahya—Abd-al-Rahman V.—Mohammed—Hischem III.—
Organization of the Council of State—Ibn-Djahwar, the Minister—
His Talents and Power—Abul-Kasim-Mohammed, Kadi of Seville—
Berber Conspiracy—The Impostor Khalaf is raised to the Throne
as Hischem II.—Almeria—The Vizier Ibn-Abbas—Influence of the
Jews at Granada—The Rabbi Samuel—Rivalry of Granada and
Almeria—Abu-al-Fotuh—Motadhid ascends the Throne of Seville—
His Cruel and Dissolute Character—His Collection of Skulls—Badis,
King of Granada—-Increasing Power of Castile—Valencia and
Malaga—Atrocities of the Christians at Barbastro.
From the earliest period mentioned in history, as has been
remarked in a previous chapter, the spirit of the various tribes
inhabiting the great continent of Africa has been constantly hostile to
human progress. The ignorance, cruelty, and depravity of those
nations whose territory did not touch the shores of the
Mediterranean have always seemed impregnable to the beneficent
and ordinarily irresistible influences of civilization. It is true that the
northern extremity of that continent has been the seat of powerful
empires, of great cities, of rich and enterprising centres of
commercial activity. But this superior culture, confined to a narrow
strip whose southern boundary was only a few days’ journey from
the coast, was without exception exotic. The origin of the Egyptians,
lost in the depths of a remote and unknown antiquity, has never
been conclusively established. But it is almost certain that it was not
African. The ethnical peculiarities which formerly distinguished, and
are still noticeable in, the inhabitants of the Valley of the Nile had
nothing in common with the physical and mental characteristics of
surrounding nations. The rigid seclusion that, as a principle of
national policy, prevailed in ancient Egypt from time immemorial
sufficiently precludes the existence of extraneous influence.
Subsequently, under the enlightened empire of the Ptolemies, while
the form of government and the religious ceremonial of ancient
times were preserved, the traditions of the schools and the social
atmosphere which surrounded the splendid court of Alexandria were
entirely Grecian. Carthage was a Phœnician colony. The instincts of
its citizens, their energy, their duplicity, their luxury, their vices, their
political organization, their maritime enterprise, their architecture,
and their gods were Tyrian, and consequently Asiatic. The prosperity
enjoyed by the Latin colonies established after the Punic Wars, when
the countries situated on the southern shores of the Mediterranean
shared with Egypt the burden of providing sustenance for the
slothful and turbulent populace of Italy, was due to the example, the
policy, the institutions of Rome. The empire of the Edrisites, the
magnificence of Fez and Kairoan, the wonderful cultivation of the
Desert, the subjugation and control of the fierce tribesmen of the
Atlas, were the work of princes of Arab blood. In all these glories of
commerce, art, and opulence the Africans had no share. They served
in the armies of the conqueror, but without loyalty, honor, or
gratitude. Their insubordination wrought far greater injury to the
cause of good government than their efforts promoted its
advancement. They zealously preserved their malign and destructive
instincts in the midst of the most refined and intellectual society of
the age. Incapable of profiting by the civilization by which they were
surrounded, their only aim seemed to be the obliteration of those
evidences of mental superiority which they could neither appreciate
nor enjoy. Nor have the benevolent and humanizing influences of the
nineteenth century been able to remove the incorrigible barbarism of
the African. The tribes of the Sahara are no further advanced in the
arts of peace than when they yielded a sullen and reluctant
obedience to the military genius of Musa. The lives of well-meaning
sentimentalists have been vainly sacrificed to ameliorate the
debased condition of the Negro. Even with the example of the most
polished nations of modern times before him, the advantages of
education, rare opportunities for the accumulation of wealth,
intimacy with the learned, participation in government, social
privileges—all these blessings have served only to confirm and
emphasize the inherent and irredeemable stupidity, malice, and
bestiality of his nature,—characteristics transmitted by a savage,
perhaps by a simian ancestry. Association with the Romans—
degenerate as they had become since the glorious days of the
Republic and the Empire—aroused in the minds of the Goth and the
Vandal aspirations to, at least in some degree, imitate that
excellence which made their own deficiencies the more conspicuous.
They gradually discarded their savage customs. They adopted the
salutary institutions of the vanquished. They emulated—often with
little success, but with the most praiseworthy intentions—the heroic
virtues of antiquity. By this means the immortal genius of Roman
civilization in a measure survived, to exert its refining power upon
subsequent ages. Not so, however, with the African. His proximity to
and intercourse with the highly cultured nations of Europe produced
no improvement in his domestic life, no stimulation of his intellectual
faculties, no mitigation of his brutal and ferocious nature. He was
the principal means by which the Ommeyade empire was both
founded and annihilated. His native rudeness and repugnance to
discipline were manifested even before the termination of the
Conquest. From the hordes of the Atlas and the Sahara were
recruited the ruthless soldiery by whom the disturbances that
distracted the emirate were perpetuated. They formed an important
but treacherous contingent of the armies of the khalifate. While
nominally adherents of the Mohammedan faith, they continued to
observe those idolatrous ceremonies which had provoked the
maledictions of the Prophet. Obedience to the sovereign was always
subordinated to reverence for the chieftain. They maintained under
the most adverse circumstances the primitive traditions of their race.
Their camp was the daily scene of savage rites, of the practice of
divination, witchcraft, sorcery, and magic. In their civil organization,
the patriarchal simplicity of the Desert prevailed, their military
evolutions were the clamorous and irregular demonstrations of brave
but undisciplined barbarians. Their overpowering impulse was that of
indiscriminating destruction. They viewed with stolid indifference the
incomparable monuments of Saracen culture. The most exquisite
works of art, in whose fabrication was exhausted the skill of the
goldsmith and the enameler, were broken and melted for the sake of
the precious metals they contained. The Berber was the very
embodiment of cruelty, perfidy, disorganization, and ruin. In
comparison with his boundless capacity for mischief, all the
destructive agencies exerted by the hostile races composing the
population of the Western Khalifate were insignificant. The
inexhaustible numbers of the tribes of Numidia and Mauritania,
whence were drawn alike the instruments of regal tyranny and of
servile revolution, their prowess, their indomitable ferocity, their
impetuous ardor, the persistence of their Pagan ideas and their social
customs, rendered them most formidable impediments of civilization.
To the incessant immigration from Africa, to the enrolment of Berber
mercenaries in the armies of Mohammedan Spain, to the impolitic
appeals for aid to the semi-barbarian princes of Al-Maghreb, are to
be attributed far more than to the rivalry of Arab tribes or to the
inherent defects of the Moslem constitution—serious as these
undoubtedly were—the succession of disasters which overtook the
empire of the Ommeyades, and the unspeakable crimes which stain
the Moorish annals of the eleventh century, whose deplorable
consequences were felt to the remotest corners of the Peninsula.
I have been led to the consideration of the topic discussed in the
preceding pages by reason of the prominent part assumed by the
African tribes during the closing years of the Moslem domination in
Spain. While an apparent digression, it is in fact inseparable from a
complete account of the events transpiring in the dominions once
embraced by the khalifate of Cordova. The relations of Africa and
Mussulman Europe had long been intimate. The jealousies of
ambition and sovereignty had, except in infrequent and isolated
cases, been subordinated to the offices of mutual kindness and
friendship. No serious acts of hostility had as yet been permitted to
interrupt the cordial intercourse which—facilitated by the short
distance separating the two continents—existed between nations
acknowledging, at least in form, the same religion and governed by
similar laws. Wealthy traders maintained commercial establishments
at the same time in Almeria and Kairoan. The sons of sheiks of the
Desert rose to high commands under the famous princes of the
House of Ommeyah. The negro slaves of the Soudan were
repeatedly chosen to guard the sacred person of the monarch. The
erudition of the philosophers of Cordova had been exhibited to the
astonishment, if not to the approbation, of the fanatical sectaries of
Fez. Powerful princes of Mauritania had more than once rendered
homage and paid tribute to the rulers of the mighty Khalifate of the
West. They had submitted with a feeling of pride to the supremacy
of one of the most renowned of those rulers, for they remembered
that he was popularly reputed to be of the same origin and of
kindred blood. During the administration of Al-Mansur, no African
prince would have cherished the apparently chimerical hope that his
dynasty was destined to influence, in a decisive way, the future of
the Peninsula. The death of that great commander, who left no
worthy successor, encouraged the aspirations of every ambitious
chieftain to plunge the country into anarchy, a condition from which
he might possibly emerge with the lion’s share of power and plunder.
In less than forty years the Berbers obtained control of the most
valuable portion of the rich inheritance of the Moslems of Spain; in
less than a century and a half the magnificent empire of the
Ommeyades, whose civilization had been the marvel of the age, its
cities sacked and demolished, its fertile fields laid waste, its
commerce annihilated, its industrious and thriving population
massacred or condemned to painful servitude, had descended, from
the exalted rank of a monarchy whose name was mentioned with
respect and fear by the most distant and inaccessible nations, to the
humiliating position of a dependency of the barbarous and illiterate
sultans of Africa.
The jurisdiction of the self-designated Khalif Suleyman, who, as
the head of the Berber faction, had acquired an appearance of regal
authority by a frightful expenditure of blood, was confined to a
circumscribed extent of territory including only five populous cities,
of which Cordova, whose possession implied the prestige and power
of an imperial title, was, of course, the most important. At the first
appearance of national discord consequent on the dismemberment
of the khalifate, the military commanders who occupied the
strongest fortresses proclaimed their neutrality or independence. The
Eastern provinces of the Peninsula, whose territory had hitherto
escaped the calamities which had so seriously afflicted the less
fortunate regions of the West, preserved, by the freedom of their
ports, the enterprise of their merchants, and the unmolested
industry of their laborers, a prosperity of diminished extent and
uncertain duration, but one which contrasted vividly with the
miserable condition of the once flourishing centres of trade and
agriculture, in happier days the pride of beautiful Andalusia. Here
the Slave officers appointed under the nominal authority of the royal
puppet, Hischem II., held their courts and displayed on a limited
theatre all the luxurious magnificence and tyrannical caprices of
Asiatic despotism. In the North, where the adherents of the Amirides
abounded, the Berber princes of Saragossa and Toledo maintained
an appearance of barbaric pomp and martial rivalry. From the latter,
who, like the Slaves, had asserted their independence, Suleyman,
although his troops were allied to their subjects by the closest bonds
of nationality and relationship, could expect no support. He was
therefore compelled to rely entirely upon his army, composed of
soldiers of fortune, whose fidelity was wholly dependent on the
willingness of their general to indulge their mutinous instincts and
their love of rapine. Of these mercenaries, who, half Pagan and half
Christian, served with singular inconsistency under the standard of a
Moslem prince against sectaries of his own religion, the bitter
enemies of both, the Berbers were the controlling element. They
were regarded by the mass of the population of Moorish Spain, and
especially by the Arabs of noble blood, with peculiar execration. The
fact that under the very shadow of the noble mosques of the
Andalusian capital they habitually practised heathen rites denounced
by the Koran and abhorred by every Mussulman was notorious. The
rich and flexible idiom of the Peninsula, the pride of the Arab, the
language spoken by the Prophet, the medium by which the learning
of the scholars of the Moslem world had been communicated and
preserved, was wholly unknown to them. Their uncouth manners
and insolent bearing excited the disgust of a people proverbial for
their native refinement and dignified courtesy. Every city, every
hamlet, every plantation, bore ineffaceable marks of the blind
ferocity of these detested foreigners. They had sacked the splendid
metropolis of the West. They had transformed the unrivalled palace
and suburb of Medina-al-Zahrâ into a heap of blackened ruins. Their
violence had made of the most fertile portions of Andalusia an
uninhabited and gloomy solitude. The towns swarmed with Berber
robbers, who pursued their nefarious calling almost without
hinderance; the country was unsafe on account of the organized
bands of Berber outlaws that infested the highways. Crime of every
description enjoyed immunity through the corrupt partnership of its
perpetrators with the authorities, who greedily shared their booty.
The confiscated spoils of noble families that traced their ancestry to
the Companions of the Prophet were flaunted with the shameless
impudence of legalized brigandage and irresponsible power in the
faces of their former owners now reduced to penury. The beautiful
wives and daughters of the Arab aristocracy were dragged from their
homes to pine in the harems of brutal and half-savage Berber
chieftains. The African prejudice against learning had caused the
extermination of the philosophers of Cordova,—a deed whose
atrocity was aggravated by the fact that the victims were non-
combatants, a class protected by the soldiery of every generous and
self-respecting nation. Not without cause did the poet lament that
the wrath of Allah had unchained a legion of demons to afflict with
unspeakable misery the imperial cities adorned with the triumphs of
the august line of the Ommeyades.
The sovereign of these oppressors, through the circumstances of
his position, had become a cruel tyrant. By nature he was inclined to
peace. When untrammelled by the baneful associations which had
corrupted his mind, and through whose influence he had risen to
power, he exhibited the disposition of a generous and enlightened
ruler. He strictly observed the principles of humanity and justice. His
decisions as a magistrate were characterized by a spirit of impartial
equity. His temper was mild. He was a friend of letters, and disclosed
in the poetic efforts attributed to him ability of no mean order. His
greatest delight was in the familiar conversation of scholars, whose
talents he appreciated and whose tastes he encouraged. He availed
himself of every resource at his command to restore tranquillity and
confidence in the communities terrorized by the excesses of his
followers. It was only when the interests of the latter were directly
involved that he remembered the instruments of his greatness, and
sanctioned crimes that have left an indelible blot upon his name.
In spite of the pretensions of Suleyman and his occupation of the
throne of the khalifs, the khotba, or public prayer, for Hischem II.,
whose death had not been established to the satisfaction of the
people, was still, despite the entreaties and the protests of the
usurper, recited in the Andalusian mosques. The corpse of the last of
the Ommeyades had never been exhibited to the populace for
identification. The presumption of his survival was in a measure
confirmed by the strict seclusion in which he had passed his life. A
generation of tutelage and imbecility had not entirely destroyed the
prestige of that dynasty whose heroic achievements had reflected
such lustre on the Moslem name. Pretenders to the supreme power,
concealing their ambition under the specious pretext of liberating an
imprisoned sovereign and avenging his wrongs, arose throughout
the cities of the South. The ablest and most powerful of these was
Khairan, governor of Almeria, an official who had stood high in the
favor of Al-Mansur. Even in Africa the aspirations of enterprising
generals were excited by the alluring prospect of a vacant throne, a
prize which in the lottery of war might readily fall to a bold and
fortunate soldier. The excellent qualities of Suleyman did not
compensate in the eyes of the multitude for the unpopular methods
by which he had risen to power. A leader was soon found who was
disposed to profit by the universal discontent. Ali-Ibn-Hamud, at that
time governor of Ceuta, had been one of the ablest officers in the
armies of Al-Mansur and had served with distinction under that
commander. He traced his genealogy to the family of Mohammed.
His ancestors, long domiciled in Mauritania, were, however, regarded
by the Berbers as of common nationality with themselves. His
instincts and associations led him to identify himself with their cause,
although he claimed descent from the son-in-law of the Prophet. An
understanding was established by the emissaries of their
countrymen between the ambitious general and certain conspirators
in Spain. Gifted with the astuteness of his race, he easily deceived
the superstitious Khairan with a false account of an interview with
Hischem, during which he alleged that the latter had appointed him
his successor, proclaimed himself the champion of the persecuted
Khalif, and, enlisting the sympathies of the innumerable malcontents
who viewed with favor any plan promising the overthrow of
Suleyman, soon found himself at the head of a formidable
revolution.
Ali had hardly landed in Andalusia, before Amir-Ibn-Fotuh,
governor of Malaga, whose attachment to the family of the
dethroned Khalif had been recently strengthened by the
appropriation of a part of his dominions by the Berbers, surrendered
that important fortress, and, Ali having formed a junction with
Khairan at Almuñecar, the allied army pressed forward without delay
to attack the capital. Zawi, the governor of Granada, whose authority
and resources equalled those of Suleyman himself, as soon as
intelligence of the invasion reached him, announced his adherence
to the cause of the insurgents. The times had never been more
auspicious for the enterprise of a pretender. By the populace, too
often disposed to hold the leader responsible for the delinquencies
of his faction, Suleyman was regarded as a fiend incarnate. The
soldiers despised him because they mistook his disposition to lenity
for an indication of cowardice. The supporters of the ancient dynasty
and the dependents of the Amirides, who attributed to his agency
the persecution of which they had been the victims, never
mentioned his name without a curse. The palace and the Divan were
as usual on such occasions centres of intrigue. The army swarmed
with traitors. In Cordova itself the mob, which had enjoyed for
centuries an unenviable reputation for inconstancy and turbulence,
awaited with impatience the signal for revolt. The consequences of
this political condition soon became evident. The detachments sent
by Suleyman to check the insurgents were one after another put to
flight. When the Prince himself appeared in the camp to take
command in person, he was seized by his own troops and sent in
chains to the enemy. A few days afterwards the wretched Suleyman
received at the hands of the executioner, after the infliction of every
insult, the last penalty of disaster and incapacity,—the usual fate of
captive monarchs in that barbarous age. In spite of the diligent
search instituted by the victorious generals, the missing Hischem
could not be found, and, as previously related, although Suleyman
had insisted that he was dead, the corpse exhumed as his and
subjected to a superficial and insufficient identification was not
accepted as genuine by those not interested in supporting a fraud,
and the fate of the unfortunate son of Al-Hakem remains to this day
an impenetrable mystery.
In compliance with an agreement in which he had taken
advantage of the credulity of Khairan, Ali now assumed the royal
insignia and authority, with the title of Al-Nassir-al-Din-Allah, and
another usurper was invested with the uncertain and perilous dignity
of nominal ruler of the dismembered khalifate.
Contrary to the expectations of his opponents, and to the infinite
disgust of his partisans, who had counted upon indulgence in
unbridled license, the beginning of the reign of Ali was marked by a
display of moderation and justice for many years unknown to the
unhappy people of Andalusia. Before his tribunal the distinctions of
faction were no longer recognized, and the Spaniard, without regard
to his political relations, received equal consideration with the
African. The bandit propensities of the Berbers were mercilessly
repressed. The fact that Ali had been reared among them, was
connected with their race by ties of consanguinity, was familiar with
no other tongue but theirs, and had been raised to the throne
through their influence, afforded no security to the Berber
malefactor. The slightest act of rapine was punished with instant
death. An incident is related by the Arab historians which conveys a
significant idea of this summary administration of justice. As the
Khalif was once passing through a gate of the capital, he
encountered a mounted Berber with a quantity of grapes on the
saddle before him. The royal cavalcade was instantly halted, and the
Prince demanded of the horseman: “Whence hast thou obtained
those grapes?” “I seized them like a soldier,” was the insolent reply.
At a signal from Ali, the culprit was at once dragged to the roadside
and decapitated. His head was then fastened upon the grapes, and
the horse, with its ghastly burden, preceded by a crier, was led
through the principal streets of the city as an example of the fate to
be expected by all whose lawless inclinations, confirmed by former
impunity, tempted them to violate the rights of person and property.
In the forms of legal procedure the new ruler discarded the habits of
seclusion and mystery affected by the later Ommeyades, and
returned to the ancient and patriarchal simplicity which had
characterized from time immemorial the unceremonious judicial
tribunals of the Orient. On certain appointed days, attended by a
slender retinue and with scarcely any tokens of his exalted rank, he
sat at the gate of the palace to receive the complaints and redress
the grievances of his subjects. At the bar of this court no offender
could hope for immunity through pride of lineage, amount of wealth,
or important tribal affiliations. Justice was meted out equally to all.
The executioner was constantly in attendance, and infliction of the
penalty, whether by scourging, imprisonment, or death, followed
closely upon the sentence. As the Berbers constituted the majority of
the delinquents, they soon began to denounce their sovereign as a
political apostate and an enemy of his race. This exhibition of judicial
severity was followed by the most satisfactory results. The
irresponsible infliction of unusual punishments was replaced by the
regular process of law. The Berbers submitted sullenly but
completely to the disagreeable but wholesome restraints of
discipline. The citizen and the peasant could now, without serious
molestation, pursue their ordinary employments. The streets became
safe for pedestrians. The highways were purged of banditti.
Commerce began to revive. The partiality of Ali for the Andalusians,
who, as the more peaceable class of the population, were seldom
arraigned before the magistrate to answer for violation of the laws,
became daily more marked. Indeed, he had formed the
commendable design of depriving his Berber subjects of the property
they had acquired by the pillage of their neighbors, and of restoring
to the latter the estates which had been confiscated without other
warrant of authority than that conveyed by force during the lawless
period which had followed the death of Al-Mansur. This plan was
frustrated by the habitual inconstancy and ingratitude of the people,
fomented by the discontent of a military leader, whose exaggerated
estimate of his own abilities was in a direct proportion to his
inordinate ambition.
For nearly two years Ali governed the states of his contracted
kingdom with exemplary firmness and wisdom. But, while reluctantly
acknowledging the benefits they enjoyed, the partisans of the House
of Ommeyah could never forget the foreign origin and barbarian
antecedents of the determined prince who had avenged their
wrongs and tamed the ferocity of their savage oppressors. As for the
Africans, they detested the ruler who owed his rank to their courage
and treachery, and who repaid their devotion with a contumely and
an impartial disregard of their claims which they did not hesitate to
denounce as the most flagrant ingratitude. Thus the inflexible justice
of Ali alienated his partisans, while the national prejudice against his
race operated to his disadvantage in every other quarter. Aware of
this feeling, Khairan, who felt aggrieved because he was not
intrusted with a larger share in the government he had contributed
to establish, organized a conspiracy to restore the Ommeyades to
power. Al-Morthada, a great-grandson of Abd-al-Rahman III., was
selected as the representative of the malcontents under the title of
Abd-al-Rahman IV. The prestige investing the name of the illustrious
family of the pretender, the hope of vengeance upon the Berbers,
the prospect of revolution, so attractive to the Andalusian mind,
brought many followers to his standard. Valencia declared for him.
The governor of Saragossa espoused his cause and marched
southward with a force of several thousand men. The services of
Raymond, Count of Barcelona, were secured, and he appeared in
the rebel camp at the head of a squadron of Christian knights
sheathed in complete armor. The popularity of the enterprise
enlisted the sympathy of the peasantry, always prone to insurrection.
In Cordova the presence of the soldiery alone prevented an
outbreak, and it was problematical for how long a time the garrison
would be able to overawe the populace, even if their own fidelity
remained unshaken. Indignant that his efforts for the restoration and
maintenance of public order should meet with such a recompense,
Ali renounced the statesmanlike policy he had hitherto pursued. The
Berbers again reigned supreme in the capital. Once more the streets
rang with the tumultuous din of outrage and riot, with the groans of
murdered men, with the shrieks of violated women. The tribunals,
which for many months had dispensed justice with rigid impartiality,
now refused to entertain a complaint against the military tyrants
whose passions, exasperated by restraint, raged with redoubled
violence. An army of informers was maintained by the government,
and eminent citizens were daily consigned to dungeons on the false
testimony of the vilest of mankind. This spirit of espionage was so
general that it is remarked by a writer, who himself witnessed these
scenes, that “one-half of the inhabitants was constantly employed in
watching the other half.” The possession of wealth was of itself a
powerful incentive to an accusation of treason. A convenient and
effective method of replenishing the treasury was devised by causing
the arrest of the rich upon fabricated evidence and then restoring
them to liberty after payment of an exorbitant ransom. When the
friends of the victims came to escort them to their homes, their
horses were seized and they were forced to return on foot. It was
not unusual for the houses of the nobles to be robbed in open day
by the African guards of the Khalif. The few remaining palaces
erected by the Ommeyades were destroyed; the known adherents of
that faction were persecuted with unrelenting severity, and every
conceivable insult was visited upon those whose prejudices against
the party in power were assumed to exist by reason of their literary
tastes or their superior erudition. The mosques, which heretofore,
either from superstitious fear or from motives of policy, had been
exempt from forced contributions, were now subjected to the most
vexatious extortion. Their ornaments were carried away. Their
revenues were confiscated. The ministers of religion were taxed.
Many of the finest temples of the capital were deserted or became
the haunts of nocturnal marauders. Even the devout dared not
assemble for the worship of God. The consciousness of the
perfidious ingratitude displayed by his subjects so embittered the
temper of the Khalif that he resolved upon the most extreme
measures, and publicly announced his intention of razing to its
foundation the city of Cordova. The accomplishment of this
malignant design, which, in destroying the most splendid
architectural monument of Moslem genius, would at the same time
have inflicted an irreparable injury upon art and archæology, was
fortunately frustrated by the assassination of the tyrant. Three of his
most trusted slaves, animated by a desire to liberate their country
from the evils from which it suffered, and, so far as can be
determined, without the co-operation of others, killed Ali in the bath
on the very day he was about to take the field against the enemy.
The murder of the usurper was far from producing the effect
desired and expected by the revolutionists, who everywhere hailed it
with the most extravagant demonstrations of rejoicing. The dreaded
Africans still overawed the populace of the capital. The emissaries of
Al-Morthada were unable to arouse the mob, in whose mind was still
fresh the remembrance of the merciless vengeance of these
barbarians. A council of chieftains was assembled, and the crown
was offered to Kasim, the brother of Ali, at that time governor of
Seville, who, a trusty lieutenant of Al-Mansur, had served with
gallantry in many campaigns against the Christians.
While these events were taking place the cause of the Ommeyade
party was declining. Its head, who had been proclaimed khalif under
the name of Abd-al-Rahman IV., manifested too independent a spirit
to please those who had expected to retain him in perpetual
subjection. After the factitious enthusiasm of revolution had
subsided, the ranks of the insurgents began to be seriously depleted
by desertions. Recruits could not be enlisted for an enterprise which
now offered the unattractive prospect of much fighting and privation
and but little plunder. The governors of important towns held aloof,
or withdrew from an alliance which they had never heartily indorsed.
Even the ardor of the leaders was visibly cooled. Khairan himself,
whose treasonable propensities were incorrigible, now agreed with
Zawi, governor of Granada,—before which city the revolutionary
army was encamped,—to abandon the Ommeyade pretender during
the first engagement. The perfidious compact was fulfilled to the
letter. The traitors deserted in the heat of battle, the faithful
adherents of Al-Morthada were overpowered and cut off to a man,
and that unfortunate prince, having escaped with difficulty from the
field, was followed and put to death by the horsemen of Khairan.
With the death of Ali had disappeared the last impediment to the
undisputed ascendency of the Berber faction. The people of
Cordova, who had taken no active part in the recent disturbances,
submitted with scarcely a murmur to the government of a sovereign
who, though trained in camps, evinced little inclination for scenes of
bloodshed. The persecution of Ali had effectually broken the spirit of
the Andalusian nobility. The wealthy were impoverished. The
philosophers, the theologians, the faquis,—whose hypocrisy served
as a convenient cloak for their ambition,—had been either
exterminated or driven into exile. Thus, the elements of successful
resistance having been paralyzed or entirely eliminated, a rare
opportunity was afforded for the restoration of order and prosperity.
In the very first dispositions of his reign, Kasim displayed a tact and
a magnanimity which would have done credit to the most
enlightened monarch. He suppressed the violence which had
hitherto been tolerated, if not sanctioned, by representatives of the
law. He granted an amnesty to the vanquished. The treason of
Khairan was pardoned. Eminent supporters of the ancient dynasty
were raised to important and responsible commands. Strenuous
efforts were made to heal the wounds caused by generations of civil
war and to reconcile, at least in appearance, the political dissensions
prevailing even among individuals of the same family, and which
constantly distracted the peace of every community. This patriotic

You might also like