# A schema for bibliographic data. # by Bruce D'Arcus # $Id: biblio.rnc,v 1.16 2004/01/25 15:43:41 darcusb Exp $ default namespace bib = "http://darcusb.muohio.edu/geo/biblio" namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0" namespace dc = "http://purl.org/dc/elements/1.1/" namespace xhtml = "http://www.w3.org/1999/xhtml" ## A Relax NG bibliographic schema. ## By Bruce D'Arcus start = Biblio Biblio = element biblio { Bibentry+ } Bibentry = element item { isCreatedBy, hasTitle, hasOrigin?, isPartOf*, hasLocation*, hasSubject*, hasIdentifier*, hasMedium?, hasGenre*, ID } ID = attribute id { xsd:ID } ## Definitions for the main container modules. isPartOf = element isPartOf { isCreatedBy*, hasTitle*, hasOrigin*, isPartOf*, PartDesc?, attribute type { "single-issue" | "continual-issue" } } ## Titles contain titles and subtitles. Drawn from MODS titleInfo. hasTitle = element hasTitle { attlist.hasTitle, (title | subTitle | titleSort)+ } attlist.hasTitle &= attribute ID { xsd:ID }?, attribute type { "abbreviated" | "translated" | "alternative" | "uniform" }?, attribute href { text }?, attribute role { text }?, attribute xml:lang { text }?, attribute transliteration { text }? title = element titleMain { attlist.title, text } attlist.title &= empty subTitle = element titleSub { attlist.subTitle, text } attlist.subTitle &= empty titleSort = element titleSort { attlist.nonSort, text } attlist.nonSort &= empty ## Person element Person = element person { name*, note*, address? } Organization = element organization { OrgName*, note*, address? } Creator.Role = attribute role { "author" | "editor" | "interviewer" | "interviewee" | "performer" | "recipient" | "artist" | "writer" } ## Creator element isCreatedBy = element isCreatedBy { attlist-creator, ( Person | Organization ) } attlist-creator &= ID?, Creator.Role name = element name { attlist-name, note*, ( givenname | other )*, familyname } attlist-name &= empty givenname = element given { attlist-givenname, text } attlist-givenname &= empty initials = element initials { attlist-initials, text } attlist-initials &= empty familyname = element family { attlist-familyname, text } attlist-familyname &= empty other = element other { attlist-other, text } attlist-other &= empty articular = element articular { attlist-articular, text } attlist-articular &= empty fullname = element fullName { attlist-fullname, text } attlist-fullname &= empty OrgName = element name { attlist-OrgName, (note*, fullname)+ } attlist-OrgName &= empty ## address for names address = element address { attlist-address*, ((email | phone | fax)*, ((streetaddress | postal-code | city | state | country)* | Place))* } attlist-address &= Lang email = element email { xsd:token } phone = element phone { attlist-phone, text } attlist-phone &= empty fax = element fax { attlist-fax, text } attlist-fax &= empty streetaddress = element streetaddress { attlist-streetaddress, text } attlist-streetaddress &= empty postal-code = element postal-code { attlist-postal-code, text } attlist-postal-code &= empty city = element city { attlist-city, text } attlist-city &= empty country = element country { attlist-country, text } attlist-country &= empty Lang = attribute xml:lang { xsd:token }?, [ a:defaultValue = "no" ] attribute translit { "yes" | "no" }?, attribute text-type { "primary" | "translation" }? ## The origin element is used to capture who, what, where, and when ## distributed the bibliographic object in question; from where the object came from. ## For published sources, this is where the publisher, publisher place and ## publication date go. ## This element can also be used for unpublished sources as ## well, and for events such as performances, interviews, or conferences. ## Because Relax NG allows us to, we control the mix of elements ## depending on whether we have a monograph or a periodical (the ## former generally requiring a publisher, and the latter not). hasOrigin = element hasOrigin { isPublishedBy?, Place*, dateIssued } isPublishedBy = element isPublishedBy { Organization } Place = element place { text } ## The Date element; drawn from BibX, but ## using schema datatyping. dateIssued = element dateIssued { attlist-Date, text } attlist-Date &= attribute year { xsd:gYear }, attribute month { xsd:token {pattern = "0[1-9]|1[0-2]"} } ?, attribute day { xsd:token {pattern = "0[1-9]|(1|2)[0-9]|3[0-1]"}} ?, [ a:defaultValue = "item" ] attribute role { "start" | "end" | "item" }?, Lang? ## While origin designates where an object is from, the location ## element is used to designate where it is currently at. This ## is useful for online sources where one needs to specify a URL, or ## for archival sources where one needs to designate a holding ## location. hasLocation = element hasLocation { attlist.hasLocation, text } attlist.hasLocation &= attribute type { "physical" | "electronic" }, attribute dateAccessed { xsd:date }? ## Drawn from the BibX partdesc element. PartDesc = element partDesc { attlist-partdesc, (single | range | composite)+ } attlist-partdesc &= empty parttype = "number" | "volume" | "issue" | "page" | "chapter" | "part" | "section" | "paragraph" | "line" | "word" | "track" | "other" composite = element composite { attlist-composite, ( single | range ), PartDesc } attlist-composite &= empty single = element single { attlist-single, xsd:token } attlist-single &= attribute xml:lang { text }?, attribute unit { parttype }? range = element range { attlist-range, \start, end? } attlist-range &= attribute xml:lang { text }?, attribute unit { parttype } \start = element start { attlist-start, xsd:token } attlist-start &= empty end = element end { attlist-end, xsd:token } attlist-end &= empty Notes = note* note = element note { text } hasSubject = element hasSubject { Topic* } Topic = element topic { text } state = element state { text } hasMedium = element hasMedium { text } hasGenre = element hasGenre { text } hasIdentifier = element hasIdentifier { attlist-identifier, text } attlist-identifier = attribute type { "isbn" | "issn" | "doi" }