This appendix presents the pseudocode conventions used in this book. The pseudocode is based on Programming Design Language ( PDL ) by Caine and Gordon . The main changes from their presentation of PDL is that I have made the assignment and some other operators explicit and made specific references to the DOM.
While PDL was intended to be implementation dependent, I use specific DOM interface methods where they have been defined. Where the DOM specifies an attribute but doesn't state a specific function to set or get the value of the attribute, I just used the set or get terminology. In addition, where the DOM recommendation lists a specific set of constant values (for example, the nodeType list with ELEMENT_NODE, TEXT_NODE, and so on), I used the specified constant. One of the effects of this approach is that the pseudocode tends to be more detailed and implementation oriented (such as methods returning null pointers) than is often the case with pseudocode.