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:54Z
# 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 tei

# Set predeclared macros

# 0. predeclared classes
att.metrical.attributes |= empty
att.enjamb.attributes |= empty
model.phrase |= model.ptrLike.form
model.ptrLike.form |= notAllowed
att.ptrLike.form.attributes |= empty
att.global.linking.attributes |= empty
att.pointing.attributes |= empty
att.global.analytic.attributes |= empty
model.persNamePart |= notAllowed
att.personal.attributes |= empty
model.placeNamePart |= notAllowed
model.datePart |= notAllowed
att.datePart.attributes |= empty
# 0. predeclared macros

# 1. classes
att.ascribed.attributes = att.ascribed.attribute.who
att.ascribed.attribute.who =
  ## indicates the person, or group of
  ##	people, to whom the element content is ascribed.
  attribute who { data.pointers }?
att.datable.attributes =
  att.datable.attribute.notBefore, att.datable.attribute.notAfter
att.datable.attribute.notBefore =
  ## specifies the earliest possible date for the event in
  ##	standard form, e.g. yyyy-mm-dd.
  attribute notBefore { data.temporal }?
att.datable.attribute.notAfter =
  ## specifies the latest possible date for the event in
  ##	standard form, e.g. yyyy-mm-dd.
  attribute notAfter { data.temporal }?
att.declarable.attributes = att.declarable.attribute.default
att.declarable.attribute.default =
  ## indicates whether or not this element is selected by default when
  ## its parent is selected.
  [ a:defaultValue = "false" ]
  attribute default {
    ## (This element is selected if its parent is selected) 
    "true" | ## (This element can only be selected explicitly, unless it is the
      ## only one of its kind, in which case it is selected if its parent is selected.) 
      "false"
  }?
att.declaring.attributes = att.declaring.attribute.decls
att.declaring.attribute.decls =
  ## identifies one or more declarable elements within the
  ## header, which are understood to apply to the element bearing this
  ## attribute and its content.
  attribute decls { data.pointers }?
att.divLike.attributes =
  att.metrical.attributes,
  att.divLike.attribute.type,
  att.divLike.attribute.org,
  att.divLike.attribute.sample,
  att.divLike.attribute.part
att.divLike.attribute.type =
  ## specifies a name conventionally used for this level of
  ##		subdivision, e.g. act, volume, book,
  ##		section, canto, etc.
  attribute type { data.enumerated }?
att.divLike.attribute.org =
  ## specifies how the content of the division is organized.
  [ a:defaultValue = "uniform" ]
  attribute org {
    ## (composite content: i.e. no claim is made about the
    ##		  sequence in which the immediate contents of this division
    ##		  are to be processed, or their inter-relationships.) 
    "composite" | ## (uniform content: i.e. the immediate contents of this
      ##		  element are regarded as forming a logical unit, to be
      ##		  processed in sequence.) 
      "uniform"
  }?
att.divLike.attribute.sample =
  ## indicates whether this division is a sample of the
  ##		original source and if so, from which part.
  [ a:defaultValue = "complete" ]
  attribute sample {
    ## (division lacks material present at end in source.) 
    "initial" | ## (division lacks material at start and end.) 
      "medial" | ## (division lacks material at start.) 
      "final" | ## (position of sampled material within original unknown.) 
      "unknown" | ## (division is not a sample.) 
      "complete"
  }?
att.divLike.attribute.part =
  ## specifies whether or not the division is fragmented by
  ##		some other structural element, for example a speech which is
  ##		divided between two or more verse stanzas.
  [ a:defaultValue = "N" ]
  attribute part {
    ## (the division is incomplete in some respect) 
    "Y" | ## (either the division is complete, or no claim is made as to its completeness.) 
      "N" | ## (the initial part of an incomplete division) 
      "I" | ## (a medial part of an incomplete division) 
      "M" | ## (the final part of an incomplete division) 
      "F"
  }?
att.interpLike.attributes =
  att.interpLike.attribute.resp,
  att.interpLike.attribute.type,
  att.interpLike.attribute.inst
att.interpLike.attribute.resp =
  ## indicates who is responsible for the interpretation.
  attribute resp { data.pointer }?
att.interpLike.attribute.type =
  ## indicates what kind of phenomenon is being noted in the passage.
  attribute type { data.enumerated }?
att.interpLike.attribute.inst =
  ## points to instances of the analysis or interpretation represented
  ## by the current element.
  attribute inst { data.pointers }?
att.editLike.attributes =
  att.editLike.attribute.cert,
  att.editLike.attribute.resp,
  att.editLike.attribute.evidence
att.editLike.attribute.cert =
  ## signifies the degree of certainty associated with the
  ##	intervention or interpretation.
  attribute cert { data.enumerated }?
att.editLike.attribute.resp =
  ## indicates the agency responsible for the
  ##	intervention or interpretation, for example an editor or transcriber.
  attribute resp { data.pointer }?
att.editLike.attribute.evidence =
  ## indicates the nature of the evidence supporting the reliability or
  ##   accuracy of the intervention or interpretation.
  attribute evidence { data.enumerated }?
att.global.attributes =
  att.global.linking.attributes,
  att.global.analytic.attributes,
  att.global.attribute.xmlid,
  att.global.attribute.n,
  att.global.attribute.xmllang,
  att.global.attribute.rend,
  att.global.attribute.xmlbase
att.global.attribute.xmlid =
  ## provides a unique identifier for the element bearing the
  ##       attribute.
  attribute xml:id { xsd:ID }?
att.global.attribute.n =
  ## gives a number (or other label) for an element, which is
  ##       not necessarily unique within the document.
  attribute n { data.words }?
att.global.attribute.xmllang =
  ## indicates the language of the element content using the
  ##       codes from RFC
  ##       3066
  attribute xml:lang { data.language }?
att.global.attribute.rend =
  ## indicates how the element in question was rendered or
  ##	presented in the source text.
  attribute rend { data.words }?
att.global.attribute.xmlbase =
  ## provides a base URI reference with which applications can
  ##       resolve relative URI references into absolute URI
  ##       references.
  attribute xml:base { data.pointer }?
att.measured.attributes =
  att.measured.attribute.unit, att.measured.attribute.scope
att.measured.attribute.unit =
  ## names the units used for the measurement.
  attribute unit { data.enumerated }?
att.measured.attribute.scope =
  ## specifies the applicability of this measurement, where
  ##    more than one object is being measured.
  attribute scope { data.enumerated }?
att.measurement.attributes =
  att.measurement.attribute.unit,
  att.measurement.attribute.quantity,
  att.measurement.attribute.commodity
att.measurement.attribute.unit =
  ## indicates the units used for the measurement, usually
  ##       using the standard symbol for the desired units.
  attribute unit { data.enumerated }?
att.measurement.attribute.quantity =
  ## specifies the number of the specified units that
  ##       comprise the measurement
  attribute quantity { data.numeric }?
att.measurement.attribute.commodity =
  ## indicates the substance that is being measured
  attribute commodity { data.words }?
att.naming.attributes = att.naming.attribute.key
att.naming.attribute.key =
  ## provides a means of locating a full definition for the entity being named
  ## such as a database record key or URI.
  attribute key { data.key }?
att.segLike.attributes =
  att.metrical.attributes,
  att.segLike.attribute.type,
  att.segLike.attribute.function,
  att.segLike.attribute.part
att.segLike.attribute.type =
  ## characterizes the type of segment.
  attribute type { data.enumerated }?
att.segLike.attribute.function =
  ## characterizes the function of the segment.
  attribute function { data.enumerated }?
att.segLike.attribute.part =
  ## specifies whether or not the segment is fragmented by some other
  ## structural element, for example a clause which is divided between two
  ## or more sentences.
  [ a:defaultValue = "N" ]
  attribute part {
    ## (the segment is incomplete in some respect) 
    "Y" | ## (either the segment is complete, or no claim is made as to
      ## its completeness) 
      "N" | ## (the initial part of an incomplete segment) 
      "I" | ## (a medial part of an incomplete segment) 
      "M" | ## (the final part of an incomplete segment) 
      "F"
  }?
att.spanning.attributes = att.spanning.attribute.spanTo
att.spanning.attribute.spanTo =
  ## indicates the end of a span initiated by the element
  ##	bearing this attribute.
  attribute spanTo { data.pointer }?
att.timed.attributes =
  att.timed.attribute.start,
  att.timed.attribute.end,
  att.timed.attribute.dur
att.timed.attribute.start =
  ## indicates the location within a temporal alignment
  ##       at which this element begins.
  attribute start { data.pointer }?
att.timed.attribute.end =
  ## indicates the location within a temporal alignment at which
  ##    this element ends.
  attribute end { data.pointer }?
att.timed.attribute.dur =
  ## indicates the length of this element in time, using either
  ##          specific units or the units specified on the associated temporal
  ##          alignment.
  attribute dur { xsd:duration }?
att.typed.attributes =
  att.typed.attribute.type, att.typed.attribute.subtype
att.typed.attribute.type =
  ## characterizes the element in some sense, using any convenient
  ##  classification scheme or typology.
  attribute type { data.word }?
att.typed.attribute.subtype =
  ## provides a sub-categorization of the element, if needed
  attribute subtype { data.word }?
model.nameLike |= model.nameLike.agent
model.nameLike.agent = notAllowed
model.phrase |= model.segLike
model.segLike = notAllowed
model.phrase |= model.hiLike
model.hiLike = notAllowed
model.pPart.data |= model.dateLike
model.recordingPart |= model.dateLike
model.dateLike = notAllowed
model.pPart.data |= model.timeLike
model.timeLike = notAllowed
model.pPart.data |= model.measureLike
model.measureLike = notAllowed
model.phrase |= model.graphicLike
model.graphicLike = notAllowed
model.phrase |= model.pPart.msdesc
model.pPart.msdesc = notAllowed
model.phrase |= model.pPart.edit
model.pPart.edit = notAllowed
model.phrase |= model.ptrLike
model.ptrLike = notAllowed
model.phrase |= model.lPart
model.lPart = notAllowed
model.global |= model.global.meta
model.global.meta = notAllowed
model.global |= model.milestoneLike
model.milestoneLike = notAllowed
model.gLike = notAllowed
model.common |= model.oddDecl
model.inter |= model.oddDecl
model.oddDecl = notAllowed
model.common |= model.oddRef
model.inter |= model.oddRef
model.oddRef = notAllowed
model.phrase |= model.oddPhr
model.oddPhr = notAllowed
model.inter |= model.qLike
model.common |= model.qLike
model.qLike = notAllowed
model.inter |= model.biblLike
model.common |= model.biblLike
model.biblLike = notAllowed
model.inter |= model.listLike
model.common |= model.listLike
model.listLike = notAllowed
model.inter |= model.noteLike
model.common |= model.noteLike
model.noteLike = notAllowed
model.divPart.stage |= model.stageLike
model.inter |= model.stageLike
model.stageLike = notAllowed
model.featureVal |= model.complexVal
model.complexVal = notAllowed
model.featureVal |= model.singleVal
model.singleVal = notAllowed
model.entryParts.top = notAllowed
model.global |= model.global.edit
model.global.edit = notAllowed
model.common |= model.divPart
model.divPart = notAllowed
model.blockLike = notAllowed
model.pLike = notAllowed
model.publicationStmtPart = notAllowed
model.glossLike = notAllowed
model.quoteLike = notAllowed
model.biblPart |= model.respLike
model.msItemPart |= model.respLike
model.respLike = notAllowed
model.personPart = notAllowed
model.divWrapper.bottom = notAllowed
model.divWrapper = notAllowed
model.frontPart |= model.frontPart.drama
model.frontPart.drama = notAllowed
model.pLike.front = notAllowed
model.titlepagePart = notAllowed
model.msItemPart = notAllowed
model.choicePart = notAllowed
model.lLike = notAllowed
model.recordingPart = notAllowed
model.biblPart |= model.imprintPart
model.imprintPart = notAllowed
model.catDescPart = notAllowed
model.addrPart |= model.nameLike
model.pPart.data |= model.nameLike
model.nameLike = notAllowed
model.global = notAllowed
model.featureVal = notAllowed
model.common = notAllowed
model.biblPart = notAllowed
model.frontPart = notAllowed
model.addrPart = notAllowed
model.phrase |= model.pPart.data
model.pPart.data = notAllowed
model.inter = notAllowed
model.phrase = notAllowed
# 2. elements

# 3. macros
data.certainty = "high" | "medium" | "low" | "unknown"
data.probability = xsd:double { minInclusive = "0" maxInclusive = "1" }
data.numeric = xsd:double | xsd:decimal
data.count = xsd:nonNegativeInteger
data.temporal =
  xsd:date
  | xsd:gYear
  | xsd:gMonth
  | xsd:gDay
  | xsd:gYearMonth
  | xsd:gMonthDay
  | xsd:time
  | xsd:dateTime
  | xsd:token {
      pattern =
        "(-?[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[12][0-9]|3[01])T)?([01][0-9]|2[0-3])(:[0-5][0-9])?(Z|[+\-]((0[0-9]|1[0-3]):[0-5][0-9]|14:00))?"
    }
data.duration = xsd:duration
data.truthValue = xsd:boolean
data.xTruthValue = xsd:boolean | "unknown" | "inapplicable"
data.language = xsd:language
data.sex = "0" | "1" | "2" | "9"
data.namespace = xsd:anyURI
data.outputMeasurement =
  xsd:token {
    pattern =
      "[\-+]?\d+(\.\d+)?(%|cm|mm|in|pt|pc|px|em|ex|gd|rem|vw|vh|vm)"
  }
data.pattern = xsd:token
data.pointer = xsd:anyURI
data.pointers = list { data.pointer+ }
data.code = xsd:anyURI
data.enumerated = xsd:token
data.key = xsd:string
data.word = xsd:token { pattern = "(\p{L}|\p{N}|\p{P}|\p{S})+" }
data.names = list { data.name+ }
data.words = list { data.word+ }
data.name = xsd:Name
macro.bodyPart.div = \div, (\div | divGen | model.global)*
macro.bodyPart.div0 = div0, (div0 | divGen | model.global)*
macro.bodyPart.div1 = div1, (div1 | divGen | model.global)*
macro.bodyPart.pre = (divGen, model.global*)*
macro.bodyPart.main =
  macro.bodyPart.pre,
  (macro.bodyPart.div | macro.bodyPart.div0 | macro.bodyPart.div1)
mix.drama = notAllowed
mix.spoken = notAllowed
mix.dictionaries = notAllowed
macro.component |=
  model.common | mix.drama | mix.spoken | mix.dictionaries
macro.componentSeq |= (macro.component | model.global)*
macro.paraContent =
  (text | model.gLike | model.phrase | model.inter | model.global)*
macro.phraseSeq = (text | model.gLike | model.phrase | model.global)*
macro.specialPara =
  (text
   | model.gLike
   | model.phrase
   | model.inter
   | model.divPart
   | model.global)*
macro.xtext = (text | model.gLike)*
macro.fileDescPart =
  titleStmt,
  editionStmt?,
  extent?,
  publicationStmt,
  seriesStmt?,
  notesStmt?
macro.glossSeq = altIdent?, equiv*, gloss*, desc*
