namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
namespace rng = "http://relaxng.org/ns/structure/1.0"

# Schema generated 2006-01-30T20:23:55Z
# Copyright 2005 TEI Consortium.
# This is free software; you can redistribute it and/or
#	    modify it under the terms of the GNU General Public
#	    License as published by the Free Software Foundation;
#	    either version 2 of the License, or (at your option) any
#	    later version.
# This material is distributed in the hope that it will be
#	    useful, but WITHOUT ANY WARRANTY; without even the implied
#	    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
#	    PURPOSE. See the GNU General Public License for more
#	    details.
# You should have received a copy of the GNU General Public
#	    License along with this file; if not, write to the Free
#	    Software Foundation, Inc., 59 Temple Place, Suite 330,
#	    Boston, MA 02111-1307, USA.
# To contact the TEI Consortium use the following addresses.
#	    For general (non-technical) enquiries: 
#		  target="mailto:info@tei-c.org"/>info@tei-c.orgFor membership enquiries: membership@tei-c.orgFor technical enquiries, particularly about the
#		Guidelines, DTDs, schemas, or software available from
#		the TEI-C: editors@tei-c.orgFor up to date information, consult the TEI web site at http://www.tei-c.org/P5

# Definitions from module corpus

# Set predeclared macros

# 0. predeclared macros

# 1. classes

# 2. elements

activity =
  ## (activity) contains a brief informal description of what a participant in a
  ## language interaction is doing other than speaking, if anything.
  element activity { activity.content, activity.attributes }
activity.content = macro.phraseSeq
activity.attributes = att.global.attributes, empty

affiliation =
  ## (affiliation) contains an informal description of a person's present
  ## or past affiliation with some
  ## organization, for example an employer or sponsor.
  element affiliation { affiliation.content, affiliation.attributes }
affiliation.content = macro.phraseSeq
affiliation.attributes =
  att.global.attributes, att.datable.attributes, empty
model.personPart |= affiliation

birth =
  ## (Birth details) contains information about a person's birth, such as its date
  ## and place.
  element birth { birth.content, birth.attributes }
birth.content = macro.phraseSeq
birth.attributes =
  att.global.attributes,
  att.datable.attributes,
  ## specifies the date of birth in an ISO standard form (yyyy-mm-dd).
  attribute date { data.temporal }?,
  empty
model.personPart |= birth

channel =
  ## (primary channel) describes the medium or channel by which a text is delivered or
  ## experienced. For a written text, this might be print, manuscript, e-mail, etc.;
  ## for a spoken one, radio, telephone, face-to-face, etc.
  element channel { channel.content, channel.attributes }
channel.content = macro.phraseSeq
channel.attributes =
  att.global.attributes,
  ## specifies the mode of this channel with respect to speech and
  ##          writing.
  [ a:defaultValue = "x" ]
  attribute mode {
    ## (spoken
    ##    ) 
    "s" | ## (written
      ##    ) 
      "w" | ## (spoken to be written (e.g. dictation)
      ##    ) 
      "sw" | ## (written to be spoken (e.g. a script)
      ##    ) 
      "ws" | ## (mixed modes
      ##    ) 
      "m" | ## (unknown or inapplicable
      ##    ) 
      "x"
  }?,
  empty

constitution =
  ## describes the internal composition of a text or text sample,
  ## for example
  ## as fragmentary, complete, etc.
  element constitution { constitution.content, constitution.attributes }
constitution.content = macro.phraseSeq
constitution.attributes =
  att.global.attributes,
  ## specifies how the text was constituted.
  [ a:defaultValue = "single" ]
  attribute type {
    ## (a single complete text
    ##     ) 
    "single" | ## (a text made by combining several smaller
      ##              items, each individually complete
      ##     ) 
      "composite" | ## (a text made by combining several smaller, not
      ##              necessarily complete, items
      ##     ) 
      "frags" | ## (composition unknown or unspecified
      ##    ) 
      "unknown"
  }?,
  empty

death =
  ## contains information about a person's death, such as its date
  ## and place.
  element death { death.content, death.attributes }
death.content = macro.phraseSeq
death.attributes =
  att.global.attributes,
  att.datable.attributes,
  ## specifies the date of death in an ISO standard form (yyyy-mm-dd).
  attribute date { data.temporal }?,
  empty
model.personPart |= death

derivation =
  ## describes the nature and extent of originality of this text.
  element derivation { derivation.content, derivation.attributes }
derivation.content = macro.phraseSeq
derivation.attributes =
  att.global.attributes,
  ## categorizes the derivation of the text.
  attribute type { data.enumerated }?,
  empty

domain =
  ## (Domain of use) describes the most important social context in which the text was
  ## realized or for which it is intended, for example private vs. public,
  ## education, religion, etc.
  element domain { domain.content, domain.attributes }
domain.content = macro.phraseSeq
domain.attributes =
  att.global.attributes,
  ## categorizes the domain of use.
  attribute type { data.enumerated }?,
  empty

education =
  ## contains a description of the
  ## educational experience of a person.
  element education { education.content, education.attributes }
education.content = macro.phraseSeq
education.attributes =
  att.global.attributes, att.datable.attributes, empty
model.personPart |= education

factuality =
  ## describes the extent to which the text may be regarded as
  ## imaginative or non-imaginative, that is, as describing a fictional
  ## or a non-fictional world. 
  element factuality { factuality.content, factuality.attributes }
factuality.content = macro.phraseSeq
factuality.attributes =
  att.global.attributes,
  ## categorizes the factuality of the text.
  attribute type {
    ## (the text is to be regarded as entirely imaginative
    ##   ) 
    "fiction" | ## (the text is to be regarded as entirely informative or factual
      ##   ) 
      "fact" | ## (the text contains a mixture of fact and fiction
      ##   ) 
      "mixed" | ## (the fiction/fact distinction is not regarded
      ##     as helpful or appropriate to this text
      ##    ) 
      "inapplicable"
  }?,
  empty

firstLang =
  ## (First language) specifies the first language of a participant.
  element firstLang { firstLang.content, firstLang.attributes }
firstLang.content = macro.phraseSeq
firstLang.attributes = att.global.attributes, empty
model.personPart |= firstLang

interaction =
  ## describes the extant, cardinality and nature of any interaction
  ## among those producing and experiencing the text, for example in the
  ## form of response or interjection, commentary etc.
  element interaction { interaction.content, interaction.attributes }
interaction.content = macro.phraseSeq
interaction.attributes =
  att.global.attributes,
  ## specifies the degree of interaction between
  ##   active and passive participants in the text. 
  attribute type {
    ## (no interaction of any kind, e.g. a monologue ) 
    "none" | ## (some degree of interaction, e.g. a monologue with set responses ) 
      "partial" | ## (complete interaction, e.g. a face to face conversation ) 
      "complete" | ## (this parameter is inappropriate or inapplicable in this case ) 
      "inapplicable"
  }?,
  ## specifies the number of active participants
  ##    (or addressors) producing parts of the text. 
  attribute active { data.enumerated }?,
  ## specifies the number of passive participants
  ##    (or addressees) to whom a text is directed
  ##    or in whose presence it is created or performed.
  attribute passive { data.enumerated }?,
  empty

langKnown =
  ## (linguistic competence) contains an informal description of a person's competence in
  ## different languages, dialects, etc.
  element langKnown { langKnown.content, langKnown.attributes }
langKnown.content = macro.phraseSeq
langKnown.attributes = att.global.attributes, empty
model.personPart |= langKnown

listPerson =
  ## contains a list of descriptions, each of which provides information about an identifiable individual, for
  ## example the participants in a language interaction, or the people referred
  ## to in a historical source. 
  element listPerson { listPerson.content, listPerson.attributes }
listPerson.content =
  model.pLike+
  | ((person | personGrp)+, particLinks?)
listPerson.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.profileDescPart |= listPerson

locale =
  ## (locale) contains a brief informal description of the nature of a
  ## place for example a room, a restaurant, a park bench etc.
  element locale { locale.content, locale.attributes }
locale.content = macro.phraseSeq
locale.attributes = att.global.attributes, empty

nationality =
  ## contains an informal description of a person's present
  ## or past nationality or citizenship.
  element nationality { nationality.content, nationality.attributes }
nationality.content = macro.phraseSeq
nationality.attributes =
  att.global.attributes,
  att.datable.attributes,
  ## supplies a regularized form of the country name using a
  ##	name or	code from ISO 3166
  attribute reg { data.code }?,
  empty
model.personPart |= nationality

occupation =
  ## contains an informal description of a person's trade,
  ## profession or occupation.
  element occupation { occupation.content, occupation.attributes }
occupation.content = macro.phraseSeq
occupation.attributes =
  att.global.attributes,
  ## identifies the classification system or taxonomy in use by supplying
  ## the identifier of a taxonomy element elsewhere in the header.
  attribute scheme { data.pointer }?,
  ## identifies an occupation code defined within the
  ## classification system or taxonomy defined by the scheme
  ## attribute.
  attribute code { data.pointer }?,
  empty
model.personPart |= occupation

particDesc =
  ## (participation description) describes the identifiable speakers, voices, or other participants
  ## in a linguistic interaction. 
  element particDesc { particDesc.content, particDesc.attributes }
particDesc.content =
  model.pLike+
  | ((listPerson | personGrp)+, particLinks?)
particDesc.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.profileDescPart |= particDesc

particLinks =
  ## (participant relationships) describes the relationships or social links existing between
  ## participants in a linguistic interaction. 
  element particLinks { particLinks.content, particLinks.attributes }
particLinks.content = model.pLike+ | relation+
particLinks.attributes = att.global.attributes, empty

person =
  ## provides information about an identifiable individual, for
  ## example a participant in a language interaction, or a person referred
  ## to in a historical source.
  element person { person.content, person.attributes }
person.content = model.pLike+ | model.personPart*
person.attributes =
  att.global.attributes,
  ## specifies a primary role or classification for the person.
  attribute role { data.words }?,
  ## specifies the sex of the person.
  attribute sex { data.sex }?,
  ## specifies an age group for the person.
  attribute age { data.word }?,
  empty

personGrp =
  ## (personal group) describes a group of individuals treated as a single person for
  ##   analytic purposes.
  element personGrp { personGrp.content, personGrp.attributes }
personGrp.content = model.pLike+ | model.personPart*
personGrp.attributes =
  att.global.attributes,
  ## specifies the role of this group of participants in the
  ##         interaction.
  attribute role { data.code }?,
  ## specifies the sex of the participant group.
  attribute sex { data.sex | "mixed" }?,
  ## specifies the age group of the participants.
  attribute age { data.word }?,
  ## specifies the size or approximate size of the group.
  attribute size { data.words }?,
  empty

preparedness =
  ## describes the extent to which a text may be regarded as
  ## prepared or spontaneous. 
  element preparedness { preparedness.content, preparedness.attributes }
preparedness.content = macro.phraseSeq
preparedness.attributes =
  att.global.attributes,
  ## a keyword characterizing the type of preparedness.
  attribute type { data.enumerated }?,
  empty

purpose =
  ## characterizes a single purpose or communicative function of the
  ## text.
  element purpose { purpose.content, purpose.attributes }
purpose.content = macro.phraseSeq
purpose.attributes =
  att.global.attributes,
  ## specifies a particular kind of purpose.
  attribute type { data.enumerated }?,
  ## specifies the extent to which this purpose predominates.
  attribute degree {
    ## (this purpose is predominant
    ##   ) 
    "high" | ## (this purpose is intermediate
      ##   ) 
      "medium" | ## (this purpose is weak
      ##   ) 
      "low" | ## (extent unknown
      ##    ) 
      "unknown"
  }?,
  empty

relation =
  ## (relationship) describes any kind of relationship or linkage amongst a specified
  ## group of participants.
  element relation { relation.content, relation.attributes }
relation.content = empty
relation.attributes =
  att.global.attributes,
  ## categorizes the relationship in some respect, e.g.
  ## as social, personal or other.
  [ a:defaultValue = "personal" ] attribute type { data.enumerated }?,
  ## supplies a name for the kind of  relationship of which
  ##	this is an instance.
  attribute name { data.enumerated },
  ## identifies the active participants in a non-mutual
  ## relationship, or all the participants in a mutual one.
  attribute active { data.pointers },
  ## identifies the passive participants in a non-mutual
  ## relationship.
  attribute passive { data.pointers },
  ## indicates whether the relationship holds equally amongst all the
  ## participants.
  [ a:defaultValue = "true" ]
  attribute mutual {
    ## (the relationship is mutual) 
    "true" | ## (the relationship is directed) 
      "false"
  }?,
  empty

residence =
  ## (residence) describes a person's present or past places of residence.
  element residence { residence.content, residence.attributes }
residence.content = macro.phraseSeq
residence.attributes =
  att.global.attributes, att.datable.attributes, empty
model.personPart |= residence

setting =
  ## (setting) describes one particular setting in which a language
  ##   interaction takes place.
  element setting { setting.content, setting.attributes }
setting.content =
  model.pLike+
  | (model.nameLike.agent
     | model.dateLike
     | model.timeLike
     | activity
     | locale
     | rs)*
setting.attributes =
  att.global.attributes, att.ascribed.attributes, empty

settingDesc =
  ## (setting description) describes the setting or settings within which a language
  ## interaction takes place, either as a prose description or as a
  ## series of setting elements.
  element settingDesc { settingDesc.content, settingDesc.attributes }
settingDesc.content = model.pLike+ | setting+
settingDesc.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.profileDescPart |= settingDesc

socecStatus =
  ## (socio-economic status) contains an informal description of a person's perceived social or
  ## economic status.
  element socecStatus { socecStatus.content, socecStatus.attributes }
socecStatus.content = macro.phraseSeq
socecStatus.attributes =
  att.global.attributes,
  ## identifies the classification system or taxonomy in use.
  attribute scheme { data.pointer }?,
  ## identifies a status code defined within the
  ## classification system or taxonomy defined by the source
  ## attribute.
  attribute code { data.pointer }?,
  empty
model.personPart |= socecStatus

textDesc =
  ## (text description) provides a description of a text in terms of its
  ## situational parameters.
  element textDesc { textDesc.content, textDesc.attributes }
textDesc.content =
  channel,
  constitution,
  derivation,
  domain,
  factuality,
  interaction,
  preparedness,
  purpose+
textDesc.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.catDescPart |= textDesc
model.profileDescPart |= textDesc
# 3. macros
