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 msdescription

# Set predeclared macros

# 0. predeclared macros

# 1. classes

# 2. elements

accMat =
  ## (accompanying material) contains details of any significant additional
  ## material which may be closely associated with the manuscript being
  ## described, such as non-contemporaneous documents or fragments bound in
  ## with the manuscript at some earlier historical period.
  element accMat { accMat.content, accMat.attributes }
accMat.content = macro.specialPara
accMat.attributes = att.global.attributes, att.typed.attributes, empty

acquisition =
  ## contains any descriptive or other information
  ## concerning the process by which a manuscript or manuscript part entered the holding
  ## institution. 
  element acquisition { acquisition.content, acquisition.attributes }
acquisition.content = macro.specialPara
acquisition.attributes =
  att.global.attributes, att.datable.attributes, empty

additional =
  ## groups additional information, comprising
  ## bibliographic information about a manuscript, its current curatorial status, and
  ## any other associated materials. 
  element additional { additional.content, additional.attributes }
additional.content = adminInfo?, surrogates?, listBibl?
additional.attributes = att.global.attributes, empty

additions =
  ## contains a description of any significant additions found
  ## within a manuscript, such as marginalia or other annotations. 
  element additions { additions.content, additions.attributes }
additions.content = macro.specialPara
additions.attributes = att.global.attributes, empty

adminInfo =
  ## (administrative information) contains information about the present
  ## custody and availability of the manuscript, and also about the record
  ## description itself. 
  element adminInfo { adminInfo.content, adminInfo.attributes }
adminInfo.content =
  recordHist?, availability?, custodialHist?, model.noteLike?
adminInfo.attributes = att.global.attributes, empty

altIdentifier =
  ## (alternative identifier) contains an alternative or former structured identifier used for
  ## a manuscript, such as a former catalogue number.
  element altIdentifier {
    altIdentifier.content, altIdentifier.attributes
  }
altIdentifier.content =
  country?,
  region?,
  settlement?,
  institution?,
  repository?,
  collection?,
  idno,
  note?
altIdentifier.attributes =
  att.global.attributes, att.typed.attributes, empty

binding =
  ## contains a description of one binding, i.e. type of covering, boards, etc. applied to a manuscript
  element binding { binding.content, binding.attributes }
binding.content = (model.pLike | decoNote)+
binding.attributes =
  att.global.attributes,
  att.datable.attributes,
  ## specifies whether or not the binding is contemporary with the majority of its contents
  attribute contemporary { data.xTruthValue }?,
  empty

bindingDesc =
  ## describes the present and former bindings of a manuscript, either
  ## as a series of paragraphs or as a series of distinct binding elements,
  ## one for each binding of the manuscript. 
  element bindingDesc { bindingDesc.content, bindingDesc.attributes }
bindingDesc.content = (model.pLike | decoNote)+ | binding+
bindingDesc.attributes = att.global.attributes, empty

catchwords =
  ## describes the system used to ensure
  ## correct ordering of the quires making up a codex or incunable,
  ## typically by means of annotations at the foot of the page.
  element catchwords { catchwords.content, catchwords.attributes }
catchwords.content = macro.phraseSeq
catchwords.attributes = att.global.attributes, empty
model.pPart.msdesc |= catchwords

collation =
  ## contains a description of how the leaves or bifolia are physically
  ## arranged.
  element collation { collation.content, collation.attributes }
collation.content = macro.specialPara
collation.attributes = att.global.attributes, empty

collection =
  ## contains the name of a collection of
  ## manuscripts, not necessarily located within a single repository. 
  element collection { collection.content, collection.attributes }
collection.content = macro.xtext
collection.attributes =
  att.global.attributes, att.naming.attributes, empty

colophon =
  ## contains the  colophon
  ## of a  manuscript item: that is, a statement providing information regarding the date, place, agency, or reason for production of the manuscript.
  element colophon { colophon.content, colophon.attributes }
colophon.content = macro.phraseSeq
colophon.attributes = att.global.attributes, empty
model.msItemPart |= colophon

condition =
  ## contains a description of the physical
  ## condition of the manuscript. 
  element condition { condition.content, condition.attributes }
condition.content = macro.specialPara
condition.attributes = att.global.attributes, empty

custEvent =
  ## describes a single event during the custodial history of a manuscript.
  element custEvent { custEvent.content, custEvent.attributes }
custEvent.content = macro.specialPara
custEvent.attributes =
  att.global.attributes,
  att.datable.attributes,
  att.typed.attributes,
  empty

custodialHist =
  ## contains a description of a manuscript's custodial history, either
  ## as running prose or as a series of dated custodial events. 
  element custodialHist {
    custodialHist.content, custodialHist.attributes
  }
custodialHist.content = model.pLike+ | custEvent+
custodialHist.attributes = att.global.attributes, empty

decoDesc =
  ## contains a description of the decoration of a manuscript, either as a sequence of paragraphs, or as a sequence of topically organised decoNote elements.
  element decoDesc { decoDesc.content, decoDesc.attributes }
decoDesc.content = model.pLike+ | decoNote+
decoDesc.attributes = att.global.attributes, empty

decoNote =
  ## contains a note describing either a
  ## decorative component of a manuscript, or a fairly homogenous class of
  ## such components.
  element decoNote { decoNote.content, decoNote.attributes }
decoNote.content = macro.specialPara
decoNote.attributes = att.global.attributes, att.typed.attributes, empty
model.msItemPart |= decoNote

depth =
  ## contains a measurement measured across the spine. 
  element depth { depth.content, depth.attributes }
depth.content = macro.xtext
depth.attributes = att.global.attributes, att.measured.attributes, empty

dimensions =
  ## contains any kind of dimensional specification. 
  element dimensions { dimensions.content, dimensions.attributes }
dimensions.content = (height?, width?, depth?)+
dimensions.attributes =
  att.global.attributes,
  att.measured.attributes,
  ## indicates which aspect of the object is being measured. 
  attribute type { data.enumerated }?,
  empty
model.pPart.msdesc |= dimensions

explicit =
  ## contains the  explicit of a
  ## manuscript item, that is, the closing words of the text proper,
  ## exclusive of any rubric or colophon which might follow it.
  element explicit { explicit.content, explicit.attributes }
explicit.content = macro.phraseSeq
explicit.attributes =
  att.global.attributes,
  att.typed.attributes,
  ## indicates whether the explicit as given is defective, i.e. the final words of the text as preserved, as opposed to what the closing words would have been had the text of the work been whole.
  attribute defective { data.xTruthValue }?,
  empty
model.msItemPart |= explicit

filiation =
  ## contains information concerning the manuscript's filiation, i.e. its relationship to other surviving manuscripts of the same text, its protographs, antigraphs and apographs.
  element filiation { filiation.content, filiation.attributes }
filiation.content = macro.specialPara
filiation.attributes =
  att.global.attributes, att.typed.attributes, empty
model.msItemPart |= filiation

finalRubric =
  ## contains the string of words that denotes the end of a text division, often with an assertion as to its author and title, usually set off from the text itself by red ink, by a different size or type of script, or by some other such visual device.
  element finalRubric { finalRubric.content, finalRubric.attributes }
finalRubric.content = macro.phraseSeq
finalRubric.attributes =
  att.global.attributes, att.typed.attributes, empty
model.msItemPart |= finalRubric

foliation =
  ## describes the numbering system or systems used to 
  ## count the leaves or pages in a codex.
  element foliation { foliation.content, foliation.attributes }
foliation.content = macro.specialPara
foliation.attributes = att.global.attributes, empty

handDesc =
  ## contains a description of all the different kinds of writing  used in a manuscript.
  element handDesc { handDesc.content, handDesc.attributes }
handDesc.content = (handNote | model.pLike)+
handDesc.attributes =
  att.global.attributes,
  ## specifies the number of distinct hands identified within the manuscript
  attribute hands { data.count }?,
  empty

handNote =
  ## (note on hand) describes a particular style
  ## or hand distinguished within a manuscript.
  element handNote { handNote.content, handNote.attributes }
handNote.content = macro.specialPara
handNote.attributes =
  att.global.attributes,
  ## gives a standard name or other identifier for the scribe
  ## believed to be responsible for this hand.
  attribute scribe { data.name }?,
  ## characterizes the particular script or writing style used by
  ## this hand, for example secretary, copperplate, Chancery, Italian, etc..
  attribute script { data.names }?,
  ## describes the tint or type of ink, e.g. brown, or other
  ## writing medium, e.g. pencil,
  attribute medium { data.words }?,
  ## specifies how widely this  hand is used in the manuscript.
  attribute scope {
    ## (only this hand is used throughout the manuscript) 
    "sole" | ## (this hand is used through most of the manuscript) 
      "major" | ## (this hand is used occasionally in the manuscript) 
      "minor"
  }?,
  empty

height =
  ## contains a measurement measured along the axis parallel to the spine. 
  element height { height.content, height.attributes }
height.content = macro.xtext
height.attributes =
  att.global.attributes, att.measured.attributes, empty

heraldry =
  ## contains a heraldic formula
  ## or phrase, typically found as part of a blazon, coat of arms, etc. 
  element heraldry { heraldry.content, heraldry.attributes }
heraldry.content = macro.phraseSeq
heraldry.attributes = att.global.attributes, empty
model.pPart.msdesc |= heraldry

history =
  ##  groups elements
  ## describing the full history of a manuscript or manuscript part.
  element history { history.content, history.attributes }
history.content = model.pLike+ | (origin?, provenance*, acquisition?)
history.attributes = att.global.attributes, empty

incipit =
  ## contains the incipit of a manuscript item, that is the opening words of the text proper, exclusive of any rubric which might precede it, of sufficient length to identify the work uniquely; such incipts were, in fomer times, frequently used a means of reference to a work, in place of a title.
  element incipit { incipit.content, incipit.attributes }
incipit.content = macro.phraseSeq
incipit.attributes =
  att.global.attributes,
  att.typed.attributes,
  ## indicates whether the incipit as given is defective, i.e. the first words of the text as preserved, as opposed to the first words of the work itself.
  attribute defective { data.xTruthValue }?,
  empty
model.msItemPart |= incipit

institution =
  ## contains the name of an
  ## organization, such as a university or library, within which a
  ## manuscript repository is located.
  element institution { institution.content, institution.attributes }
institution.content = macro.xtext
institution.attributes =
  att.global.attributes, att.naming.attributes, empty

layout =
  ## describes how text is laid out on the page,
  ## including information about any ruling, pricking, or other evidence of
  ## page-preparation techniques.
  element layout { layout.content, layout.attributes }
layout.content = macro.specialPara
layout.attributes =
  att.global.attributes,
  ## specifies the number of columns per page
  attribute columns { data.count }?,
  ## specifies the number of ruled lines per column
  attribute ruledLines {
    data.count
    | list { data.count, data.count }
  }?,
  ## specifies the number of written lines per colum
  attribute writtenLines { data.count }?,
  empty

layoutDesc =
  ## collects the set of layout descriptions applicable to a manuscript.
  element layoutDesc { layoutDesc.content, layoutDesc.attributes }
layoutDesc.content = model.pLike+ | layout+
layoutDesc.attributes = att.global.attributes, empty

locus =
  ## defines a location  within a manuscript or manuscript part, usually as a (possibly discontinuous) sequence of folio references. 
  element locus { locus.content, locus.attributes }
locus.content = macro.xtext
locus.attributes =
  att.global.attributes,
  ## identifies the foliation scheme in terms of which the location is being specified.
  attribute scheme { data.enumerated }?,
  ## specifies the starting point of the location in a normalized form.
  attribute from { data.word }?,
  ## specifies the end-point of the location in a normalized form.
  attribute to { data.word }?,
  ## supplies a link to one or more page images or
  ##	transcriptions of the specified range of folios.
  attribute targets { data.pointers }?,
  empty
model.pPart.msdesc |= locus

material =
  ## contains a word or phrase describing the
  ##   material of which  a manuscript (or part of a manuscript) is composed.
  element material { material.content, material.attributes }
material.content = macro.phraseSeq
material.attributes = att.global.attributes, empty
model.pPart.msdesc |= material

msContents =
  ## describes the intellectual content of a
  ## manuscript or manuscript part, either as a series of paragraphs or as a
  ## series of structured manuscript items.
  element msContents { msContents.content, msContents.attributes }
msContents.content =
  model.pLike+
  | (summary?, textLang?, (msItem | msItemStruct)+)
msContents.attributes =
  att.global.attributes,
  ## identifies the text types or classifications applicable
  ##	to this object.
  attribute class { data.code }?,
  ## indicates whether the object described is defective,
  ##	i.e. incomplete through loss or damage.
  attribute defective { data.xTruthValue }?,
  empty

msDescription =
  ## contains a description of a single identifiable
  ## manuscript.
  element msDescription {
    msDescription.content, msDescription.attributes
  }
msDescription.content =
  msIdentifier,
  head*,
  (model.pLike+
   | (msContents?, physDesc?, history?, additional?, msPart*))
msDescription.attributes = att.global.attributes, empty
model.biblLike |= msDescription

msIdentifier =
  ## contains the information required to identify
  ## the  manuscript being described. 
  element msIdentifier { msIdentifier.content, msIdentifier.attributes }
msIdentifier.content =
  ((country?,
    region?,
    settlement,
    institution?,
    repository,
    collection?,
    idno?)
   | msName),
  (altIdentifier | msName)*
msIdentifier.attributes = att.global.attributes, empty
model.biblPart |= msIdentifier

msItem =
  ## describes an individual work or item within the intellectual 
  ## content of a manuscript or manuscript part. 
  element msItem { msItem.content, msItem.attributes }
msItem.content = locus?, (model.pLike+ | model.msItemPart+)
msItem.attributes =
  att.global.attributes,
  ## identifies the text types or classifications applicable to this
  ## item
  attribute class { data.code }?,
  ## indicates whether the item being described 
  ## is defective, i.e. incomplete through loss or damage.
  [ a:defaultValue = "false" ]
  attribute defective { data.xTruthValue }?,
  empty
model.msItemPart |= msItem

msItemStruct =
  ## contains a structured description for an individual work or item within the intellectual content of a manuscript or manuscript part. 
  element msItemStruct { msItemStruct.content, msItemStruct.attributes }
msItemStruct.content =
  locus?,
  (model.pLike+
   | (author*,
      respStmt*,
      title*,
      rubric?,
      incipit?,
      msItemStruct*,
      explicit?,
      finalRubric?,
      colophon*,
      decoNote*,
      listBibl*,
      bibl*,
      filiation*,
      model.noteLike*,
      textLang?))
msItemStruct.attributes =
  att.global.attributes,
  ## identifies the text types or classifications applicable to this
  ## item
  attribute class { data.code }?,
  ## indicates whether the item being described 
  ## is defective, i.e. incomplete through loss or damage.
  [ a:defaultValue = "false" ]
  attribute defective { data.xTruthValue }?,
  empty
model.msItemPart |= msItemStruct

msName =
  ## (alternative name) contains any form of unstructured alternative
  ## name used for a manuscript, such as an  ocellus
  ## nominum, or nickname. 
  element msName { msName.content, msName.attributes }
msName.content = macro.xtext
msName.attributes = att.global.attributes, att.typed.attributes, empty

msPart =
  ## contains information about an originally
  ## distinct manuscript or part of a manuscript, now forming part of a composite manuscript.
  element msPart { msPart.content, msPart.attributes }
msPart.content =
  altIdentifier,
  head*,
  (model.pLike+
   | (msContents?, physDesc?, history?, additional?, msPart*))
msPart.attributes = att.global.attributes, empty

musicNotation =
  ## contains description of type of musical notation.
  element musicNotation {
    musicNotation.content, musicNotation.attributes
  }
musicNotation.content = macro.specialPara
musicNotation.attributes = att.global.attributes, empty

objectDesc =
  ## contains a description of the physical
  ##   components making up the object which is being described.
  element objectDesc { objectDesc.content, objectDesc.attributes }
objectDesc.content = model.pLike+ | (supportDesc?, layoutDesc?)
objectDesc.attributes =
  att.global.attributes,
  ## a short  project-specific name identifying the physical form of
  ##       the carrier, for example as a codex, roll, fragment, partial leaf,
  ##       cutting etc.
  attribute form { data.enumerated }?,
  empty

origDate =
  ## contains any form of date, used to
  ##   identify the date of origin for a manuscript or manuscript part.
  element origDate { origDate.content, origDate.attributes }
origDate.content = text
origDate.attributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  empty
model.pPart.msdesc |= origDate

origPlace =
  ## contains any form of place name, used to identify the
  ## place of origin for a manuscript or manuscript part. 
  element origPlace { origPlace.content, origPlace.attributes }
origPlace.content = macro.xtext
origPlace.attributes =
  att.global.attributes, att.editLike.attributes, empty
model.pPart.msdesc |= origPlace

origin =
  ## contains any descriptive or other information
  ## concerning the origin of  a manuscript or manuscript part. 
  element origin { origin.content, origin.attributes }
origin.content = macro.specialPara
origin.attributes =
  att.global.attributes,
  att.editLike.attributes,
  att.datable.attributes,
  empty

physDesc =
  ## contains a full physical description of a
  ## manuscript or manuscript part, optionally subdivided using more
  ## specialised elements.
  element physDesc { physDesc.content, physDesc.attributes }
physDesc.content =
  model.pLike+
  | (objectDesc?,
     handDesc?,
     musicNotation?,
     decoDesc?,
     additions?,
     bindingDesc?,
     sealDesc?,
     accMat?)
physDesc.attributes = att.global.attributes, empty

provenance =
  ## contains any descriptive or other information
  ## concerning a single identifiable episode during the history of a manuscript
  ## or manuscript part, after its creation but before its acquisition. 
  element provenance { provenance.content, provenance.attributes }
provenance.content = macro.specialPara
provenance.attributes =
  att.global.attributes, att.datable.attributes, empty

recordHist =
  ## provides information about the source and
  ## revision status of the parent manuscript description itself. 
  element recordHist { recordHist.content, recordHist.attributes }
recordHist.content = model.pLike+ | (source, change*)
recordHist.attributes = att.global.attributes, empty

repository =
  ## contains the name of a repository within which manuscripts are stored, possibly forming part of an institution.
  element repository { repository.content, repository.attributes }
repository.content = macro.xtext
repository.attributes =
  att.global.attributes, att.naming.attributes, empty

rubric =
  ## contains the text of any rubric or heading attached to a particular manuscript item, that is, a string of words through which a
  ## manuscript signals the beginning of a text division, often with an assertion as to its author and title, which is in some way set off from the text itself, usually in red ink, or by use of different size or type of script, or some other such visual device.
  element rubric { rubric.content, rubric.attributes }
rubric.content = macro.phraseSeq
rubric.attributes = att.global.attributes, att.typed.attributes, empty
model.msItemPart |= rubric

seal =
  ## contains a description of one seal or similar
  ##   attachment applied to a manuscript
  element seal { seal.content, seal.attributes }
seal.content = (model.pLike | decoNote)+
seal.attributes =
  att.global.attributes,
  att.typed.attributes,
  att.datable.attributes,
  ## specifies whether or not the seal is contemporary with the
  ##       item to which it is affixed
  attribute contemporary { data.xTruthValue }?,
  empty

sealDesc =
  ## describes the seals or other external items attached to a manuscript, either
  ## as a series of paragraphs or as a series of distinct seal elements,
  ## possibly with additional decoNotes. 
  element sealDesc { sealDesc.content, sealDesc.attributes }
sealDesc.content = model.pLike+ | (decoNote | seal)+
sealDesc.attributes = att.global.attributes, empty

secFol =
  ## The word or words taken from a fixed point
  ## in a codex (typically the beginning of the
  ## second leaf) in order
  ## to provide a unique identifier for it.
  element secFol { secFol.content, secFol.attributes }
secFol.content = macro.phraseSeq
secFol.attributes = att.global.attributes, empty
model.pPart.msdesc |= secFol

signatures =
  ## contains discussion of the leaf or quire signatures found within a codex.
  element signatures { signatures.content, signatures.attributes }
signatures.content = macro.phraseSeq
signatures.attributes = att.global.attributes, empty
model.pPart.msdesc |= signatures

source =
  ## describes the original source for the information contained with a manuscript description. 
  element source { source.content, source.attributes }
source.content = macro.specialPara
source.attributes = att.global.attributes, empty

summary =
  ## contains a brief summary of the
  ## intellectual content of an item, provided by the cataloguer 
  element summary { summary.content, summary.attributes }
summary.content = macro.phraseSeq
summary.attributes = att.global.attributes, empty

support =
  ## contains a description of the materials
  ## etc. which make up the physical support for the written part of a manuscript.
  element support { support.content, support.attributes }
support.content = macro.specialPara
support.attributes = att.global.attributes, empty

supportDesc =
  ## groups elements describing the physical support for the written part of a manuscript.
  element supportDesc { supportDesc.content, supportDesc.attributes }
supportDesc.content =
  model.pLike+ | (support?, extent?, foliation?, collation?, condition?)
supportDesc.attributes =
  att.global.attributes,
  ## a short project-defined name for the material composing
  ##       the majority of the support
  attribute material { data.enumerated }?,
  empty

surrogates =
  ## contains information about any digital or
  ## photographic representations of the manuscript being described which
  ## may exist in the holding institution or elsewhere. 
  element surrogates { surrogates.content, surrogates.attributes }
surrogates.content = macro.specialPara
surrogates.attributes = att.global.attributes, empty

textLang =
  ## describes the languages and writing systems used by a
  ## manuscript (as opposed to its description, which is described in the langUsage element)
  element textLang { textLang.content, textLang.attributes }
textLang.content = macro.phraseSeq
textLang.attributes =
  att.global.attributes,
  ## supplies a code which identifies the chief language used in the manuscript.
  attribute mainLang { data.language }?,
  ## one or more codes identifying any other languages used in the manuscript.
  attribute otherLangs {
    list { data.language* }
  }?,
  empty
model.msItemPart |= textLang

watermark =
  ## contains a word or phrase describing a
  ## watermark or similar device.
  element watermark { watermark.content, watermark.attributes }
watermark.content = macro.phraseSeq
watermark.attributes = att.global.attributes, empty
model.pPart.msdesc |= watermark

width =
  ## contains a measurement measured along the axis perpendicular to the spine. 
  element width { width.content, width.attributes }
width.content = macro.xtext
width.attributes = att.global.attributes, att.measured.attributes, empty
# 3. macros
