Skip to content
Permalink
968822242a
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
806 lines (738 sloc) 19.5 KB
default namespace = "http://www.tei-c.org/ns/1.0"
# cloned from https://github.molgen.mpg.de/sgfroerer/eoa-django/blob/add_chapter_frontpages/eoa/publications/management/commands/res/eoa_tei_schema.rnc
# things still unclear
# question: what editor roles are optional, which are required?
start =
element TEI {
attribute change { text }?,
tei_header,
element facsimile {
facsimile_image+
}?,
element text {
attribute xml:id { "text" }?,
element front { frontmatter },
element body { (chapter?, part*) | chapter* | indexchapter* },
element back { backmatter }?
}
}
###################################
# basic document structure
###################################
tei_header =
element teiHeader {
element fileDesc {
element titleStmt {
title,
author-or-volumeeditor,
editors,
element sponsor {
attribute ref { xsd:anyURI }?,
text
}*,
element funder {
attribute ref { xsd:anyURI }?,
text
}*,
element respStmt {
attribute xml:id { xsd:NCName },
element resp { text }?,
( organization | person )
}+
},
element editionStmt {
element edition { text }
},
element extent {
element measure {
attribute commodity { "pages" },
attribute quantity { xsd:integer }
},
element measure {
attribute type { "price" },
attribute unit { "EUR" },
attribute quantity { xsd:decimal }
}?
},
element publicationStmt {
element publisher {
element orgName {
attribute n { "EOA" | "Press" },
attribute ref { xsd:anyURI },
element choice {
element expan { text },
element abbr { text }
}?,
text?
}+
},
element idno {
attribute type { "isbn"|"isbnpdf"|"isbnepub"|"doi"|"shoplink" },
text
}*,
element date {
attribute when { xsd:date }
},
element distributor {
organization
}?,
element availability {
element licence {
attribute target { xsd:anyURI },
text
}
}?
},
element seriesStmt {
element title { ("Sources"|"Studies"|"Proceedings"|"Textbooks") },
element respStmt {
element resp {
text },
element name {
attribute type { "serieseditors" },
text
}
},
element idno {
attribute type { "number" }, xsd:integer
}
},
element sourceDesc {
p+,
element ab {
attribute type { "suggestedcitation" },
text },
element ab {
attribute type { "bibdatabase" },
element ref {
attribute target { xsd:anyURI },
attribute type { "anthology" | "monograph" }
}
}
}
},
element profileDesc {
element abstract {
attribute n { "brief" },
p+ },
element abstract {
attribute n { "detailed" },
p+ },
element abstract {
attribute n { "additional" },
p+ }?,
element textClass {
element keywords {
element list {
element item { text }+
}
}
},
element langUsage {
element language {
attribute ident { "de" | "en" | "fr" | "it" }
}
}
},
element encodingDesc {
element projectDesc {
element p {
attribute n { "eoainfo" | ("mprlinformation" | "eosinformation" ) | "scientificboard" | "eoadevteam" },
( text | hi )+
}+
},
element appInfo {
element application {
attribute when { xsd:date }?,
attribute xml:id { xsd:NCName },
attribute ident { xsd:NCName },
attribute version { text },
element label { text }
}*
}
},
element revisionDesc {
element change {
attribute when { xsd:date },
attribute who { text },
text
}+
}?
}
person =
element persName {
attribute xml:lang { xsd:NCName }?,
attribute ref { xsd:anyURI }?,
element surname { text },
element forename { text },
element email { text }?,
element affiliation {
element roleName { text },
element orgName { text }*
}*
}
organization =
element orgName {
attribute ref { xsd:anyURI }?,
text
}
title =
element title {
attribute level { "m" },
attribute type { "main" },
text
},
element title {
attribute level { "m" },
attribute type { "sub" },
text
}?
author-or-volumeeditor =
element author {
attribute key { xsd:NCName },
attribute n { xsd:integer},
attribute ref { xsd:anyURI },
text
}+ |
element editor {
attribute role { "volumeeditor" },
attribute key { xsd:NCName },
attribute n { xsd:integer},
attribute ref { xsd:anyURI },
text
}+
editors =
element editor {
attribute role { "submitter"|"editorialcoordinator"|"copyeditor"|"translator"|"publicationmanager"|"publicationassistant"|"imageprocessor" },
attribute ref { xsd:anyURI },
text
}*
frontmatter =
element figure {
attribute type { "cover" },
graphic,
head?
},
element div {
attribute type { "dedication" },
ab+
}?
backmatter =
element div {
attribute type { "chapter" },
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# attribute n { "nonumber" }?,
# attribute xml:id { xsd:NCName },
head
}+
p_as_pointer =
element p {
attribute copyOf { text }
}
part =
element div {
attribute type { "part" },
attribute n { xsd:integer },
attribute xml:id { xsd:NCName },
head,
( chapter | sourcesfeatures | indexchapter )*
}
chapter =
element div {
attribute type { "chapter" },
# should non-numbered elements be allowed to carry an id?
# either:
attribute n { xsd:integer | "nonumber" },
attribute xml:id { xsd:NCName },
# or:
# (( attribute xml:id { xsd:NCName },
# attribute n { xsd:integer }?)|
# attribute n { "nonumber" } ),
attribute xml:lang { xsd:string {pattern = "[a-z]{2}" } }?,
attribute resp { text }?,
head-ex-abbr,
element epigraph { p+ }?,
authorbio?,
chapterabstract?,
( eoaelement | section | sourcesfeatures)*,
# TODO: make this non optional:
chapter_bibfile_ref?
}
section =
element div {
attribute type { "section" },
# (( attribute xml:id { xsd:NCName },
# attribute n { xsd:integer }?)|
# attribute n { "nonumber" } ),
attribute n { xsd:integer | "nonumber" },
attribute xml:id { xsd:NCName },
head,
( eoaelement | subsection | sourcesfeatures)*
}
subsection =
element div {
attribute type { "subsection" },
# (( attribute xml:id { xsd:NCName },
# attribute n { xsd:integer }?)|
# attribute n { "nonumber" } ),
attribute n { xsd:integer | "nonumber" },
attribute xml:id { xsd:NCName },
head,
(eoaelement|subsubsection)*
}
subsubsection =
element div {
attribute type { "subsubsection" },
# (( attribute xml:id { xsd:NCName },
# attribute n { xsd:integer }?)|
# attribute n { "nonumber" } ),
attribute n { xsd:integer | "nonumber" },
attribute xml:id { xsd:NCName },
head,
eoaelement*
}
head = element head { (text | markup | inline_formula | index | indexanchor | ref | foreign )+ }
floathead =
element head {
(text | bibref | markup | foreign | inline_formula | index | indexanchor | ref )+ }
head-ex-abbr = element head { (
element choice {
element expan {
(text | markup | foreign | inline_formula | index | indexanchor | ref )+ },
element abbr {
(text | markup | foreign | inline_formula | index | indexanchor | ref )+ }
}
) |
(text | markup | foreign | inline_formula | index | indexanchor )+
}
###################################
# referencable eoa elements:
###################################
spanmarkup =
(text
| inline_formula
| graphic
| foreign
| hi
| index
| indexanchor
| ref
| bibref
| footnote)*
eoaelement =
p
| figure
| formulablock
| formulasub
| formulaarray
| \list
| table
| theorem
| theoreminstance
| bilingual
| lg
| quote
lg =
element lg {
attribute type { "verse" },
element l { spanmarkup }+
}
\list =
element list {
attribute type { "ordered" | "unordered" | "gloss" },
(element item { spanmarkup }
| element label { spanmarkup })+
}
table =
element table {
# attribute n { xsd:integer },
attribute rows { xsd:integer },
attribute cols { xsd:integer },
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# ( attribute xml:id { xsd:NCName }
# | attribute n { "nonumber" }),
attribute rend { "blank" }?,
floathead?,
element row {
attribute role { "label" },
element cell {
attribute role { "label" },
(text | markup | index | indexanchor | linebreak )*
}+
}?,
element row {
attribute role { "data" },
element cell {
attribute role { "data" },
(text | markup | index | indexanchor | linebreak )*
}+
}*
}
ab =
element ab {
text
}
authorbio =
element ab {
attribute type {"authorbio"},
(text | markup | foreign | ref | bibref)*
}
chapterabstract =
element ab {
attribute type {"chapterabstract"},
(text | markup | foreign | ref | bibref)*
}
quote =
element quote {
(text
| inline_formula
| graphic
| hi
| index
| indexanchor
| foreign
| ref
| bibref
| footnote)*
}
p =
element p {
attribute n { xsd:NMTOKEN }?,
attribute xml:id { xsd:NCName }?,
attribute corresp { xsd:anyURI}?,
(text
| inline_formula
| graphic
| hi
| index
| indexanchor
| foreign
| ref
| bibref
| footnote)*
}
figure =
element figure {
(
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# attribute n { xsd:integer | "nonumber" }?,
# attribute xml:id { xsd:NCName }?,
attribute rend { "landscape" }?,
attribute type { xsd:NCName }?,
graphic,
floathead?
) |
(
attribute type { "hionly" },
attribute xml:id { xsd:NCName }
)
}
formulablock =
element ab {
attribute type { "equation" },
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
element formula {
attribute notation { "tex" | "mhchem" },
text
}
}
formulasub =
element ab {
attribute type { "subequations" },
attribute xml:id { text }?,
element formula {
attribute notation { "tex" | "mhchem" },
text
}+
}
formulaarray =
element ab {
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# attribute xml:id { text }?,
# attribute n { xsd:integer | "nonumber" }?,
attribute type { "equationarray" },
element formula {
attribute notation { "tex" | "mhchem" },
text
}+
}
###################################
# non referencable stuff:
###################################
# facsimilepart =
# element div {
# attribute type { "facsimilepart" },
# head,
# element figure {
# attribute xml:id { text },
# attribute corresp { text }?,
# element graphic {
# attribute url { xsd:anyURI },
# head
# }
# }+
# }
foreign =
element foreign {
attribute xml:lang { xsd:string {pattern = "[a-z]{2}" } },
spanmarkup
}
graphic =
element graphic {
attribute url { xsd:anyURI },
( attribute height { text } |
attribute scale { xsd:integer } )?
}
bibref =
element bibl {
element ref {
attribute type { "year" | "authoryear"},
attribute target { xsd:string {pattern = "#[A-Za-z0-9\-_:\./]+" }}
# attribute target { xsd:anyURI }
# text
},
element citedRange {
(
attribute from { xsd:string {pattern = "(\p{L}|\p{N}|\p{P}|\p{S}|-|–)+\.?" }},
attribute to { xsd:string {pattern = "(\p{L}|\p{N}|\p{P}|\p{S})+" }}?) |
( text | markup | foreign )+
# ( attribute from { xsd:integer | "viii" },
# attribute to { xsd:integer }?)
}?
}
footnote =
element note {
# if type attribute is given, there can be two apparati
# this is a per-chapter feature and needs to be regulated
# in some way
attribute xml:id { xsd:NCName },
attribute place { "bottom" },
(( attribute n { xsd:integer }?)
|(
(attribute type { "alph" },
attribute n { xsd:string {pattern = "[a-z]+" }} )?|
(attribute type { "arabic" },
attribute n { xsd:integer })?
)),
p+
}
linebreak =
element lb {empty}
markup =
hi
hi =
element hi {
attribute rend { "italic" | "superscript" | "subscript" | "math" | "bold" | "struck" | "spaced" | "smallcaps" },
( text | index | indexanchor | ref )+
}
theorem =
element ab {
attribute type { "theoremdeclaration" },
attribute xml:id { xsd:NCName },
text
}
theoreminstance =
element ab {
attribute type { "theoreminstance" },
attribute corresp { xsd:anyURI},
spanmarkup
}
## References that are either a URL or references to numbered sections
## or floats or pages (although being discouraged). @type values
## containing 'hi' are used for the hyperimage system
ref =
element ref {
attribute target { xsd:anyURI },
( (attribute type { "url" },
element date {
attribute when { xsd:date }}?, text?
)
|
(attribute type {"text-hi" | "number-hionly" | "number-hi" },
attribute select { xsd:NCName }?)
|
(attribute type { "hionlycollage" },
(
element ref {
attribute target { xsd:anyURI },
attribute type { "number" | "number-hionly" | "number-hi" }
} |
text)+
)
|
attribute type { "number" | "page" }
),
text
}
index =
element index {
(attribute indexName { "keyword" | "location" | "person" })?,
attribute spanTo { xsd:anyURI }?,
element term {
attribute sortKey { xsd:NCName }?,
spanmarkup
}
# , text
,
# optional sub index-entries:
(element index {
element term { spanmarkup }
#, text
})*
}
indexanchor =
element anchor {
attribute xml:id { xsd:NCName }
}
indexchapter =
element div {
attribute type { "indexchapter"},
attribute xml:id { xsd:NCName },
attribute n { "nonumber" },
head,
p
}
inline_formula =
element formula {
attribute rend { "inline" },
attribute notation { "tex" | "mhchem" },
text
}
chapter_bibfile_ref =
element div {
attribute type { "bibliography" },
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# attribute n { xsd:integer },
# attribute xml:id { xsd:NCName },
element ptr {
attribute target { xsd:NCName }
}
}
fullbibref =
element div {
attribute type { "bibliography" },
(( attribute xml:id { xsd:NCName },
attribute n { xsd:integer }?)|
attribute n { "nonumber" } ),
# attribute n { xsd:integer },
element ptr {
attribute target { xsd:NCName }
}
}
facsimile_image =
element surface {
attribute xml:id { xsd:NCName },
attribute corresp { xsd:anyURI }?,
graphic,
element label { text }
}
sourcesfeatures =
(
bilingualchapter |
bilingual |
facsimilepages |
sidebyside |
letter
)
bilingualchapter =
element div {
attribute type { "chapteroriginal"|"chaptertranslation" },
attribute n { xsd:integer | "nonumber" },
attribute corresp { xsd:anyURI },
attribute xml:id { xsd:NCName },
attribute xml:lang { xsd:string {pattern = "[a-z]{2}" } }?,
attribute resp { text }?,
head-ex-abbr,
element epigraph { p+ }?,
( eoaelement | section | sourcesfeatures)*,
# TODO: make this non optional:
chapter_bibfile_ref?
}
bilingual =
element div {
attribute type { "bilingual" },
element div {
attribute corresp { text },
attribute type { "original" },
attribute xml:lang { xsd:string {pattern = "[a-z]{2}" }},
attribute xml:id { text },
head?,
eoaelement*
},
element div {
attribute corresp { text },
attribute type { "translation" },
attribute xml:lang { xsd:string {pattern = "[a-z]{2}" }},
attribute xml:id { text },
head?,
eoaelement*
}
}
facsimile_part =
element facsimile {
facsimile_image+
}
facsimilereference =
element pb {
attribute facs { xsd:anyURI }
}
sidebyside =
element div {
attribute type { "sidebyside" },
facsimilereference,
element div {
attribute xml:id { xsd:NCName },
element label { text },
( head | p )+
}
}
letter =
element div {
attribute type { "letter" },
attribute xml:id { xsd:NCName },
head,
element opener {
element measure {
attribute commodity { "pages" },
attribute quantity { xsd:integer }
},
element idno {
attribute type { "callnumber" },
text
},
element note {
attribute type { "writingstyle" },
text
},
element date {
(
attribute when { xsd:date } |
attribute notBefore { xsd:date } |
attribute notAfter { xsd:date }
),
text
},
element name {
attribute type { "place" },
text
}?
},
p+
}
facsimilepages =
element div {
attribute type { "facsimilepages" },
facsimilereference+
}