Planning the Content Model
Before you begin writing even the abstract module definition for your new module, it's always a good idea to sit down with pen and paper and map out all the components that need to be addressed. When developing new elements it's not always readily apparent what information should be stored in attributes, sub-elements, or even as PCDATA. Having a visual model of your data can help sort the information into the proper structures.
To create the model, three major questions need to be answered:
What data needs to be stored?
How is the data used?
What constraints, if any, need to be placed on the data?
To illustrate the process we'll create a new abstract module and its corresponding DTD implementation for presenting recipes ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access