SKIP THE SHIPPING
Use code NOSHIP during checkout to save 40% on eligible eBooks, now through January 5. Shop now.
Register your product to gain access to bonus material or receive a coupon.
Essential XML for Web Professionals is the fastest way for busy professionals to master the XML skills needed for building dynamic, portable, and scalable applications. By completeing hands-on projects covering a wide range of development tasks, you'll master key XML technologiesincluding schemas, namespaces, XSLT, XLink, XHTML, and more. Start with simple examples, then work your way up to sophisticated projects. Learn practical techniques! All sample applications found in the book are downloadable from the companion Web site. You can reuse and adapt the code to see exactly how your applications should look and work!
You'll master all this, and much more!
All these books share the same great format, and the same dynamic Web site... so once you've used one, they're all a piece of cake!
Foreword.
Acknowledgments.
About the Author.
1. Introduction to XML.
What XML Is. What's a Markup Language? What's “Extensible?” Summary. What XML Is Good For. Send Anything Anywhere to Anybody. Everyone Can Understand Everything. Write Once, Display Everywhere. Free and Clear. Save the Data. A Brief History of XML. Recap.
Overview. Elements & Nodes. Types of Elements. Empty Elements. Naming Elements. Structure & Syntax. Root Element. Closing Tags. Proper Nesting. Values Must Be in Quotation Marks. XML Version Declaration. Attributes. Rules about Attributes. Use of Attributes vs. Text Nodes. Viewing XML. Comments and the Five Special Symbols. Recap.
What Is a DTD? Why DTDs Are Good. Testing Your DTD. Calling an External DTD. Calling a Public DTD. Defining Elements. Advanced Element Definition (or Making Children Behave). One or More Children. Zero or More Children. Zero or One Children. Specific Number of Children. Choosing Among Children. Twins. Maybe Children, Maybe Not. Element Definition Summary. Defining Attributes. Setting Default Values. Setting and Choosing Attribute Types. Enumerated. ID. IDREF. IDREFS. NMTOKEN & NMTOKENS. Defining Entities and Notation. Predefined Entities. Shortcuts for Text. Entity Jargon. Parsed or Unparsed. General or Parameter. Internal or External. Parameter Entities. External Entities. External General Entities (for the XML). External Parameter Entities (for the DTD). Unparsed Entities and Notations. Embedding Unparsed Entities. Recap.
Introduction to Namespaces. Introduction to XML Schema. Simple Types. Other Number-Based Simple Types. Date- and Time-Based Simple Types. Miscellaneous Simple Types. Creating Custom Simple Types. Forcing Text to Fit a Pattern. Limiting Numerical Values. Limiting Length of Strings. Creating Lists. Combining Simple Types. Determining an Element's Content. Reusable Custom Simple Types. Recap.
Elements Containing Other Elements. Cardinality. xsd:choice. xsd:all. Defining Attributes. Attribute Uses. Attributes and Elements. Attributes and Text. Attributes, Text, and Nested Elements. Creating Custom Complex Types. Referencing Elements and Attributes. New Complex Types Based on Existing Types. Miscellaneous. Named Groups of Elements and Attributes. Groups of Elements. Groups of Attributes. Annotation and Documentation. Including External Files. Recap.
Purpose. Syntax. Default Namespaces. What Namespaces Are. What Namespaces Are Not. Using Namespaces. Scope. Overriding a Namespace. Multiple Namespaces. Namespaces and Attributes. Namespaces and DTDs. Namespaces and Validity. Namespaces and XML Schema. Recap.
Introduction to XLink. What XLink Can Do. How XLink Is Implemented. Concepts and Terminology. Definitions. resource. link. XLink element. traverse. arc. inbound traversal. outbound traversal. third-party traversal. XLink application. simple link. extended link. linkbases. Usage. Attributes. Elements and Their Attributes. Simple Links. type. href. show. actuate. role. arcrole. What Simple Links Can't Do. Simple Links that Seem Like Errors, but Aren't. Links without a Starting Resource. Links with no href Attribute. Simple Links in a DTD. Extended-Type Elements (Extended Links). Locator-Type Elements. Extended Links and DTDs. Resource-Type Elements. Locator-Type Elements. Arc-Type Elements. Setting Several Traversals with a Single Arc. Using arcrole and Linkbases. Title-Type Elements. Simple vs. Extended Links. XLink Attributes. type. href. Semantic Attributes (title, role, arcrole). title. role. arcrole. Behavior Attributes (show, actuate). show. actuate. Traversal Attributes (label, from, to). label. from. to. Recap.
Purpose. Why Bother? Modularized XHTML. What XHTML Is. User Agent Criteria. Differences from HTML. The XHTML DTDs. Recap.
XSL Overview. XSLT. XPath Overview. How XPath Sees the World. Root Nodes. Element Nodes. Attribute Nodes. Text Nodes. Namespace Nodes. Processing Instruction Nodes. Comment Nodes. Location Paths. Unabbreviated Location Paths. Parts of Location Paths. Abbreviated Location Paths. Predicates. Unabbreviated Location Paths with Predicates. Abbreivated Predicates. Conditionals and Operators. Functions. Node-Set Functions. last(). position(). count(location_path). id("id_name"). local-name(location_path). namespace-uri(location_path). name(location_path). String Functions. string(object). concat(string1, string2, , stringn). starts-with(baseString, substring). contains(baseString, substring). substring-before(baseString, substring). substring-after(baseString, substring). substring(string, startPositon, substringLength). string-length(string). normalize-space(string). translate(baseString, startTrans, endTrans). Boolean Functions. boolean(object). not(boolean). Number Functions. number(object). sum(node-set). ceiling(number). floor(number). round(number). Recap.
Overview of XSL. Purpose of XSLT. How XSLT Works. Instructions. Literal Elements. Root Templates. Applying Multiple Templates. Instructions. xsl:value-of. xsl:strip-space. xsl:preserve-space. xsl:sort. xsl:include. xsl:import. xsl:apply-imports. xsl:apply-templates. xsl:call-template. xsl:copy. xsl:copy-of. xsl:for-each. xsl:if. xsl:choose. xsl:when. xsl:otherwise. xsl:variable. xsl:param. xsl:with-param. xsl:decimal-format. xsl:template. xsl:namespace-alias. Creating Nodes. xsl:element. xsl:attribute. xsl:attribute-set. xsl:text. xsl:processing-instruction. xsl:number. xsl:comment. Functions. document(). format-number(). current(). unparsed-entity-uri(). generate-id(). system-property(). element-available(). function-available(). Recap.
Purpose of XPointer. What XPointer Is. ID-Type Attributes. XLink Basics. XPointer Concepts and Terminology. Points. Ranges. Location. Location-Set. Singleton. Subresource. Fragment. XPointer Basics. Full-Form XPointer. Escaping. XPointer Functions. start-point. end-point. string-range. range-to. range-inside. range. here. origin. Recap.
SMIL. Modularization. Why Bother with Modularization? Animation Modules. SplineAnimation Module. ContentControl Modules. BasicContentControl Module. CustomTestAttributes Module. PrefetchControl Module. SkipContentControl Module. Layout Modules. BasicLayout Module. AudioLayout Module. MultiWindowLayout Module. HierarchicalLayout Module. Linking Modules. LinkingAttributes Module. BasicLinking Module. ObjectLinking Module. Timing and Synchronization Module. MediaObjects Modules. BasicMedia Module. Metainformation Module. Structure Module. TimeManipulations Modules. TransitionEffects Modules. SVG. Quirks of SVG. SVG Examples. Rectangle. Circle. Paths. Text Along a Path. WDDX. Recap.
What the DOM Is and Does. Types of Nodes. DOM Interfaces. Properties and Methods. DOMImplementation. Document. Node and NodeType. NodeList. NamedNodeMap. CharacterData. Attr. Element. Text. DocumentType. Notation. Entity. ProcessingInstruction. Recap.
Extensible Markup Language (XML) 1.0 (Second Edition). W3C Recommendation 6 October 2000. Abstract. Status of this Document. Table of Contents. 1 Introduction. 1.1 Origin and Goals. 1.2 Terminology. 2 Documents. 2.1 Well-Formed XML Documents. 2.2 Characters. 2.3 Common Syntactic Constructs. 2.4 Character Data and Markup. 2.5 Comments. 2.6 Processing Instructions. 2.7 CDATA Sections. 2.8 Prolog and Document Type Declaration. 2.9 Standalone Document Declaration. 2.10 White Space Handling. 2.11 End-of-Line Handling. 2.12 Language Identification. 3 Logical Structures. 3.1 Start-Tags, End-Tags, and Empty-Element Tags. 3.2 Element Type Declarations. 3.3 Attribute-List Declarations. 3.4 Conditional Sections. 4 Physical Structures. 4.1 Character and Entity References. 4.2 Entity Declarations. 4.3 Parsed Entities. 4.4 XML Processor Treatment of Entities and References. 4.5 Construction of Internal Entity Replacement Text. 4.6 Predefined Entities. 4.7 Notation Declarations. 4.8 Document Entity. 5 Conformance. 5.1 Validating and Non-Validating Processors. 5.2 Using XML Processors. 6 Notation. A References. A.1 Normative References. A.2 Other References. B Character Classes. C XML and SGML (Non-Normative). D Expansion of Entity and Character References (Non-Normative). E Deterministic Content Models (Non-Normative). F Autodetection of Character Encodings (Non-Normative). F.1 Detection Without External Encoding Information. F.2 Priorities in the Presence of External Encoding Information. G W3C XML Working Group (Non-Normative). H W3C XML Core Group (Non-Normative). I Production Notes (Non-Normative).
Frameset DTD.
Special Characters DTD. Latin Characters DTD. Symbols DTD.
XML Editors. For Macs. DTD Software. XML Parsers.
XML is being ballyhooed as the Next Big Thing, and unlike B2B or push media (remember push?), it probably is. XML is the most exciting and significant thing to hit the Internet since HTML. The good news for you is it's fairly easy to learn (easier than HTML). Microsoft and many others are adopting and developing in XML. XML has the promise to make life a good bit easier for many programmers, so learning XML is a guaranteed marketable skill for the foreseeable future. In other words, learn XML and you'll make more money and your life will be easier. I'm not kiddingI'm seeing it happen to most of the people I know.
Who This Book Is ForThis book is aimed directly at Web developers, which includes both Web page authors and software developers whose applications run over the Web. You don't have to know HTML to learn XML, but it will help if you do. You don't have to know C, Java, PHP, Perl, JavaScript, or any other language. XML is a markup language, not a programming language.
What You Will LearnThis book's purpose in life is to teach you XML so that you can go out into the world and start creating working, valid XML documents. This book is designed to take a novice and turn him or her into a professional XML developer within a few days.
XML comes in many flavors, and the most popular ones are covered here, such as DTDs, XML Schema, XHTML, XSLT, XLink, XPath, SMIL, and others. Sound like alphabet soup? Don't worryat the end of this book you'll be able to dazzle clients and supervisors alike with your intimate knowledge of such things.
The examples in the book are also available on the Web at www.wire-man.com/xml and at www.phptr.com/essential. If you have any questions, complaints, comments or feedback, I welcome them at xmldan@wire-man.com
. I'd love to hear from you.
This book does not cover SAX, SOAP, XML-RPC, RSS, RDF, TREX, RELAX, and so on (Well, I cheated a little and covered DOM in the last chapter.)This book is also not exhaustivethe world of XML is growing exponentially, and instead of overwhelming you with a million-page tome containing every possible form of XML, my goal is to take you from being a novice to being a professional. This book is a tutorial. There's certainly some good reference material in here, but my goal is to teach you XML, first and foremost.