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 core

# Set predeclared macros

# 0. predeclared macros

# 1. classes

# 2. elements

abbr =
  ## (abbreviation) contains an abbreviation of any sort.
  element abbr { abbr.content, abbr.attributes }
abbr.content = macro.phraseSeq
abbr.attributes =
  att.global.attributes,
  ## allows the encoder to classify the abbreviation according to
  ## some convenient typology.
  attribute type { data.enumerated }?,
  empty
model.pPart.edit |= abbr
model.choicePart |= abbr

add =
  ## (addition) contains letters, words, or phrases inserted in the text by an
  ## author, scribe, annotator, or corrector.
  element add { add.content, add.attributes }
add.content = macro.paraContent
add.attributes =
  att.global.attributes,
  att.editLike.attributes,
  ## if the the addition is written into the copy text, indicates
  ## where the additional text is written.
  attribute place { data.words }?,
  ## signifies the hand of the agent which made the addition.
  attribute hand { data.pointer }?,
  empty
model.pPart.edit |= add

addrLine =
  ## contains one line of a postal or other address.
  element addrLine { addrLine.content, addrLine.attributes }
addrLine.content = macro.phraseSeq
addrLine.attributes = att.global.attributes, empty
model.addrPart |= addrLine

address =
  ## contains a postal or other address, for example of a
  ## publisher, an organization, or an individual.
  element address { address.content, address.attributes }
address.content = model.global*, (model.addrPart, model.global*)+
address.attributes = att.global.attributes, empty
model.pPart.data |= address
model.publicationStmtPart |= address

altIdent =
  ## supplies the recommended XML name for an element, class,
  ##   attribute, etc. in some language.
  element altIdent { altIdent.content, altIdent.attributes }
altIdent.content = macro.xtext
altIdent.attributes = att.global.attributes, att.typed.attributes, empty
model.glossLike |= altIdent

analytic =
  ## (analytic level) contains bibliographic elements describing an item (e.g. an
  ## article or poem) published within a monograph or journal and not as an
  ## independent publication.
  element analytic { analytic.content, analytic.attributes }
analytic.content = (author | editor | respStmt | title)*
analytic.attributes = att.global.attributes, empty

author =
  ## in a bibliographic reference, contains the name of the author(s),
  ## personal or corporate,
  ## of a work; the primary statement of responsibility for any
  ## bibliographic item. 
  element author { author.content, author.attributes }
author.content = macro.phraseSeq
author.attributes = att.global.attributes, empty
model.respLike |= author

bibl =
  ## (bibliographic citation) contains a loosely-structured bibliographic citation of which
  ## the sub-components may or may not be explicitly tagged. 
  element bibl { bibl.content, bibl.attributes }
bibl.content =
  (text
   | model.gLike
   | model.hiLike
   | model.pPart.data
   | model.pPart.edit
   | model.segLike
   | model.ptrLike
   | model.biblPart
   | model.global)*
bibl.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.biblLike |= bibl
model.msItemPart |= bibl
model.personPart |= bibl

biblFull =
  ## contains a fully-structured bibliographic citation, in which all
  ## components of the TEI file description
  ## are present.
  element biblFull { biblFull.content, biblFull.attributes }
biblFull.content = macro.fileDescPart, sourceDesc*
biblFull.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.biblLike |= biblFull

biblItem =
  ## (bibliographic citation) contains a bibliographic citation in which only bibliographic
  ##   subelements appear.
  element biblItem { biblItem.content, biblItem.attributes }
biblItem.content =
  (title
   | biblItem
   | imprint
   | model.nameLike
   | model.biblPart
   | model.dateLike)+
biblItem.attributes =
  att.global.attributes,
  att.declarable.attributes,
  att.typed.attributes,
  ## indicates the physical form of the object of this bibliographic entry.
  attribute form { xsd:token }?,
  ## indicates the publication status of the object of this bibliographic entry.
  attribute status { text }?,
  ## indicates the relationship of this bibliographic entry to
  ##       that of its parent bibl or biblItem.
  attribute role { text }?,
  empty
model.biblLike |= biblItem

biblScope =
  ## (scope of citation) defines the scope of a bibliographic reference, for example as a
  ## list of pagenumbers, or a named subdivision of a larger work.
  element biblScope { biblScope.content, biblScope.attributes }
biblScope.content = macro.phraseSeq
biblScope.attributes =
  att.global.attributes,
  ## identifies the type of information conveyed by the element, e.g.
  ## pages, volume.
  attribute type { data.enumerated }?,
  empty
model.imprintPart |= biblScope

biblStruct =
  ## (structured bibliographic citation) contains a structured bibliographic citation, in which only
  ## bibliographic subelements appear and in a specified order. 
  element biblStruct { biblStruct.content, biblStruct.attributes }
biblStruct.content =
  analytic*, (monogr, series*)+, (model.noteLike | idno)*
biblStruct.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.biblLike |= biblStruct

binaryObject =
  ## provides encoded binary data representing an inline graphic or other object.
  element binaryObject { binaryObject.content, binaryObject.attributes }
binaryObject.content = text
binaryObject.attributes =
  att.global.attributes,
  ## The display width of the object
  attribute width { data.outputMeasurement }?,
  ## The display height of the object
  attribute height { data.outputMeasurement }?,
  ## A scale factor to be applied to the object to make it the desired display size
  attribute scale { data.numeric }?,
  ## The MIME type
  attribute mimeType { data.word }?,
  ## The encoding used to encode the binary data. If not
  ##       specified, this is assumed to be Base64
  attribute encoding { data.words }?,
  empty
model.graphicLike |= binaryObject
model.titlepagePart |= binaryObject

cb =
  ## (column break) marks the boundary between one column of a text and the next
  ## in a standard reference system.
  element cb { cb.content, cb.attributes }
cb.content = empty
cb.attributes =
  att.global.attributes,
  ## indicates the edition or version in which the column break is located
  ## at this point
  attribute ed { data.code }?,
  empty
model.milestoneLike |= cb

choice =
  ## groups a number of alternative encodings for the same point in
  ##   a text.
  element choice { choice.content, choice.attributes }
choice.content = (model.choicePart | choice)*
choice.attributes = att.global.attributes, empty
model.pPart.edit |= choice

cit =
  ## A quotation from some other document, together with a
  ##   bibliographic reference to its source.
  element cit { cit.content, cit.attributes }
cit.content =
  (model.quoteLike | model.biblLike | model.ptrLike | model.global)+
cit.attributes = att.global.attributes, empty
model.qLike |= cit

corr =
  ## (correction) contains the correct form of a passage apparently erroneous in the copy text.
  element corr { corr.content, corr.attributes }
corr.content = macro.paraContent
corr.attributes = att.global.attributes, att.editLike.attributes, empty
model.pPart.edit |= corr
model.choicePart |= corr

date =
  ## contains a date in any format.
  element date { date.content, date.attributes }
date.content = macro.phraseSeq
date.attributes =
  att.global.attributes,
  att.editLike.attributes,
  ## indicates the system or calendar to which the date belongs.
  attribute calendar { data.enumerated }?,
  ## gives the value of the date in standard form, i.e. yyyy-mm-dd.
  attribute value { data.temporal }?,
  ## indicates the degree of precision associated with the date.
  attribute precision { data.certainty }?,
  empty
model.dateLike |= date
model.publicationStmtPart |= date

dateRange =
  ## (date range) contains two dates or another phrase delimiting a time period.
  element dateRange { dateRange.content, dateRange.attributes }
dateRange.content = macro.phraseSeq
dateRange.attributes =
  att.global.attributes,
  ## indicates the system or calendar to which the date belongs.
  attribute calendar { data.enumerated }?,
  ## indicates the starting point of the period in standard form.
  attribute from {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?,
  ## indicates the ending point of the period in standard form.
  attribute to {
    xsd:date
    | xsd:gYear
    | xsd:gMonth
    | xsd:gDay
    | xsd:gYearMonth
    | xsd:gMonthDay
    | xsd:time
    | xsd:dateTime
  }?,
  ## indicates the precision to be attached to either or both dates
  ## specified.
  attribute exact {
    ## (the to date is exact) 
    "to" | ## (the from date is exact) 
      "from" | ## (both dates are exact) 
      "both" | ## (both dates are approximate or unspecified) 
      "none"
  }?,
  empty
model.dateLike |= dateRange

del =
  ## (deletion) contains a letter, word or passage deleted, marked as deleted,
  ## or otherwise indicated as superfluous or spurious in the copy text by an
  ## author, scribe, annotator, or corrector.
  element del { del.content, del.attributes }
del.content = macro.paraContent
del.attributes =
  att.global.attributes,
  att.editLike.attributes,
  ## classifies the type of deletion using any convenient typology.
  attribute type { data.enumerated }?,
  ## may be used to indicate faulty deletions, e.g.
  ## strikeouts which include too much or too little text.
  [ a:defaultValue = "unremarkable" ]
  attribute status { data.enumerated }?,
  ## signifies the hand of the agent which made the deletion.
  attribute hand { data.pointer }?,
  empty
model.pPart.edit |= del

desc =
  ## (description) contains a brief description of the purpose and application for
  ## an element, attribute, or attribute value.
  element desc { desc.content, desc.attributes }
desc.content = macro.paraContent
desc.attributes = att.global.attributes, empty
model.glossLike |= desc

distinct =
  ## (distinct) identifies any word or phrase which is regarded as linguistically
  ## distinct, for example as archaic, technical, dialectal, non-preferred,
  ## etc., or as forming part of a sublanguage. 
  element distinct { distinct.content, distinct.attributes }
distinct.content = macro.phraseSeq
distinct.attributes =
  att.global.attributes,
  ## specifies the sublanguage or register to which the word or phrase
  ## is being assigned
  attribute type { data.enumerated }?,
  ## specifies how the phrase is distinct diachronically
  attribute time { data.code }?,
  ## specifies how the phrase is distinct diatopically
  attribute space { data.code }?,
  ## specifies how the phrase is distinct diastatically
  attribute social { data.code }?,
  empty
model.hiLike |= distinct

divGen =
  ## (automatically generated text division) indicates the location at which a textual division generated
  ## automatically by a text-processing application is to appear.
  element divGen { divGen.content, divGen.attributes }
divGen.content = model.divWrapper*
divGen.attributes =
  att.global.attributes,
  ## specifies what type of generated text division (e.g. index,
  ## table of contents, etc.) is to appear.
  attribute type { data.enumerated }?,
  empty
model.frontPart |= divGen

editor =
  ## (editor) secondary statement of responsibility for a
  ## bibliographic item, for example the name of an individual, institution
  ## or organization, (or of several such) acting as editor, compiler,
  ## translator, etc. 
  element editor { editor.content, editor.attributes }
editor.content = macro.phraseSeq
editor.attributes =
  att.global.attributes,
  ## specifies the nature of the intellectual responsibility
  [ a:defaultValue = "editor" ] attribute role { data.enumerated }?,
  empty
model.respLike |= editor

emph =
  ## (emphasized) marks words or phrases which are stressed or emphasized for
  ## linguistic or rhetorical effect.
  element emph { emph.content, emph.attributes }
emph.content = macro.paraContent
emph.attributes = att.global.attributes, empty
model.hiLike |= emph

equiv =
  ## specifies a component which is considered equivalent to the
  ##   parent element, either by co-reference, or by external link.
  element equiv { equiv.content, equiv.attributes }
equiv.content = empty
equiv.attributes =
  att.global.attributes,
  ## names the underlying concept of which the parent is a
  ##   representation
  attribute name { data.name }?,
  ## references the underlying concept of which the parent is a
  ##   representation by means of some external identifier
  attribute uri { data.pointer }?,
  ## references an external script which contains a method to
  ## transform instances of this element to canonical TEI
  attribute filter { xsd:anyURI }?,
  ## MIME type of external filter script
  attribute mimeType { data.word }?,
  empty
model.glossLike |= equiv

expan =
  ## (expansion) contains the expansion of an abbreviation.
  element expan { expan.content, expan.attributes }
expan.content = macro.phraseSeq
expan.attributes = att.global.attributes, att.editLike.attributes, empty
model.pPart.edit |= expan
model.choicePart |= expan

foreign =
  ## (foreign) identifies a word or phrase as belonging to some language other
  ## than that of the surrounding text. 
  element foreign { foreign.content, foreign.attributes }
foreign.content = macro.phraseSeq
foreign.attributes = att.global.attributes, empty
model.hiLike |= foreign

gap =
  ## (omitted material) indicates a point where material has been omitted in a
  ## transcription, whether for editorial reasons described in the TEI
  ## header, as part of sampling practice, or because the material is
  ## illegible or inaudible.
  element gap { gap.content, gap.attributes }
gap.content = macro.glossSeq?
gap.attributes =
  att.global.attributes,
  att.editLike.attributes,
  ## gives the reason for omission.  Sample values include
  ## sampling, illegible, inaudible,
  ## irrelevant, cancelled, cancelled and illegible.
  attribute reason { data.words }?,
  ## in the case of text omitted from the transcription because of
  ## deliberate deletion by an identifiable hand, signifies the hand which
  ## made the deletion.
  attribute hand { data.pointer }?,
  ## In the case of text omitted because of damage, categorizes the cause of the damage, if it can be identified.
  attribute agent { data.enumerated }?,
  ## indicates approximately how much text has been omitted from the
  ## transcription, in letters, minims, inches, or any appropriate unit,
  ## either because of editorial policy or because a deletion, damage, or
  ## other cause has rendered transcription impossible.
  attribute extent { data.words }?,
  empty
model.global.edit |= gap

gloss =
  ## identifies a phrase or word used to provide a gloss or
  ##   definition for some other word or phrase.
  element gloss { gloss.content, gloss.attributes }
gloss.content = macro.phraseSeq
gloss.attributes =
  att.global.attributes,
  att.declaring.attributes,
  (
   ## identifies the associated term element by an
   ##       absolute or relative URI reference
   attribute target { data.pointer } | ## identifies the associated term element using a canonical
     ##       reference from a scheme defined in a refsDecl element
     ##       in the TEI header
     attribute cRef { data.pointer })?,
  empty
model.hiLike |= gloss
model.glossLike |= gloss

graphic =
  ## indicates the location of an inline graphic, illustration, or figure.
  element graphic { graphic.content, graphic.attributes }
graphic.content = empty
graphic.attributes =
  att.global.attributes,
  ## The display width of the image
  attribute width { data.outputMeasurement }?,
  ## The display height of the image
  attribute height { data.outputMeasurement }?,
  ## A scale factor to be applied to the image to make it the desired display size
  attribute scale { data.probability }?,
  ## The target URL
  attribute url { data.pointer }?,
  ## The MIME type
  attribute mimeType { data.word }?,
  empty
model.graphicLike |= graphic
model.titlepagePart |= graphic

head =
  ## (heading) contains any type of heading, for example the title of a section,
  ## or the heading of a list, glossary, manuscript description, etc.
  element head { head.content, head.attributes }
head.content = macro.paraContent
head.attributes =
  att.global.attributes,
  ## categorizes the heading in any way meaningful 
  ##          to the encoder. 
  attribute type { data.enumerated }?,
  empty
model.divWrapper |= head
model.pLike.front |= head

headItem =
  ## (heading for list items) contains the heading for the item or gloss column in a
  ## glossary list or similar structured list.
  element headItem { headItem.content, headItem.attributes }
headItem.content = macro.phraseSeq
headItem.attributes = att.global.attributes, empty

headLabel =
  ## (heading for list labels) contains the heading for the label or term column in a
  ## glossary list or similar structured list.
  element headLabel { headLabel.content, headLabel.attributes }
headLabel.content = macro.phraseSeq
headLabel.attributes = att.global.attributes, empty

hi =
  ## (highlighted) marks a word or phrase as graphically distinct from the
  ## surrounding text, for reasons concerning which no claim is
  ## made. 
  element hi { hi.content, hi.attributes }
hi.content = macro.paraContent
hi.attributes = att.global.attributes, empty
model.hiLike |= hi

imprint =
  ## groups information relating to the publication or distribution
  ##   of a bibliographic item.
  element imprint { imprint.content, imprint.attributes }
imprint.content = ((model.imprintPart | model.dateLike), model.global*)+
imprint.attributes = att.global.attributes, empty

index =
  ## (index entry) marks a location to be indexed for whatever purpose.
  element index { index.content, index.attributes }
index.content = (term, index?)*
index.attributes =
  att.global.attributes,
  att.spanning.attributes,
  ## supplies a name to specify which index (of several) the index entry belongs to.
  attribute indexName { data.name }?,
  empty
model.global.meta |= index

item =
  ## contains one
  ## component of a list.
  element item { item.content, item.attributes }
item.content = macro.specialPara
item.attributes = att.global.attributes, empty

l =
  ## (verse line) contains a single, possibly incomplete, line of verse.
  element l { l.content, l.attributes }
l.content = macro.paraContent
l.attributes =
  att.global.attributes,
  att.metrical.attributes,
  att.enjamb.attributes,
  ## specifies whether or not the line is metrically complete. 
  [ a:defaultValue = "N" ]
  attribute part {
    ## (the line is metrically incomplete) 
    "Y" | ## (either the line is complete, or no claim is made as to its
      ## completeness) 
      "N" | ## (the initial part of an incomplete line) 
      "I" | ## (a medial part of an incomplete line) 
      "M" | ## (the final part of an incomplete line) 
      "F"
  }?,
  empty
model.divPart |= l
model.lLike |= l

label =
  ## contains the label associated with an item in a list; in
  ## glossaries, marks the term being defined.
  element label { label.content, label.attributes }
label.content = macro.phraseSeq
label.attributes = att.global.attributes, empty
model.inter |= label
model.common |= label

lb =
  ## (line break) marks the start of a new (typographic) line in some
  ## edition or version of a text.
  element lb { lb.content, lb.attributes }
lb.content = empty
lb.attributes =
  att.global.attributes,
  ## indicates the edition or version in which the line break is located
  ## at this point
  attribute ed { data.code }?,
  empty
model.milestoneLike |= lb

lg =
  ## (line group) contains a group of verse lines functioning as a formal unit,
  ## e.g. a stanza, refrain, verse paragraph, etc.
  element lg { lg.content, lg.attributes }
lg.content =
  (model.divWrapper | model.global)*,
  (model.lLike | lg),
  (model.lLike | lg | model.global)*,
  (model.divWrapper.bottom, model.global*)*
lg.attributes = att.global.attributes, att.divLike.attributes, empty
model.divPart |= lg

\list =
  ## contains any sequence of items organized as a list.
  element list { list.content, list.attributes }
list.content =
  (model.divWrapper | model.global)*,
  ((item, model.global*)+
   | (headLabel?,
      headItem?,
      (label, model.global*, item, model.global*)+)),
  (model.divWrapper.bottom, model.global*)*
list.attributes =
  att.global.attributes,
  ## describes the form of the list.
  [ a:defaultValue = "simple" ] attribute type { data.enumerated }?,
  empty
model.listLike |= \list

listBibl =
  ## (citation list) contains a list of bibliographic citations of any kind. 
  element listBibl { listBibl.content, listBibl.attributes }
listBibl.content =
  (model.divWrapper | model.global)*,
  (model.biblLike, model.global*)+,
  (model.divWrapper.bottom, model.global*)*
listBibl.attributes =
  att.global.attributes, att.declarable.attributes, empty
model.listLike |= listBibl
model.msItemPart |= listBibl

measure =
  ## contains a word or phrase referring to some quantity of
  ## an object or commodity, usually comprising a number, a unit, and a
  ## commodity name.
  element measure { measure.content, measure.attributes }
measure.content = macro.phraseSeq
measure.attributes =
  att.global.attributes,
  att.measurement.attributes,
  ## specifies the type of measurement in any convenient typology.
  attribute type { data.enumerated }?,
  empty
model.measureLike |= measure

meeting =
  ## in bibliographic references,
  ## contains a description of the meeting or conference from which
  ## the bibliographic item derives.
  element meeting { meeting.content, meeting.attributes }
meeting.content = macro.paraContent
meeting.attributes = att.global.attributes, empty

mentioned =
  ## marks words or phrases mentioned, not used.
  element mentioned { mentioned.content, mentioned.attributes }
mentioned.content = macro.phraseSeq
mentioned.attributes = att.global.attributes, empty
model.hiLike |= mentioned

milestone =
  ## marks a boundary point separating  any kind of section of a text, as indicated by
  ## changes in a standard reference system, where the section is not
  ## represented by a structural element.
  element milestone { milestone.content, milestone.attributes }
milestone.content = empty
milestone.attributes =
  att.global.attributes,
  ## indicates the edition or version to which the milestone applies.
  attribute ed { data.code }?,
  ## provides a conventional name for the kind of section changing at this milestone.
  attribute unit { data.enumerated },
  empty
model.milestoneLike |= milestone

monogr =
  ## (monographic level) contains bibliographic elements describing an item (e.g. a book
  ## or journal) published as an independent item (i.e. as a separate
  ## physical object).
  element monogr { monogr.content, monogr.attributes }
monogr.content =
  (((author | editor | respStmt),
    (author | editor | respStmt)*,
    title+,
    (editor | respStmt)*)
   | (title+, (author | editor | respStmt)*))?,
  (model.noteLike | meeting)*,
  (edition, (editor | respStmt)*)*,
  imprint,
  (imprint | extent | biblScope)*
monogr.attributes = att.global.attributes, empty

name =
  ## (name, proper noun) contains a proper noun or noun phrase.
  element name { name.content, name.attributes }
name.content = macro.phraseSeq
name.attributes =
  att.global.attributes,
  att.naming.attributes,
  ## indicates the type of the object which is being named by the
  ##       phrase.
  attribute type { data.enumerated }?,
  empty
model.nameLike.agent |= name

note =
  ## contains a note or
  ## annotation.
  element note { note.content, note.attributes }
note.content = macro.specialPara
note.attributes =
  att.global.attributes,
  ## describes the type of note.
  attribute type { data.enumerated }?,
  ## indicates who is responsible for the annotation: author,
  ##	editor, translator, etc.
  attribute resp { data.pointer }?,
  ## indicates where the note appears in the source text.
  [ a:defaultValue = "unspecified" ] attribute place { data.code }?,
  ## indicates whether the copy text shows the exact place of reference
  ## for the note.
  [ a:defaultValue = "true" ]
  attribute anchored {
    ## (copy text indicates the place of attachment for the note.
    ##     ) 
    "true" | ## (copy text indicates no place of attachment for the note.) 
      "false"
  }?,
  ## indicates the point (or points) of attachment for a note, or the beginning of
  ## the span to which the note is attached.
  attribute target { data.pointers }?,
  ## points to the end of the span to which the note is attached, if
  ## the note is not embedded in the text at that point.
  attribute targetEnd { data.pointers }?,
  empty
model.noteLike |= note
model.biblPart |= note
model.entryParts.top |= note
model.msItemPart |= note
model.personPart |= note

num =
  ## (number) contains a number, written in any form.
  element num { num.content, num.attributes }
num.content = macro.phraseSeq
num.attributes =
  att.global.attributes,
  ## indicates the type of numeric value.
  attribute type { data.enumerated }?,
  ## supplies the value of the number in standard form.
  attribute value { data.numeric }?,
  empty
model.measureLike |= num

orig =
  ## (original form) contains  a reading which is marked as following  the original,
  ## rather than being normalized or corrected.
  element orig { orig.content, orig.attributes }
orig.content = macro.paraContent
orig.attributes = att.global.attributes, empty
model.pPart.edit |= orig
model.choicePart |= orig

p =
  ## (paragraph) marks paragraphs in prose.
  element p { p.content, p.attributes }
p.content = macro.paraContent
p.attributes = att.global.attributes, empty
model.pLike |= p
model.divPart |= p

pb =
  ## (page break) marks the boundary between one page of a text and the next
  ## in a standard reference system.
  element pb { pb.content, pb.attributes }
pb.content = empty
pb.attributes =
  att.global.attributes,
  ## indicates the edition or version in which the page break is located
  ## at this point
  attribute ed { data.code }?,
  empty
model.milestoneLike |= pb

postBox =
  ## (postBox) contains a number or other identifier for some postal delivery
  ## point other than a street address. 
  element postBox { postBox.content, postBox.attributes }
postBox.content = text
postBox.attributes = att.global.attributes, empty
model.addrPart |= postBox

postCode =
  ## (postCode) contains a numerical or alphanumeric code used as part of a
  ## postal address to simplify sorting or delivery of mail. 
  element postCode { postCode.content, postCode.attributes }
postCode.content = text
postCode.attributes = att.global.attributes, empty
model.addrPart |= postCode

ptr =
  ## defines a pointer to another location.
  element ptr { ptr.content, ptr.attributes }
ptr.content = empty
ptr.attributes =
  att.global.attributes,
  att.pointing.attributes,
  att.declaring.attributes,
  (
   ## specifies the destination of the pointer by supplying one or
   ##       more URI References
   attribute target { data.pointers } | ## specifies the destination of the pointer by supplying a
     ##       canonical reference from a scheme defined in a refsDecl
     ##       element in the TEI header
     attribute cRef { data.pointers })?,
  empty
model.ptrLike |= ptr

pubPlace =
  ## contains the name of the place where a bibliographic item was
  ## published.
  element pubPlace { pubPlace.content, pubPlace.attributes }
pubPlace.content = macro.phraseSeq
pubPlace.attributes =
  att.global.attributes, att.naming.attributes, empty
model.imprintPart |= pubPlace
model.publicationStmtPart |= pubPlace

publisher =
  ## provides the name of the organization responsible for
  ## the publication or distribution of a bibliographic item.
  element publisher { publisher.content, publisher.attributes }
publisher.content = macro.phraseSeq
publisher.attributes = att.global.attributes, empty
model.imprintPart |= publisher
model.publicationStmtPart |= publisher

q =
  ## (quoted speech, thought, or writing) contains material which is
  ## marked as (ostensibly) quoted from elsewhere; in narrative, this element is used to mark direct or
  ## indirect speech; in dictionaries, it ay be used to mark
  ## real or contrived examples of usage; in manuscript descriptions or
  ## other metadata, to mark extracts quoted from the source being documented.
  element q { q.content, q.attributes }
q.content = macro.specialPara
q.attributes =
  att.global.attributes,
  att.ascribed.attributes,
  ## may be used to indicate whether the quoted matter is spoken
  ## or thought, or to characterize it more finely.
  attribute type { data.enumerated }?,
  ## may be used to indicate whether the quoted matter is regarded
  ## as direct or indirect speech.
  [ a:defaultValue = "unknown" ]
  attribute direct {
    ## (speech or thought is represented directly.) 
    "true" | ## (speech or thought is represented indirectly,
      ## e.g. by use of a marked verbal aspect.) 
      "false" | ## (no claim is made.) 
      "unknown"
  }?,
  empty
model.qLike |= q
model.msItemPart |= q

quote =
  ## (quotation) contains a phrase or passage attributed by the narrator or
  ## author to some agency external to the text. 
  element quote { quote.content, quote.attributes }
quote.content = macro.specialPara
quote.attributes = att.global.attributes, empty
model.qLike |= quote
model.quoteLike |= quote

ref =
  ## defines a reference to another location, possibly
  ##   modified by additional text or comment.
  element ref { ref.content, ref.attributes }
ref.content = macro.paraContent
ref.attributes =
  att.global.attributes,
  att.pointing.attributes,
  att.declaring.attributes,
  (
   ## specifies the destination of the reference by supplying one
   ##     or more URI References
   attribute target { data.pointers } | ## specifies the destination of the reference by supplying a
     ##       canonical reference from a scheme defined in a refsDecl
     ##       element in the TEI header
     attribute cRef { data.pointers })?,
  empty
model.ptrLike |= ref

reg =
  ## (regularization) contains a reading which has been regularized or normalized
  ## in some sense.
  element reg { reg.content, reg.attributes }
reg.content = macro.paraContent
reg.attributes = att.global.attributes, att.editLike.attributes, empty
model.pPart.edit |= reg
model.choicePart |= reg

resp =
  ## contains a phrase describing the nature of a person's
  ##   intellectual responsibility.
  element resp { resp.content, resp.attributes }
resp.content = macro.phraseSeq
resp.attributes = att.global.attributes, empty

respStmt =
  ## (statement of responsibility) supplies a statement of responsibility for someone responsible
  ##   for the intellectual content of a text, edition, recording, or
  ##   series, where the specialized elements for authors, editors, etc. do
  ##   not suffice or do not apply.
  element respStmt { respStmt.content, respStmt.attributes }
respStmt.content =
  (resp, resp*, model.nameLike.agent+)
  | (model.nameLike.agent, model.nameLike.agent*, resp+)
respStmt.attributes = att.global.attributes, empty
model.respLike |= respStmt
model.recordingPart |= respStmt

rs =
  ## (referencing string) contains a general purpose name or referring string.
  element rs { rs.content, rs.attributes }
rs.content = macro.phraseSeq
rs.attributes =
  att.global.attributes,
  att.naming.attributes,
  ## indicates more specifically the object referred to by the
  ##       referencing string. Values might include person,
  ##       place, ship, element etc.
  attribute type { data.enumerated }?,
  empty
model.nameLike |= rs

series =
  ## (series information) contains information about the series in which a book or other
  ## bibliographic item has appeared.
  element series { series.content, series.attributes }
series.content =
  (text
   | model.gLike
   | title
   | editor
   | respStmt
   | biblScope
   | model.global)*
series.attributes = att.global.attributes, empty
model.biblPart |= series

sic =
  ## contains text reproduced although apparently incorrect or inaccurate.
  element sic { sic.content, sic.attributes }
sic.content = macro.paraContent
sic.attributes = att.global.attributes, empty
model.pPart.edit |= sic
model.choicePart |= sic

soCalled =
  ## (so called) contains a word or phrase for which the author or narrator
  ## indicates a disclaiming of responsibility, for example by the use
  ## of scare quotes or italics.
  element soCalled { soCalled.content, soCalled.attributes }
soCalled.content = macro.phraseSeq
soCalled.attributes = att.global.attributes, empty
model.hiLike |= soCalled

sp =
  ## (speech) An individual speech in a performance text, or a passage
  ##	  presented as such in a prose or verse text.
  element sp { sp.content, sp.attributes }
sp.content =
  model.global*,
  (speaker, model.global*)?,
  ((model.lLike | lg | model.pLike | model.blockLike | model.stageLike),
   model.global*)+
sp.attributes = att.global.attributes, att.ascribed.attributes, empty
model.divPart |= sp

speaker =
  ## A specialized form of heading or label, giving the name of
  ## one or more speakers in a dramatic text or fragment.
  element speaker { speaker.content, speaker.attributes }
speaker.content = macro.phraseSeq
speaker.attributes = att.global.attributes, empty

stage =
  ## (stage direction) contains any kind of stage direction within a dramatic text or
  ## fragment.
  element stage { stage.content, stage.attributes }
stage.content = macro.specialPara
stage.attributes =
  att.global.attributes,
  ## indicates the kind of stage direction.
  attribute type { data.enumerated }?,
  empty
model.stageLike |= stage

street =
  ## (street) a full street address including any name or number identifying a
  ## building as well as the name of the street or route on which it is
  ## located.
  element street { street.content, street.attributes }
street.content = macro.phraseSeq
street.attributes = att.global.attributes, empty
model.addrPart |= street

teiCorpus =
  ## (TEI corpus) contains the whole of a TEI encoded corpus, comprising a
  ## single corpus header and one or more TEI elements, each containing
  ## a single text header and a text.
  element teiCorpus { teiCorpus.content, teiCorpus.attributes }
teiCorpus.content = teiHeader, (TEI | teiCorpus)+
teiCorpus.attributes =
  att.global.attributes,
  ## The version of the TEI scheme
  [ a:defaultValue = "5.0" ] attribute version { xsd:decimal }?,
  empty

term =
  ## contains a single-word, multi-word, or symbolic designation
  ##   which is regarded as a technical term.
  element term { term.content, term.attributes }
term.content = macro.phraseSeq
term.attributes =
  att.global.attributes,
  att.declaring.attributes,
  att.typed.attributes,
  (
   ## identifies the associated gloss element by an
   ##	absolute or relative URI reference
   attribute target { data.pointer } | ## identifies the associated gloss element using a
     ##	canonical reference from a scheme defined in a
     ##	refsDecl element in the TEI header
     attribute cRef { data.pointer })?,
  ## supplies the sort key for this term in an index.
  attribute sortKey { data.word }?,
  empty
model.hiLike |= term

time =
  ## contains a phrase defining a time of day in any format.
  element time { time.content, time.attributes }
time.content = macro.phraseSeq
time.attributes =
  att.global.attributes,
  ## gives the value of the time in standard form, e.g. as hh:mm.
  attribute value { data.temporal }?,
  empty
model.timeLike |= time

timeRange =
  ## (time range) contains two times or another phrase indicating a time period.
  element timeRange { timeRange.content, timeRange.attributes }
timeRange.content = macro.phraseSeq
timeRange.attributes =
  att.global.attributes,
  ## indicates the starting point of the time period in a standard form, usually hh:mm.
  attribute from { data.temporal }?,
  ## indicates the ending point of the time period in standard form, usually hh:mm.
  attribute to { data.temporal }?,
  ## indicates the precision to be attached to either or both times
  ##		specified.
  attribute exact {
    ## (the to time is exact) 
    "to" | ## (the from time is exact) 
      "from" | ## (both times are exact) 
      "both" | ## (both times are approximate or unspecified) 
      "none"
  }?,
  empty
model.timeLike |= timeRange

title =
  ## contains the full title of a work of any kind.
  element title { title.content, title.attributes }
title.content = macro.paraContent
title.attributes =
  att.global.attributes,
  ## indicates the bibliographic level for a title, that is,
  ##	whether it identifies  an article, book, journal,
  ## series, or unpublished material.
  attribute level {
    ## (analytic title (article, poem, or other item published as
    ##           part of a larger item)
    ##     ) 
    "a" | ## (monographic title (book, collection, or other item published
      ##           as a distinct item, including single volumes of multi-volume
      ##           works)
      ##     ) 
      "m" | ## (journal title
      ##     ) 
      "j" | ## (series title
      ##     ) 
      "s" | ## (title of unpublished material (including theses and
      ##           dissertations unless published by a commercial press)) 
      "u"
  }?,
  ## classifies the title according to some convenient typology.
  attribute type { data.enumerated }?,
  empty
model.hiLike |= title
model.msItemPart |= title

unclear =
  ## contains a word, phrase, or passage which cannot be transcribed
  ## with certainty because it is illegible or inaudible in the source.
  element unclear { unclear.content, unclear.attributes }
unclear.content = macro.paraContent
unclear.attributes =
  att.global.attributes,
  att.editLike.attributes,
  ## indicates why the material is hard to transcribe.
  attribute reason { data.words }?,
  ## Where the difficulty in transcription arises from action
  ## (partial deletion, etc.) assignable to an identifiable hand, signifies
  ## the hand responsible for the action.
  attribute hand { data.pointer }?,
  ## Where the difficulty in transcription arises from
  ##  damage, categorizes the cause of the damage, if it can be identified.
  attribute agent { data.enumerated }?,
  empty
model.pPart.edit |= unclear
model.choicePart |= unclear
# 3. macros
