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 namesdates

# Set predeclared macros

# 0. predeclared macros

# 1. classes
model.persNamePart |= notAllowed
att.personal.attributes =
  att.personal.attribute.type,
  att.personal.attribute.full,
  att.personal.attribute.sort
att.personal.attribute.type =
  ## provides more culture- linguistic- or application- specific
  ## information used to categorize this name component.
  attribute type { data.enumerated }?
att.personal.attribute.full =
  ## indicates whether the name component is given in full, as an
  ## abbreviation or simply as an initial.
  [ a:defaultValue = "yes" ]
  attribute full {
    ## (the name component is spelled out in full.) 
    "yes" | ## (the name component is given in an
      ## abbreviated form.) 
      "abb" | ## (the name component is indicated only by
      ## one initial.) 
      "init"
  }?
att.personal.attribute.sort =
  ## specifies the sort order of the name component in relation
  ## to others within the personal name.
  attribute sort { xsd:nonNegativeInteger }?
model.placeNamePart |= notAllowed
model.datePart |= notAllowed
att.datePart.attributes =
  att.datePart.attribute.value,
  att.datePart.attribute.type,
  att.datePart.attribute.full
att.datePart.attribute.value =
  ## supplies the value of a date or time in a standard form.
  attribute value { data.temporal | data.duration }?
att.datePart.attribute.type =
  ## characterizes the element in some sense, using any convenient
  ##  classification scheme or typology.
  attribute type { data.word }?
att.datePart.attribute.full =
  ## indicates whether the date element is given in full, as
  ##		an abbreviation or simply as an initial
  [ a:defaultValue = "yes" ]
  attribute full {
    ## (the temporal expression is spelled out in full.) 
    "yes" | ## (the temporal expression is given in an abbreviated form.) 
      "abb" | ## (the temporal expression is abbreviated.) 
      "init"
  }?
# 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.attributes }
addName.content = macro.phraseSeq
addName.attributes =
  att.global.attributes, att.personal.attributes, empty
model.persNamePart |= addName

bloc =
  ## (bloc) contains the name of a geo-political unit consisting of  one or
  ## more nation states or countries.
  element bloc { bloc.content, bloc.attributes }
bloc.content = macro.phraseSeq
bloc.attributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty
model.placeNamePart |= bloc

country =
  ## (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.attributes }
country.content = macro.paraContent
country.attributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  ## supplies a regularized form of the country name using a
  ##	name or	code from ISO 3166
  attribute reg { data.code }?,
  empty
model.placeNamePart |= country

dateStruct =
  ## contains an internally structured representation of a date.
  element dateStruct { dateStruct.content, dateStruct.attributes }
dateStruct.content =
  (text | model.gLike | model.datePart | model.global)*
dateStruct.attributes =
  att.global.attributes,
  att.datePart.attributes,
  ## indicates the system or calendar to which the date belongs.
  attribute calendar { data.enumerated }?,
  ## indicates the degree of precision to be attributed to the date.
  attribute exact { data.certainty }?,
  empty
model.dateLike |= dateStruct
model.datePart |= dateStruct

day =
  ## (day) the day component of a structured date.
  element day { day.content, day.attributes }
day.content = macro.xtext
day.attributes = att.global.attributes, att.datePart.attributes, empty
model.datePart |= day

distance =
  ## (distance) that part of a relative temporal or spatial expression which indicates
  ## the distance between the place or time denoted by it and the place or
  ## time referred to within it.
  element distance { distance.content, distance.attributes }
distance.content = macro.phraseSeq
distance.attributes =
  att.global.attributes,
  att.datePart.attributes,
  ## indicates the degree
  ## of accuracy associated with the
  ## distance.
  [ a:defaultValue = "unknown" ]
  attribute exact {
    ## (The distance is exact.) 
    "true" | ## (The distance is approximate.) 
      "false" | ## (Accuracy unavailable or unknown.) 
      "unknown"
  }?,
  empty
model.datePart |= distance
model.placeNamePart |= distance

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.attributes }
district.content = macro.phraseSeq
district.attributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty
model.placeNamePart |= district

forename =
  ## (forename) contains a forename, given or baptismal name.
  element forename { forename.content, forename.attributes }
forename.content = macro.phraseSeq
forename.attributes =
  att.global.attributes, att.personal.attributes, empty
model.persNamePart |= forename

genName =
  ## 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.attributes }
genName.content = macro.phraseSeq
genName.attributes =
  att.global.attributes, att.personal.attributes, empty
model.persNamePart |= genName

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

geogName =
  ## (geographical name) a name associated with some geographical feature such as
  ##   Windrush Valley or Mount Sinai.
  element geogName { geogName.content, geogName.attributes }
geogName.content =
  (text | model.gLike | geog | model.nameLike | model.global)*
geogName.attributes =
  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
model.nameLike |= geogName

hour =
  ## (hour) the hour component of a temporal expression
  element hour { hour.content, hour.attributes }
hour.content = macro.xtext
hour.attributes = att.global.attributes, att.datePart.attributes, empty
model.datePart |= hour

minute =
  ## (minute) the minute component of a structured time-expression.
  element minute { minute.content, minute.attributes }
minute.content = macro.xtext
minute.attributes =
  att.global.attributes, att.datePart.attributes, empty
model.datePart |= minute

month =
  ## (month) the month component of a structured date.
  element month { month.content, month.attributes }
month.content = macro.xtext
month.attributes = att.global.attributes, att.datePart.attributes, empty
model.datePart |= month

nameLink =
  ## (name link) 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.attributes }
nameLink.content = macro.phraseSeq
nameLink.attributes =
  att.global.attributes, att.personal.attributes, empty
model.persNamePart |= nameLink

occasion =
  ## a temporal expression (either a date or a time)
  ## given in terms of a named occasion such as a holiday,
  ## a named time of day, or some notable event.
  element occasion { occasion.content, occasion.attributes }
occasion.content = macro.phraseSeq
occasion.attributes =
  att.global.attributes, att.datePart.attributes, empty
model.datePart |= occasion

offset =
  ## (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.attributes }
offset.content = (text | model.gLike | model.global)*
offset.attributes =
  att.global.attributes, att.datePart.attributes, empty
model.placeNamePart |= offset
model.datePart |= offset

orgDivn =
  ## (organizational division) indicates a division, branch or department specified
  ## in an organizational name.
  element orgDivn { orgDivn.content, orgDivn.attributes }
orgDivn.content = macro.phraseSeq
orgDivn.attributes =
  att.global.attributes,
  ## more fully describes the organization division specified in the
  ## name component.
  ## Possible values include branch, department,
  ## section,
  ## division, etc.
  attribute type { data.enumerated }?,
  ## gives a normalized or regularized form of the organizational
  ## division.
  attribute reg { text }?,
  empty

orgName =
  ## (organization name) contains an organizational name. 
  element orgName { orgName.content, orgName.attributes }
orgName.content =
  (text
   | model.gLike
   | orgTitle
   | orgType
   | orgDivn
   | model.phrase
   | model.global)*
orgName.attributes =
  att.global.attributes,
  ## more fully describes the organization indicated in the
  ##       organizational name. Possible values include voluntary,
  ##       political, governmental, industrial,
  ##       commercial, etc.
  attribute type { data.enumerated }?,
  ## provides an alternative identifier for the organization
  ##       being named, such as a database record key.
  attribute key { data.key }?,
  ## gives a normalized or regularized form of the organization name
  attribute reg { text }?,
  empty
model.nameLike.agent |= orgName

orgTitle =
  ## (organization title) contains the proper name component of an organizational
  ## name. 
  element orgTitle { orgTitle.content, orgTitle.attributes }
orgTitle.content = macro.phraseSeq
orgTitle.attributes =
  att.global.attributes,
  ## more fully describes the organization title. Possible values
  ## include formal,
  ## colloquial, acronym, etc.
  attribute type { data.enumerated }?,
  ## gives a normalized or regularized form of the organization title.
  attribute reg { text }?,
  empty

orgType =
  ## (organization type) indicates a part of the organization name which contains
  ## information about the organization's structure or function.
  element orgType { orgType.content, orgType.attributes }
orgType.content = macro.phraseSeq
orgType.attributes =
  att.global.attributes,
  ## more fully describes the organization type specified in the name
  ## component.  Possible values include function, structure,
  ## etc.
  attribute type { data.enumerated }?,
  ## gives a normalized or regularized form of the organization type
  attribute reg { text }?,
  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.attributes }
persName.content =
  (text
   | model.gLike
   | model.persNamePart
   | model.phrase
   | model.global)*
persName.attributes =
  att.global.attributes,
  att.naming.attributes,
  ## describes the personal name more fully using an open-ended
  ##       list of words or phrases which help to indicate the function,
  ##       e.g. married name, maiden name, pen name,
  ##       religious name, etc.
  attribute type { data.enumerated }?,
  empty
model.personPart |= persName
model.nameLike.agent |= persName

placeName =
  ## (place name) contains an absolute or relative place name. 
  element placeName { placeName.content, placeName.attributes }
placeName.content =
  (text
   | model.gLike
   | model.placeNamePart
   | model.phrase
   | model.global)*
placeName.attributes =
  att.global.attributes, att.naming.attributes, empty
model.nameLike |= placeName

region =
  ## (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.attributes }
region.content = macro.paraContent
region.attributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty
model.placeNamePart |= region

roleName =
  ## (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.attributes }
roleName.content = macro.phraseSeq
roleName.attributes =
  att.global.attributes, att.personal.attributes, empty
model.persNamePart |= roleName

second =
  ## (second) the second component of a structured time-expression.
  element second { second.content, second.attributes }
second.content = macro.xtext
second.attributes =
  att.global.attributes, att.datePart.attributes, empty
model.datePart |= second

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.attributes }
settlement.content = macro.phraseSeq
settlement.attributes =
  att.global.attributes,
  att.naming.attributes,
  att.typed.attributes,
  empty
model.placeNamePart |= settlement

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

timeStruct =
  ## contains an internally structured representation for a time of day.
  element timeStruct { timeStruct.content, timeStruct.attributes }
timeStruct.content =
  (text | model.gLike | model.datePart | model.global)*
timeStruct.attributes =
  att.global.attributes,
  att.datePart.attributes,
  ## indicates time zone or place name wherever this is necessary to
  ##		evaluate a temporal expression.
  attribute zone { data.enumerated }?,
  empty
model.timeLike |= timeStruct
model.datePart |= timeStruct

week =
  ## (week) the week component of a structured date.
  element week { week.content, week.attributes }
week.content = macro.xtext
week.attributes = att.global.attributes, att.datePart.attributes, empty
model.datePart |= week

year =
  ## (year) the year component of a date.
  element year { year.content, year.attributes }
year.content = macro.xtext
year.attributes = att.global.attributes, att.datePart.attributes, empty
model.datePart |= year
# 3. macros
