<Skeleton> <Head> ... meta information ... </Head> <Body> ... body of document ... </Body> </Skeletion>
<Document> <Head> <Author>John Doe</Author> <Author>Frank Black</Author> <CreationDate>June 16, 1999</CreationDate> </Head> <Body> This is a document. </Body> </Document>In this case, the skeleton element is the document root, and the metadata is structured information about the authors of the document and the creation date of the document. The Head-Body pattern is often used at the document level, but it can also be used at levels deeper within a document. For example the pattern could be used inside of a Table element like this:
<Document> <Table> <TableHead> <Title> A <Italic>Sample<Italic> Table </Title> </TableHead> <TableBody> <Row>Row 1</Row> <Row>Row 2</Row> </TableBody> </Table> </Document>In this case the skeleton element is a table, which needs structure for its Title data.
Two new elements are introduced which distinguish the metadata from the body of the document. This gives processing software context to distinguish these two types of data.
Because this introduced two additional elements, the resulting documents are larger than they would be without the application of this pattern
The resulting documents are often easier to understand because of the clear separation of metadata and the document body itself. The metadata is in the Head element and the document itself goes in the Body element. Authors and processing software can clearly distinguish the context of the data they are using.
Documents are also often easier to process because they allow metadata to be structured, unlike if attributes were use for the metadata of the document.
For an interesting alternative, see Don Park's "Neck" pattern (http://www.docuverse.com/blog/donpark/EntryViewPage.aspx?guid=831)
HEAD and BODY elements in XHTML.
SOAP (Simple Object Access Protocol) (http://www.w3.org/TR/SOAP/) uses Header and Body Elements inside an Envelope element.