Structural descriptions for documents

Figure 619. An address book Slide presentation Create comment in forum

Our

  • Objective: Modeling an address book and appointment database supporting an organizer application.

  • Starting point: A person's sample contact record.


Figure 620. A <contact> record Slide presentation Create comment in forum
<contact>
  <firstName>Eve</firstName>
  <lastName>Dexter</lastName>
  <email>dexter@company.com</email>
</contact>

Figure 621. <contact> business rules: Slide presentation Create comment in forum

Business rules:

  • Each contact must have the attributes firstName, lastName and email.

  • The order of these three values must be preserved.


Readers being familiar with BNF or EBNF will understand the grammatical rules expressed differently:

Figure 622. EBNF grammar representation Slide presentation Create comment in forum
A <contact>
[6] contact ::= '<contact>' firstName lastName email '</contact>'  
[7] firstName ::= '<firstName>' Text '</firstName>'  
[8] lastName ::= '<lastName>' Text '</lastName>'  
[9] email ::= '<email>' Text '</email>'  
[10] Text ::= [a-zA-Z0-9+-_*/...]*