| Acknowledgments | p. xvii |
| Introduction | p. xix |
| Overview of the W3C Document Object Model | |
| Introduction to the DOM | p. 3 |
| What Is the Document Object Model? | p. 4 |
| The DOM Philosophy | p. 6 |
| Yet Another Standard? | p. 6 |
| Design Philosophy | p. 7 |
| Object-Oriented vs. Flat Views of the DOM Interfaces | p. 7 |
| History of the DOM | p. 8 |
| The DOM on the Client | p. 8 |
| The DOM on the Server | p. 9 |
| Levels of the DOM | p. 9 |
| Level 1 | p. 10 |
| Level 2 | p. 11 |
| Level 3 | p. 12 |
| Conventions Used in the DOM Specification | p. 12 |
| What the DOM Isn't | p. 14 |
| Conclusion | p. 15 |
| How the DOM Represents Structured Documents | p. 17 |
| Basic DOM Data Types | p. 18 |
| The DOMString Type | p. 18 |
| The DOMTimeStamp Type | p. 19 |
| Handling Errors: The DOMException Interface | p. 19 |
| The Document Tree Structure | p. 20 |
| DOM Node Types | p. 22 |
| The Fundamental Core DOM Interfaces | p. 24 |
| DOMException Codes | p. 25 |
| The DOM Node Interface | p. 26 |
| Node Helper Interfaces: NodeList and NamedNodeMap | p. 31 |
| The DOMImplementation Interface | p. 33 |
| The Document Interface | p. 34 |
| The DocumentFragment Interface | p. 37 |
| The Element Interface | p. 37 |
| The Attr Interface | p. 40 |
| The CharacterData Interface | p. 41 |
| The Comment Interface | p. 43 |
| The Text Interface | p. 43 |
| The Extended Core Interfaces | p. 44 |
| CDATASection Interface | p. 44 |
| DocumentType Interface | p. 44 |
| Notation Interface | p. 45 |
| Entity Interface | p. 46 |
| EntityReference Interface | p. 46 |
| ProcessingInstruction Interface | p. 46 |
| Conclusion | p. 47 |
| Navigating and Manipulating Structured Documents | p. 49 |
| Working with Nodes | p. 50 |
| A Word About Namespaces | p. 51 |
| Obtaining Object References to Nodes | p. 52 |
| Inspecting Nodes | p. 53 |
| Manipulating Nodes | p. 56 |
| Creating New Nodes | p. 62 |
| Importing Nodes from Other Documents | p. 65 |
| Traversing Documents | p. 67 |
| Using the Node Interface Properties | p. 67 |
| Using the DOM Level 2 Traversal Module | p. 68 |
| Conclusion | p. 84 |
| Real-World DOM | |
| Algorithms | p. 87 |
| DOM Algorithms | p. 88 |
| Basic Node Traversal Algorithms | p. 88 |
| Position-Based Algorithms | p. 91 |
| Determining Whether a Node Has an Ancestor of a Given Type | p. 91 |
| Determining Whether a Node Has a Sibling of a Given Type | p. 92 |
| Content-Based Algorithms | p. 93 |
| Determining Whether a Node Contains Another Node | p. 93 |
| Better Versions of Node Interfaces: Retrieving Relative Nodes by Type | p. 95 |
| Finding a Node by Attribute Value | p. 97 |
| Conclusion | p. 99 |
| Browsers | p. 101 |
| DOM Support in the Major Browsers | p. 102 |
| Microsoft Internet Explorer 6 | p. 103 |
| Netscape Navigator 6.x | p. 103 |
| Opera 6 | p. 104 |
| Using the DOM in a Browser Environment | p. 104 |
| Obtaining a Reference to the Document | p. 105 |
| Examining the Structure and Content of a Page | p. 106 |
| Creating and Modifying Page Elements | p. 110 |
| Handling Events with the DOM Level 2 Events Interface | p. 116 |
| Internet Explorer--Specific Methods and Properties | p. 127 |
| Internet Explorer--Specific Properties | p. 127 |
| Internet Explorer--Specific Methods | p. 128 |
| Browser Quirks | p. 129 |
| Internet Explorer | p. 130 |
| Netscape Navigator | p. 130 |
| Conclusion | p. 130 |
| Applications | p. 133 |
| DOM Implementations Aren't Just for Browsers | p. 134 |
| Standalone vs. Embedded DOM Implementations | p. 135 |
| The Apache Xerces Parser | p. 135 |
| Where to Get Xerces | p. 136 |
| Installing Xerces | p. 137 |
| Getting to Know the API | p. 139 |
| Using Xerces | p. 141 |
| Where to Get More Information About Xerces | p. 152 |
| The Microsoft MSXML Parser | p. 152 |
| Where to Get MSXML4 | p. 152 |
| Installing MSXML4 | p. 152 |
| Getting to Know the API | p. 153 |
| Using MSXML4 | p. 153 |
| Where to Get More Information About MSXML | p. 159 |
| Macromedia Dreamweaver | p. 159 |
| Where to Get Dreamweaver | p. 159 |
| The DOM in Dreamweaver | p. 159 |
| Getting to Know the API | p. 160 |
| Using the Dreamweaver DOM | p. 162 |
| Where to Get More Information About the Dreamweaver DOM | p. 167 |
| Conclusion | p. 167 |
| Debugging DOM Applications | p. 169 |
| Importance of Good Debugging Skills | p. 170 |
| Be Assertive: Use ASSERT() | p. 171 |
| Defining ASSERT() | p. 171 |
| Using ASSERT() Effectively | p. 173 |
| Getting Fancy with ASSERT() | p. 177 |
| Tracing Your Steps with TraceConsole | p. 179 |
| Using the TraceConsole | p. 181 |
| The TraceConsole Functions | p. 182 |
| The DOMDumper | p. 192 |
| DOMDumper Output | p. 193 |
| DOMDumper Code | p. 195 |
| Using the DOMDumper | p. 198 |
| Conclusion | p. 201 |
| Practical Uses of the DOM | |
| Providing Automatic Document Navigation | p. 205 |
| Using the DOM to Provide Better Document Navigation | p. 206 |
| Example: On-the-Fly Bookmarks | p. 207 |
| Setting Up | p. 210 |
| Creating the User Interface Elements | p. 211 |
| Building the Bookmark List | p. 212 |
| Inserting the Bookmark List into the Document | p. 213 |
| Responding to the User's Bookmark Selection | p. 214 |
| Example: Automatic Table of Contents | p. 215 |
| Setting Up | p. 218 |
| Scanning the Document's Nodes | p. 219 |
| Building a TOC Destination | p. 219 |
| Adding the TOC Entry | p. 220 |
| Example: Document Placeholders | p. 221 |
| Setting Up | p. 224 |
| Handling Click Events | p. 225 |
| Finding a Containing Paragraph Node | p. 226 |
| Conclusion | p. 227 |
| Dynamic User Interfaces | p. 229 |
| Building Dynamic User Interfaces with the DOM | p. 230 |
| Creating a Color Picker | p. 231 |
| In-Place List Editing | p. 238 |
| DOM-Based Pop-up Menus | p. 246 |
| Conclusion | p. 254 |
| Client Processing of Data-Driven Documents | p. 255 |
| Processing Data-Driven Documents on the Client | p. 256 |
| Client-Side Sorting | p. 257 |
| Sorting a List | p. 257 |
| Sorting a Table | p. 263 |
| Post-Processing Server-Generated Documents | p. 271 |
| Working with Embedded XML Data in Web Pages | p. 275 |
| Data Islands in Internet Explorer | p. 276 |
| Data Islands in Netscape Navigator | p. 281 |
| Example: Joe's Cafe Menu Application | p. 283 |
| The Menu Page | p. 283 |
| The Menu XML Code | p. 285 |
| Generating the Menu HTML | p. 287 |
| Handling User Interaction | p. 295 |
| Conclusion | p. 299 |
| Future Directions for the DOM | p. 301 |
| Where Is the DOM Headed? | p. 302 |
| Proposed Changes in DOM Level 3 | p. 303 |
| General Changes | p. 303 |
| Abstract Schema Support | p. 307 |
| Error Handling | p. 308 |
| Loading and Saving DOM Documents | p. 309 |
| Attaching Application-Specific Data to Nodes | p. 313 |
| Determining Relative Document Positions of Nodes | p. 316 |
| XPath Support | p. 318 |
| Other Potential Future DOM Enhancements | p. 326 |
| XSLT Support in the DOM | p. 326 |
| Transaction-Oriented Processing | p. 332 |
| Conclusion | p. 334 |
| DOM Core Level 1 API Reference | p. 337 |
| DOM Interface Inheritance Tree | p. 338 |
| Interface Attr | p. 338 |
| Properties | p. 339 |
| Methods | p. 339 |
| Interface CDATA | p. 339 |
| Properties | p. 340 |
| Methods | p. 340 |
| Interface CharacterData | p. 340 |
| Properties | p. 340 |
| Methods | p. 341 |
| Interface Comment | p. 343 |
| Properties | p. 343 |
| Methods | p. 343 |
| Interface Document | p. 343 |
| Properties | p. 343 |
| Methods | p. 344 |
| Interface DocumentFragment | p. 347 |
| Properties | p. 347 |
| Methods | p. 347 |
| Interface DocumentType | p. 347 |
| Properties | p. 348 |
| Methods | p. 348 |
| Interface DOMImplementation | p. 348 |
| Properties | p. 349 |
| Methods | p. 349 |
| Interface DOMException | p. 349 |
| Constants | p. 349 |
| Properties | p. 350 |
| Methods | p. 350 |
| Interface Element | p. 350 |
| Properties | p. 350 |
| Methods | p. 350 |
| Interface Entity | p. 353 |
| Properties | p. 353 |
| Methods | p. 354 |
| Interface EntityReference | p. 354 |
| Properties | p. 354 |
| Methods | p. 354 |
| Interface NamedNodeMap | p. 354 |
| Properties | p. 355 |
| Methods | p. 355 |
| Interface Node | p. 356 |
| Constants | p. 357 |
| Properties | p. 357 |
| Methods | p. 359 |
| Interface NodeList | p. 361 |
| Properties | p. 361 |
| Methods | p. 362 |
| Interface Natation | p. 362 |
| Properties | p. 362 |
| Methods | p. 363 |
| Interface ProcessingInstruction | p. 363 |
| Properties | p. 363 |
| Methods | p. 363 |
| Interface Text | p. 363 |
| Properties | p. 364 |
| Methods | p. 364 |
| Index | p. 365 |
| Table of Contents provided by Syndetics. All Rights Reserved. |