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

# Schema generated 2008-11-01T14:14:38Z
# Edition: 1.2.0. Last updated on October 31st 2008.
# Copyright 2008 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.
# A copy of the GNU General Public
#	    License is stored on the TEI web site
#	    along with this file; you can also contact the Free
#	    Software Foundation, Inc., 59 Temple Place, Suite 330,
#	    Boston, MA 02111-1307, USA, for a copy.
# For information about the TEI, including contact
#		details, consult the TEI web
#	      site at http://www.tei-c.org/. 
#		Names and dates

# Definitions from module namesdates

# Set global predeclared macros

# Set predeclared macros

# 0. predeclared macros

# 1. classes
model.persNamePart =
  surname | forename | genName | nameLink | addName | roleName
model.persNamePart_sequence =
  surname, forename, genName, nameLink, addName, roleName
model.persNamePart_sequenceOptional =
  surname?, forename?, genName?, nameLink?, addName?, roleName?
model.persNamePart_sequenceOptionalRepeatable =
  surname*, forename*, genName*, nameLink*, addName*, roleName*
model.persNamePart_sequenceRepeatable =
  surname+, forename+, genName+, nameLink+, addName+, roleName+
att.datable.iso.attributes =
  att.datable.iso.attribute.when-iso,
  att.datable.iso.attribute.notBefore-iso,
  att.datable.iso.attribute.notAfter-iso,
  att.datable.iso.attribute.from-iso,
  att.datable.iso.attribute.to-iso,
  empty
att.datable.iso.attribute.when-iso =
  ## supplies the value of a date or time in a standard form.
  attribute when-iso { data.temporal.iso }?
att.datable.iso.attribute.notBefore-iso =
  ## specifies the earliest possible date for the event in
  ##	standard form, e.g. yyyy-mm-dd.
  attribute notBefore-iso { data.temporal.iso }?
att.datable.iso.attribute.notAfter-iso =
  ## specifies the latest possible date for the event in
  ##	standard form, e.g. yyyy-mm-dd.
  attribute notAfter-iso { data.temporal.iso }?
att.datable.iso.attribute.from-iso =
  ## indicates the starting point of the period in standard form.
  attribute from-iso { data.temporal.iso }?
att.datable.iso.attribute.to-iso =
  ## indicates the ending point of the period in standard form.
  attribute to-iso { data.temporal.iso }?
att.duration.iso.attributes = att.duration.iso.attribute.dur-iso, empty
att.duration.iso.attribute.dur-iso =
  ## (duration) indicates the length of this element in time.
  attribute dur-iso { data.duration.iso }?
# 2. elements

addName =
  ## (additional name) contains an additional name component, such as a nickname, 
  ## epithet, or alias, or any other descriptive phrase used within a
  ## personal name.
  element addName { addName.content, addName.localattributes }
addName.content = macro.phraseSeq
addName.localattributes =
  att.global.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

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.localattributes
  }
affiliation.content = macro.phraseSeq
affiliation.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  att.naming.attributes,
  empty

age =
  ## specifies the age of a person.
  element age { age.content, age.localattributes }
age.content = macro.phraseSeq.limited
age.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  ## supplies a numeric code representing the age or age group
  attribute value { data.count }?,
  empty

birth =
  ## contains information about a person's birth, such as its date
  ## and place.
  element birth { birth.content, birth.localattributes }
birth.content = macro.phraseSeq
birth.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  att.naming.attributes,
  empty

bloc =
  ## contains the name of a geo-political unit consisting of  two or
  ## more nation states or countries.
  element bloc { bloc.content, bloc.localattributes }
bloc.content = macro.phraseSeq
bloc.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

climate =
  ## contains information about the physical climate of a place.
  element climate { climate.content, climate.localattributes }
climate.content =
  model.headLike*,
  (model.pLike+ | model.labelLike+),
  (model.noteLike | model.biblLike)*,
  climate*
climate.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty

country =
  ## contains the name of a geo-political unit, such as a nation,
  ## country, colony, or commonwealth, larger than or administratively superior
  ## to a region and smaller than a bloc.
  element country { country.content, country.localattributes }
country.content = macro.phraseSeq
country.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

death =
  ## contains information about a person's death, such as its date
  ## and place.
  element death { death.content, death.localattributes }
death.content = macro.phraseSeq
death.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  att.naming.attributes,
  empty

district =
  ## contains the name of any kind of subdivision of a
  ## settlement,  such as a parish, ward, or other
  ## administrative or geographic unit.
  element district { district.content, district.localattributes }
district.content = macro.phraseSeq
district.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

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

event =
  ## contains data relating to any kind of significant event
  ##   associated with a person, place, or organization.
  element event { event.content, event.localattributes }
event.content =
  model.headLike*,
  (model.pLike+ | model.labelLike+),
  (model.noteLike | model.biblLike)*,
  event*
event.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.typed.attributes,
  att.naming.attributes,
  ## indicates the location of an event by pointing to a place element
  attribute where { data.pointer }?,
  empty

faith =
  ## specifies the faith,  religion, or belief set of a person.
  element faith { faith.content, faith.localattributes }
faith.content = macro.phraseSeq
faith.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  empty

floruit =
  ## contains information about a person's period of activity.
  element floruit { floruit.content, floruit.localattributes }
floruit.content = macro.phraseSeq
floruit.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  empty

forename =
  ## contains a forename, given or baptismal name.
  element forename { forename.content, forename.localattributes }
forename.content = macro.phraseSeq
forename.localattributes =
  att.global.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

genName =
  ## (generational name component) contains a name component used to distinguish otherwise similar
  ## names on the basis of the relative ages or generations of the persons named.
  element genName { genName.content, genName.localattributes }
genName.content = macro.phraseSeq
genName.localattributes =
  att.global.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

geo =
  ## (geographical coordinates) contains any expression of a set of geographic coordinates,
  ##   representing a point, line, or area on the surface of the earth in
  ##   some notation.
  element geo { geo.content, geo.localattributes }
geo.content = text
geo.localattributes = att.global.attributes, empty

geogFeat =
  ## (geographical feature name) contains a common noun identifying some geographical feature 
  ## contained within a geographic name, such as valley,
  ## mount, etc.
  element geogFeat { geogFeat.content, geogFeat.localattributes }
geogFeat.content = macro.xtext
geogFeat.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

geogName =
  ## (geographical name) a name associated with some geographical feature such as
  ##   Windrush Valley or Mount Sinai.
  element geogName { geogName.content, geogName.localattributes }
geogName.content = macro.phraseSeq
geogName.localattributes =
  att.global.attributes,
  att.naming.attributes,
  ## provides more culture- linguistic- or application-
  ##       specific information used to categorize this name
  ##       component.
  attribute type { data.enumerated }?,
  empty

langKnowledge =
  ## (language knowledge) summarizes the state of a person's linguistic knowledge, either
  ## as prose or by a list of langKnown elements.
  element langKnowledge {
    langKnowledge.content, langKnowledge.localattributes
  }
langKnowledge.content = model.pLike | langKnown+
langKnowledge.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  ## supplies one or more valid language tags for the languages
  ##       specified
  attribute tags {
    list { data.language+ }
  }?,
  empty

langKnown =
  ## (language known) summarizes the state of a person's linguistic competence,
  ##   i.e., knowledge of a single language.
  element langKnown { langKnown.content, langKnown.localattributes }
langKnown.content = macro.phraseSeq.limited
langKnown.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  ## supplies a  valid language tag for the language concerned.
  attribute tag { data.language },
  ## a code indicating the person's level of knowledge for this language 
  attribute level { data.word }?,
  empty

listNym =
  ## (list of canonical names) contains a list of nyms, that is, standardized names for any
  ##	thing. 
  element listNym { listNym.content, listNym.localattributes }
listNym.content =
  model.headLike*, (nym | listNym)+, (relationGrp | relation)*
listNym.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.declarable.attributes,
  empty

listOrg =
  ## (list of organizations) contains a list of elements, each of which provides
  ## information about an identifiable organization. 
  element listOrg { listOrg.content, listOrg.localattributes }
listOrg.content =
  model.headLike*, (org | listOrg)+, (relationGrp | relation)*
listOrg.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.declarable.attributes,
  empty

listPerson =
  ## (list of persons) contains a list of descriptions, each of which provides
  ## information about an identifiable person or a group of people, for
  ## example the participants in a language interaction, or the people referred
  ## to in a historical source. 
  element listPerson { listPerson.content, listPerson.localattributes }
listPerson.content =
  model.headLike*,
  (model.personLike | listPerson)+,
  (relation | relationGrp)*
listPerson.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.declarable.attributes,
  empty

listPlace =
  ## (list of places) contains a list of places, optionally followed by a list
  ##       of relationships (other than containment) defined amongst
  ##       them. 
  element listPlace { listPlace.content, listPlace.localattributes }
listPlace.content =
  model.headLike*,
  (model.placeLike | listPlace)+,
  (relationGrp | relation)*
listPlace.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.declarable.attributes,
  empty

location =
  ## defines the location of a place as a set of geographical
  ##   coordinates, in terms of a other named geo-political entities,
  ##   or as an address.
  element location { location.content, location.localattributes }
location.content =
  (model.labelLike
   | model.placeNamePart
   | model.offsetLike
   | model.measureLike
   | model.addressLike
   | model.noteLike
   | model.biblLike)*
location.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  empty

nameLink =
  ## contains a connecting phrase or link used within a name but not
  ## regarded as part of it, such as  van der or of.
  element nameLink { nameLink.content, nameLink.localattributes }
nameLink.content = macro.phraseSeq
nameLink.localattributes =
  att.global.attributes, att.typed.attributes, empty

nationality =
  ## contains an informal description of a person's present
  ## or past nationality or citizenship.
  element nationality {
    nationality.content, nationality.localattributes
  }
nationality.content = macro.phraseSeq
nationality.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  empty

nym =
  ## (canonical name) contains the definition for a canonical  name or namepart of
  ##   any kind.
  element nym { nym.content, nym.localattributes }
nym.content = model.entryPart*, model.pLike*, nym*
nym.localattributes =
  att.global.attributes,
  att.typed.attributes,
  ## points to constituent nyms 
  ## Sorry, unable to create schema that uses actual counts minOccurs=1 and maxOccurs=100; approximating to minOccurs=1 and maxOccurs=unbounded.
  attribute parts {
    list { data.pointer, data.pointer* }
  }?,
  empty

occupation =
  ## contains an informal description of a person's trade,
  ## profession or occupation.
  element occupation { occupation.content, occupation.localattributes }
occupation.content = macro.phraseSeq
occupation.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.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

offset =
  ## that  part of a relative temporal or spatial expression
  ## which indicates the direction of the offset between the two place
  ## names, dates, or times involved in the expression. 
  element offset { offset.content, offset.localattributes }
offset.content = macro.xtext
offset.localattributes =
  att.global.attributes, att.typed.attributes, empty

org =
  ## (organization) provides information about an identifiable organization such
  ##   as a business, a tribe, or any other grouping of people.
  element org { org.content, org.localattributes }
org.content =
  model.headLike*,
  (model.pLike*
   | (model.labelLike | model.nameLike | model.placeLike)*),
  (model.noteLike | model.biblLike)*,
  model.personLike*
org.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.editLike.attributes,
  ## specifies a primary role or classification for the organization.
  attribute role {
    list { data.word+ }
  }?,
  empty

orgName =
  ## (organization name) contains an organizational name. 
  element orgName { orgName.content, orgName.localattributes }
orgName.content = macro.phraseSeq
orgName.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

persName =
  ## (personal name) contains a proper noun or proper-noun phrase referring to a
  ##   person, possibly including any or all of the person's forenames,
  ##   surnames, honorifics, added names, etc.
  element persName { persName.content, persName.localattributes }
persName.content = macro.phraseSeq
persName.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.personal.attributes,
  att.typed.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.localattributes }
person.content = model.pLike+ | (model.personPart | model.global)*
person.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  ## specifies a primary role or classification for the person.
  attribute role {
    list { data.enumerated+ }
  }?,
  ## specifies the sex of the person.
  attribute sex { data.sex }?,
  ## specifies an age group for the person.
  attribute age { data.enumerated }?,
  empty

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

place =
  ## contains data about a geographic location
  element place { place.content, place.localattributes }
place.content =
  model.headLike*,
  (model.pLike*
   | (model.labelLike
      | model.placeStateLike
      | model.placeTraitLike
      | model.placeEventLike)*),
  (model.noteLike | model.biblLike)*,
  (model.placeLike | listPlace)*
place.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.editLike.attributes,
  empty

placeName =
  ## contains an absolute or relative place name. 
  element placeName { placeName.content, placeName.localattributes }
placeName.content = macro.phraseSeq
placeName.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  empty

population =
  ## contains information about the population of a place.
  element population { population.content, population.localattributes }
population.content =
  model.headLike*,
  ((model.pLike+ | model.labelLike+),
   (model.noteLike | model.biblLike)*)?,
  population*
population.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty

region =
  ## contains the name of an administrative unit such as a state,
  ## province, or county, larger than a settlement, but smaller than a country.
  element region { region.content, region.localattributes }
region.content = macro.phraseSeq
region.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

relation =
  ## (relationship) describes any kind of relationship or linkage amongst a specified
  ## group of participants.
  element relation { relation.content, relation.localattributes }
relation.content = desc?
relation.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  ## categorizes the relationship in some respect, e.g.
  ## as social, personal or other.
  ## Suggested values include: 1] social; 2] personal; 3] other
  [ a:defaultValue = "personal" ]
  attribute type {
    ## relationship concerned with social roles
    "social" | ## relationship concerned with personal roles, e.g.
      ## kinship, marriage, etc.
      "personal" | ## other kinds of relationship
      "other"
    | xsd:Name
  }?,
  ## 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 {
     list { data.pointer+ }
   }? | ## supplies a list of participants amongst all of whom the relationship holds equally.
     attribute mutual {
       list { data.pointer+ }
     }?),
  ## identifies the passive participants in a non-mutual
  ## relationship.
  attribute passive {
    list { data.pointer+ }
  }?,
  empty

relationGrp =
  ## (relation group) provides information about relationships identified amongst people,
  ##   places, and organizations, either informally as prose or as formally
  ##   expressed relation links. 
  element relationGrp {
    relationGrp.content, relationGrp.localattributes
  }
relationGrp.content = model.pLike+ | relation+
relationGrp.localattributes =
  att.global.attributes, att.typed.attributes, empty

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

roleName =
  ## contains a name component which indicates that the referent has a
  ## particular role or position in society, such as an official title or
  ## rank.
  element roleName { roleName.content, roleName.localattributes }
roleName.content = macro.phraseSeq
roleName.localattributes =
  att.global.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

settlement =
  ## contains the name of a settlement such as a city, town, or
  ## village identified as a single geo-political or
  ## administrative unit.
  element settlement { settlement.content, settlement.localattributes }
settlement.content = macro.phraseSeq
settlement.localattributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

sex =
  ## specifies the sex of a person.
  element sex { sex.content, sex.localattributes }
sex.content = macro.phraseSeq
sex.localattributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  attribute value { data.sex }?,
  empty

socecStatus =
  ## (socio-economic status) contains an informal description of a person's perceived social or
  ## economic status.
  element socecStatus {
    socecStatus.content, socecStatus.localattributes
  }
socecStatus.content = macro.phraseSeq
socecStatus.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.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

state =
  ## contains a description of some status or quality
  ## attributed to a person, place, or organization at some specific time.
  element state { state.content, state.localattributes }
state.content =
  state+
  | (model.headLike*, model.pLike+, (model.noteLike | model.biblLike)*)
  | (model.labelLike | model.noteLike | model.biblLike)*
state.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.typed.attributes,
  att.naming.attributes,
  empty

surname =
  ## contains a family (inherited) name, as opposed to a given,
  ## baptismal, or nick name.
  element surname { surname.content, surname.localattributes }
surname.content = macro.phraseSeq
surname.localattributes =
  att.global.attributes,
  att.personal.attributes,
  att.typed.attributes,
  empty

terrain =
  ## contains information about the physical terrain of a place.
  element terrain { terrain.content, terrain.localattributes }
terrain.content =
  model.headLike*,
  (model.pLike+ | model.labelLike+),
  (model.noteLike | model.biblLike)*,
  terrain*
terrain.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty

trait =
  ## contains a description of some culturally-determined and in
  ##   principle unchanging characteristic attributed to a person or place .
  element trait { trait.content, trait.localattributes }
trait.content =
  trait+
  | (model.headLike*, model.pLike+, (model.noteLike | model.biblLike)*)
  | (model.labelLike | model.noteLike | model.biblLike)*
trait.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty
# 3. macros
