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

# Schema generated 2008-11-01T14:14:38Z
# Edition: 1.2.0. Last updated on October 31st 2008.
# Copyright 2008 TEI Consortium.
# This is free software; you can redistribute it and/or
#	    modify it under the terms of the GNU General Public
#	    License as published by the Free Software Foundation;
#	    either version 2 of the License, or (at your option) any
#	    later version.
# This material is distributed in the hope that it will be
#	    useful, but without any warranty; without even the implied
#	    warranty of merchantability or 
#	    fitness for a particular
#	    purpose. See the GNU General Public License for more
#	    details.
# A copy of the GNU General Public
#	    License is stored on the TEI web site
#	    along with this file; you can also contact the Free
#	    Software Foundation, Inc., 59 Temple Place, Suite 330,
#	    Boston, MA 02111-1307, USA, for a copy.
# For information about the TEI, including contact
#		details, consult the TEI web
#	      site at http://www.tei-c.org/. 
#		Manuscript Description

# Definitions from module msdescription

# Set global predeclared macros

# Set predeclared macros

# 0. predeclared macros

# 1. classes
att.msExcerpt.attributes = att.msExcerpt.attribute.defective, empty
att.msExcerpt.attribute.defective =
  ## indicates whether the passage being quoted is defective,
  ##       i.e. incomplete through loss or damage.
  [ a:defaultValue = "false" ] attribute defective { data.xTruthValue }?
# 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.localattributes }
accMat.content = macro.specialPara
accMat.localattributes =
  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.localattributes
  }
acquisition.content = macro.specialPara
acquisition.localattributes =
  att.global.attributes, att.datable.attributes, empty

additional =
  ## groups additional information, combining
  ## bibliographic information about a manuscript, or surrogate copies of
  ## it with  curatorial or administrative information. 
  element additional { additional.content, additional.localattributes }
additional.content = adminInfo?, surrogates?, listBibl?
additional.localattributes = 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.localattributes }
additions.content = macro.specialPara
additions.localattributes = 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.localattributes }
adminInfo.content =
  recordHist?, availability?, custodialHist?, model.noteLike?
adminInfo.localattributes = 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.localattributes
  }
altIdentifier.content =
  model.placeNamePart_sequenceOptional,
  institution?,
  repository?,
  collection?,
  idno,
  note?
altIdentifier.localattributes =
  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.localattributes }
binding.content = (model.pLike | condition | decoNote)+
binding.localattributes =
  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 =
  ## (binding description) 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.localattributes
  }
bindingDesc.content = (model.pLike | decoNote | condition)+ | binding+
bindingDesc.localattributes = 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.localattributes }
catchwords.content = macro.phraseSeq
catchwords.localattributes = att.global.attributes, empty

collation =
  ## contains a description of how the leaves or bifolia are physically
  ## arranged.
  element collation { collation.content, collation.localattributes }
collation.content = macro.specialPara
collation.localattributes = 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.localattributes }
collection.content = macro.xtext
collection.localattributes =
  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.localattributes }
colophon.content = macro.phraseSeq
colophon.localattributes = att.global.attributes, empty

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

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

custodialHist =
  ## (custodial history) 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.localattributes
  }
custodialHist.content = model.pLike+ | custEvent+
custodialHist.localattributes = att.global.attributes, empty

decoDesc =
  ## (decoration description) 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.localattributes }
decoDesc.content = model.pLike+ | decoNote+
decoDesc.localattributes = att.global.attributes, empty

decoNote =
  ## (note on decoration) contains a note describing either a
  ## decorative component of a manuscript, or a fairly homogenous class of
  ## such components.
  element decoNote { decoNote.content, decoNote.localattributes }
decoNote.content = macro.specialPara
decoNote.localattributes =
  att.global.attributes, att.typed.attributes, empty

depth =
  ## specifies a length measured across the spine. 
  element depth { depth.content, depth.localattributes }
depth.content = macro.xtext
depth.localattributes =
  att.global.attributes, att.dimensions.attributes, empty

dimensions =
  ## contains a dimensional specification.
  element dimensions { dimensions.content, dimensions.localattributes }
dimensions.content = height?, width?, depth?
dimensions.localattributes =
  att.global.attributes,
  att.dimensions.attributes,
  ## indicates which aspect of the object is being measured. 
  ## Sample values include: 1] leaves; 2] ruled; 3] pricked; 4] written; 5] miniatures; 6] binding; 7] box
  attribute type { data.enumerated }?,
  empty

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.localattributes }
explicit.content = macro.phraseSeq
explicit.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.msExcerpt.attributes,
  empty

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.localattributes }
filiation.content = macro.specialPara
filiation.localattributes =
  att.global.attributes, att.typed.attributes, empty

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.localattributes
  }
finalRubric.content = macro.phraseSeq
finalRubric.localattributes =
  att.global.attributes, att.typed.attributes, empty

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

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

height =
  ## contains a measurement measured along the axis parallel to the spine. 
  element height { height.content, height.localattributes }
height.content = macro.xtext
height.localattributes =
  att.global.attributes, att.dimensions.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.localattributes }
heraldry.content = macro.phraseSeq
heraldry.localattributes = att.global.attributes, empty

history =
  ##  groups elements
  ## describing the full history of a manuscript or manuscript part.
  element history { history.content, history.localattributes }
history.content =
  model.pLike+ | (summary?, origin?, provenance*, acquisition?)
history.localattributes = 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.localattributes }
incipit.content = macro.phraseSeq
incipit.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.msExcerpt.attributes,
  empty

institution =
  ## contains the name of an organization such as a university or
  ##   library, with which a manuscript is identified, generally its
  ##   holding institution.
  element institution {
    institution.content, institution.localattributes
  }
institution.content = macro.xtext
institution.localattributes =
  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.localattributes }
layout.content = macro.specialPara
layout.localattributes =
  att.global.attributes,
  ## specifies the number of columns per page
  attribute columns {
    list { data.count, data.count? }
  }?,
  ## specifies the number of ruled lines per column
  attribute ruledLines {
    list { data.count, data.count? }
  }?,
  ## specifies the number of written lines per
  ##       colum
  attribute writtenLines {
    list { data.count, data.count? }
  }?,
  empty

layoutDesc =
  ## (layout description) collects the set of layout descriptions applicable to a manuscript.
  element layoutDesc { layoutDesc.content, layoutDesc.localattributes }
layoutDesc.content = model.pLike+ | layout+
layoutDesc.localattributes = 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.localattributes }
locus.content = macro.xtext
locus.localattributes =
  att.global.attributes,
  ## identifies the foliation scheme in terms of which the location is being specified.
  attribute scheme { data.pointer }?,
  ## 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 transcriptions of the
  ##       specified range of folios.
  attribute target {
    list { data.pointer+ }
  }?,
  empty

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

msContents =
  ## (manuscript contents) 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.localattributes }
msContents.content =
  model.pLike+
  | (summary?, textLang?, (msItem | msItemStruct)*)
msContents.localattributes =
  att.global.attributes,
  att.msExcerpt.attributes,
  ## identifies the text types or classifications applicable
  ##	to this object.
  attribute class { data.code }?,
  empty

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

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

msItem =
  ## (manuscript item) describes an individual work or item within the intellectual
  ##   content of a manuscript or manuscript part. 
  element msItem { msItem.content, msItem.localattributes }
msItem.content =
  locus?,
  (model.pLike+
   | (model.titlepagePart | model.msItemPart | model.global)+)
msItem.localattributes =
  att.global.attributes,
  att.msExcerpt.attributes,
  ## identifies the text types or classifications applicable to this
  ## item
  attribute class { data.code }?,
  empty

msItemStruct =
  ## (structured manuscript item) 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.localattributes
  }
msItemStruct.content =
  locus?,
  (model.pLike+
   | (author*,
      respStmt*,
      title*,
      rubric?,
      incipit?,
      msItemStruct*,
      explicit?,
      finalRubric?,
      colophon*,
      decoNote*,
      listBibl*,
      bibl*,
      filiation*,
      model.noteLike*,
      textLang?))
msItemStruct.localattributes =
  att.global.attributes,
  att.msExcerpt.attributes,
  ## identifies the text types or classifications applicable to this
  ## item
  attribute class { data.code }?,
  empty

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.localattributes }
msName.content = macro.xtext
msName.localattributes =
  att.global.attributes, att.typed.attributes, empty

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

musicNotation =
  ## contains description of type of musical notation.
  element musicNotation {
    musicNotation.content, musicNotation.localattributes
  }
musicNotation.content = macro.specialPara
musicNotation.localattributes = 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.localattributes }
objectDesc.content = model.pLike+ | (supportDesc?, layoutDesc?)
objectDesc.localattributes =
  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 =
  ## (origin date) contains any form of date, used to
  ##   identify the date of origin for a manuscript or manuscript part.
  element origDate { origDate.content, origDate.localattributes }
origDate.content = text
origDate.localattributes =
  att.global.attributes,
  att.datable.attributes,
  att.editLike.attributes,
  att.typed.attributes,
  empty

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

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

physDesc =
  ## (physical description) contains a full physical description of a
  ## manuscript or manuscript part, optionally subdivided using more
  ## specialised elements from the model.physDescPart class.
  element physDesc { physDesc.content, physDesc.localattributes }
physDesc.content = model.pLike*, model.physDescPart_sequenceOptional
physDesc.localattributes = 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.localattributes }
provenance.content = macro.specialPara
provenance.localattributes =
  att.global.attributes, att.datable.attributes, empty

recordHist =
  ## (recorded history) provides information about the source and
  ## revision status of the parent manuscript description itself. 
  element recordHist { recordHist.content, recordHist.localattributes }
recordHist.content = model.pLike+ | (source, change*)
recordHist.localattributes = 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.localattributes }
repository.content = macro.xtext
repository.localattributes =
  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.localattributes }
rubric.content = macro.phraseSeq
rubric.localattributes =
  att.global.attributes, att.typed.attributes, empty

seal =
  ## contains a description of one seal or similar
  ##   attachment applied to a manuscript.
  element seal { seal.content, seal.localattributes }
seal.content = (model.pLike | decoNote)+
seal.localattributes =
  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 =
  ## (seal description) 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.localattributes }
sealDesc.content = model.pLike+ | (decoNote | seal | condition)+
sealDesc.localattributes = att.global.attributes, empty

secFol =
  ## (second folio) 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.localattributes }
secFol.content = macro.phraseSeq
secFol.localattributes = att.global.attributes, empty

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

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

stamp =
  ## contains a word or phrase describing a
  ## stamp or similar device.
  element stamp { stamp.content, stamp.localattributes }
stamp.content = macro.phraseSeq
stamp.localattributes =
  att.global.attributes,
  att.typed.attributes,
  att.datable.attributes,
  empty

summary =
  ## contains a brief summary of the
  ## intellectual content of an item, provided by the cataloguer.
  element summary { summary.content, summary.localattributes }
summary.content = macro.phraseSeq
summary.localattributes = 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.localattributes }
support.content = macro.specialPara
support.localattributes = att.global.attributes, empty

supportDesc =
  ## (support description) groups elements describing the physical support for the written part of a manuscript.
  element supportDesc {
    supportDesc.content, supportDesc.localattributes
  }
supportDesc.content =
  model.pLike+ | (support?, extent?, foliation*, collation?, condition?)
supportDesc.localattributes =
  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.localattributes }
surrogates.content = macro.specialPara
surrogates.localattributes = att.global.attributes, empty

textLang =
  ## (text language) 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.localattributes }
textLang.content = macro.phraseSeq
textLang.localattributes =
  att.global.attributes,
  ## (main language) supplies a code which identifies the chief language used
  ##       in the manuscript.
  attribute mainLang { data.language }?,
  ## (other languages) one or more codes identifying any other languages used in
  ##       the manuscript.
  attribute otherLangs {
    list { data.language* }
  }?,
  empty

typeDesc =
  ## contains a description of the typefaces or other aspects of
  ##   the printing of an incunable or other printed source.
  element typeDesc { typeDesc.content, typeDesc.localattributes }
typeDesc.content = model.pLike+ | (summary?, typeNote+)
typeDesc.localattributes = att.global.attributes, empty

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

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