Module Validation Checklist
Submitted by kplawver on Wed, 2006-04-26 13:43.Modules
What makes a module valid? Since we've been working on a validator for modules, we realized that we hadn't posted a human-readable list of what makes a module valid. There's the microformat profile, but it's not the easiest thing in the world to read or to figure out what's a child of what, and so forth. The module skeleton gives you a start. When you've completed your code, run through this 10-point list of requirements for a "valid" module:
- The document must validate as XHTML 1.0 Transitional. You can use the AOL Module T validator to check both for validation against that spec, and our microformat. This requirement is relaxed for server-side modules, since namespaced attributes don't currently pass the W3C's validator. Your module must still be well-formed (meaning all tags are lowercase, all attributes are quoted and all attribute values are XML-escape).
- The document must contain a single element with a class of "module" (this will change when we support multiple modules).
- That element with the class of "module" must have an id, which is the module name.
- That module element must contain either an edit or view (this isn't in the validator currently - it's a warning), and can contain both.
- The element with a class of edit and view must also contain a class that's the same as the id on the element with the class of "module."
- There can only be one "view" and "edit" per module.
- The module must contain an element with a class of "description," but not more than one.
- The module must contain a link with a rel attribute with the value of "author."
- There must be an element with the class of "version" inside the module somewhere.
- There must be a link in the module with the rel attribute of "license" pointing to the license for the module.
- There must be a link in the module with the rel attribute of "mail" linking to the e-mail address of the author, or a contact page.
- If you've set
allow-multipleto "true," neither the module's edit nor view should contain elements with ids.