Beginning XML, 4th Edition
Published by
Wiley Publishing, Inc.
10475 Crosspoint Boulevard
Indianapolis, IN 46256
www.wiley.com
Copyright 2007 by Wiley Publishing, Inc., Indianapolis, Indiana
Published simultaneously in Canada
ISBN: 978-0-470-11487-2
Library of Congress Cataloging-in-Publication Data:
Beginning XML / David Hunter ... [et al.]. 4th ed. p. cm.
ISBN 978-0-470-11487-2 (paper/website)
1. XML (Document markup language) I. Hunter, David, 1974 May 7-QA76.76.H94B439 2007
006.7'4--dc22
2007006580
No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning or otherwise, except as permitted under Sections 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600. Requests to the Publisher for permission should be addressed to the Legal Department, Wiley Publishing, Inc., 10475 Crosspoint Blvd., Indianapolis, IN 46256, (317) 572-3447, fax (317) 572-4355, or online at www.wiley.com/go/permissions .
LIMIT OF LIABILITY/DISCLAIMER OF WARRANTY: THE PUBLISHER AND THE AUTHOR MAKE NO REPRESENTATIONS OR WARRANTIES WITH RESPECT TO THE ACCURACY OR COMPLETENESS OF THE CONTENTS OF THIS WORK AND SPECIFICALLY DISCLAIM ALL WARRANTIES, INCLUDING WITHOUT LIMITATION WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE. NO WARRANTY MAY BE CREATED OR EXTENDED BY SALES OR PROMOTIONAL MATERIALS. THE ADVICE AND STRATEGIES CONTAINED HEREIN MAY NOT BE SUITABLE FOR EVERY SITUATION. THIS WORK IS SOLD WITH THE UNDERSTANDING THAT THE PUBLISHER IS NOT ENGAGED IN RENDERING LEGAL, ACCOUNTING, OR OTHER PROFESSIONAL SERVICES. IF PROFESSIONAL ASSISTANCE IS REQUIRED, THE SERVICES OF A COMPETENT PROFESSIONAL PERSON SHOULD BE SOUGHT. NEITHER THE PUBLISHER NOR THE AUTHOR SHALL BE LIABLE FOR DAMAGES ARISING HERE-FROM. THE FACT THAT AN ORGANIZATION OR WEBSITE IS REFERRED TO IN THIS WORK AS A CITATION AND/OR A POTENTIAL SOURCE OF FURTHER INFORMATION DOES NOT MEAN THAT THE AUTHOR OR THE PUBLISHER ENDORSES THE INFORMATION THE ORGANIZATION OR WEBSITE MAY PROVIDE OR RECOMMENDATIONS IT MAY MAKE. FURTHER, READERS SHOULD BE AWARE THAT INTERNET WEBSITES LISTED IN THIS WORK MAY HAVE CHANGED OR DISAPPEARED BETWEEN WHEN THIS WORK WAS WRITTEN AND WHEN IT IS READ.
For general information on our other products and services please contact our Customer Care Department within the United States at (800) 762-2974, outside the United States at (317) 572-3993 or fax (317) 572-4002.
Trademarks: Wiley, the Wiley logo, Wrox, the Wrox logo, Programmer to Programmer, and related trade dress are trademarks or registered trademarks of John Wiley & Sons, Inc. and/or its affiliates, in the United States and other countries, and may not be used without written permission. All other trademarks are the property of their respective owners. Wiley Publishing, Inc., is not associated with any product or vendor mentioned in this book.
Wiley also publishes its books in a variety of electronic formats. Some content that appears in print may not be available in electronic books.
I would like to thank God, for continuing to give me opportunities to do what I love; my church family, for giving me more support than I deserve; and Andrea, for giving me more support than anyone deserves. I would also like to thank the editors, for their constant help.
Their dedication to the quality of this book was a major factor in its success. David
To Ali and Jude, for their loving patience. Jeff
To my two brothers, Peter and Stephen, who have both helped me in my life and career in their own ways, many thanks. Joe
To my wife, Catherine, and children, Deborah, David, Samuel, and Sarah, for their patience and support while I am busy writing books. Eric
To my late grandmother, Mona Cartledge, who once gave me a Commodore Pet. Danny
About the Authors
David Hunter is a Senior Technical Consultant for CGI, a full-service IT and business process services partner. Providing technical leadership and guidance for solving his clients' business problems, he is a jack-of-all-trades and master of some. With a career that has included design, development, support, training, writing, and other roles, he has had extensive experience building scalable, reliable, enterprise-class applications. David loves to peek under the hood at any new technology that comes his way, and when one catches his fancy, he really gets his hands dirty. He loves nothing more than sharing these technologies with others.
Jeff Rafter is an independent consultant based in Redlands, California. His focus is on emerging technology and web standards, including XML and validation. He currently works with Baobab Health Partnership with a focus on improving world health.
Joe Fawcett (http://joe.fawcett.name) started programming in the 1970s and worked briefly in IT when leaving full-time education. He then pursued a more checkered career before returning to software development in 1994. In 2003 he was awarded the title of Microsoft Most Valuable Professional in XML for community contributions and technical expertise; he has subsequently been re-awarded every year since. Joe currently works in London and is head of software development for FTC Kaplan Ltd., a leading international provider of accountancy and business training.
Eric van der Vlist is an independent consultant and trainer. His domains of expertise include web development and XML technologies. He is the creator and main editor of XMLfr.org, the main site dedicated to XML technologies in French, the lead author of Professional Web 2.0 Programming, the author of the O'Reilly animal books XML Schema and RELAX NG and a member or the ISO DSDL (, or meet him at one of the many conferences where he presents his projects.
Danny Ayers is a freelance developer and consultant specializing in cutting-edge web technologies. His blog (http://dannyayers.com) tends to feature material relating to the Semantic Web and/or cat photos.
Linda McKinnon has more than 10 years of experience as a successful trainer and network engineer, assisting both private and public enterprises in network architecture design, implementation, system administration, and RFP procurement. She is a renowned mentor and has published numerous Linux study guides for Wiley Press and Gearhead Press.
Credits
Senior Acquisitions Editor
Jim Minatel
Development Editors
Sara Shlaer
Lisa Thibault
Technical Editor
Phred Menyhert
Production Editor
William A. Barton
Copy Editor
Luann Rouff
Editorial Manager
Mary Beth Wakefield
Production Manager
Tim Tate
Vice President and Executive Group Publisher
Richard Swadley
Vice President and Executive Publisher
Joseph B. Wikert
Graphics and Production Specialists
Brooke Graczyk
Denny Hager
Joyce Haughey
Jennifer Mayberry
Barbara Moore
Alicia B. South
Quality Control Technician
John Greenough
Project Coordinator
Lynsey Osborn
Media Development Specialists
Angie Denny
Kit Malone
Kate Jenkins
Steve Kudirkan
Proofreading
Aptara
Indexing
Broccoli Information Management
Anniversary Logo Design
Richard Pacifico
Acknowledgments
This book would not have been possible without the work of the many developers dedicated to improving the Web through standards. We would also like to thank the countless contributors to mailing lists, IRC channels, forums, and friends that have helped us through the difficult corners of the specifications and technologies presented in this book.
Next page