Defining a document model for structured plain-text documents

Here is an example of a general-purpose (GPP) structured plain-text document:

[head]Handling structured documents
[/head]
[year]2002
[/year]
[abstract]This document describes the concept of structured documents
and the use of document models to...
[/abstract]

Here is an example of a GPP document model:

<?xml version="1.0"?>
<GPPModel>

  <GPPFieldDefinition
  name="Head"
  start="[head]"
  end="[/head]" 
  exclude="YES" />

  <GPPFieldDefinition                  - This is the start of text field
  name="Abstract"
  start="[abstract]"
  end="[/abstract]" 
  exclude="NO" />                     - This is the end of a text field

  <GPPAttributeDefinition              - This is the start of a document
  name="year"                               attribute
  start="[year]"
  end="[/year]" 
  type="NUMBER" />                    - This is the end of a document
                                            attribute
</GPPModel>                             

The first line, <?xml version="1.0"?> specifies that the document model is written using XML tags. Note that this model is not written for XML format documents.

Each field is defined within a GPPFieldDefinition or GPPAttributeDefinition tag, which contain element parameters.

All the definitions must be contained within the <GPPModel> tag.