6.7. The Example Step-by-Step

6.7.1. Modeling Tables

  1. Table. The table itself becomes an element type. In the document, each occurrence of an element of this type will contain a single row of the data. If we're modeling the columns of this table as attributes, the content model is EMPTY. If we're modeling the columns as elements, then the content model is a sequence of the element type names that correspond to the columns. In the latter case, we make optional (?) any elements where column values may be null.

    <!ELEMENT EMPLOYEE EMPTY>
    or
    <!ELEMENT EMPLOYEE (
       EMPLOYEE.NUM,
       EMPLOYEE.FNAME,
       EMPLOYEE.LNAME,
       EMPLOYEE.HIRE_DATE,
       EMPLOYEE.TERM_DATE?
    )>
    
  2. Primary Key. If the table has a primary key, we capture that information with the pkey metadata property ...

Get Enterprise Application Integration With XML and Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.