namespace atom = "http://www.w3.org/2005/Atom"
namespace cs = "http://purl.org/net/xbiblio/csl"
namespace dc = "http://purl.org/dc/elements/1.1/"
namespace s = "http://www.ascc.net/xml/schematron"
namespace xhtml = "http://www.w3.org/1999/xhtml"

dc:title [ "Citation Style Language" ]
dc:creator [ "Bruce D'Arcus" ]
dc:creator [ "Simon Kornblith" ]
dc:copyright [ "Bruce D'Arcus and Simon Kornblith, 2007" ]
dc:rights [ "Permission to freely use, copy and distribute." ]
dc:description [
  "Citation Style Language (CSL) schema for describing bibliographic and citation formatting."
]
start = terms

## info element
div {
    info-fields =
      "anthropology"
      | "astronomy"
      | "biology"
      | "botany"
      | "chemistry"
      | "communications"
      | "engineering"
      | "generic-base"
      | "geography"
      | "geology"
      | "history"
      | "humanities"
      | "law"
      | "linguistics"
      | "literature"
      | "math"
      | "medicine"
      | "philosophy"
      | "physics"
      | "psychology"
      | "sociology"
      | "science"
      | "political_science"
      | "social_science"
      | "theology"
      | "zoology"
      | info-categories.extension

      info-categories.extension = notAllowed
}

## Terms and forms
div {
  cs-terms =
    
    ## Miscellaneous Terms
    "accessed"
    | "anonymous"
    | "and"
    | "and others"
    | "at"
    | "et-al"
    | "forthcoming"
    | "from"
    | "in press"
    | "ibid"
    | "in"
    | "no date"
    | "references"
    | "retrieved"
    | "letter"
    | "interview"
    | "online"
    | "cited"
    | "edition"
    | "internet"
    | "presented at"
    | 
      ## Roles
      "author"
    | "editor"
    | "translator"
    | "interviewer"
    | "recipient"
    | 
      ## Months
      "month-01"
    | "month-02"
    | "month-03"
    | "month-04"
    | "month-05"
    | "month-06"
    | "month-07"
    | "month-08"
    | "month-09"
    | "month-10"
    | "month-11"
    | "month-12"
    | 
      ## Other
      cs-terms.locator
    | cs-terms.extension
    | info-fields
  
  ## Locators
  cs-terms.locator =
    "book"
    | "chapter"
    | "column"
    | "figure"
    | "folio"
    | "issue"
    | "line"
    | "note"
    | "opus"
    | "page"
    | 
      ## a synonym for "page" (to be deprecated)
      "page-range"
    | "page-first"
    | "paragraph"
    | "part"
    | "section"
    | "sub verbo"
    | "volume"
    | "verse"
  
  ## "symbol" and reverts to "short" if no term exists
  ## "verb-short" reverts to "verb" if no term exists
  ## all others revert to "long" if no term exists
  cs-term-forms = "long" | "verb" | "short" | "verb-short" | "symbol" | cs-term-forms.extension
  
  ## include-period adds a period after a term if and only if the
  ## term used (not necessarily term specified; see above) is
  ## of form "short" or "verb-short"
  include-period = attribute include-period { xsd:boolean }?
  
  ## Extension structures. You may override these in a customization 
  ## schema. If you do, please contact the xbiblio project to add 
  ## the term or form to the formal controlled list in the schema.
  div {
    cs-terms.extension = notAllowed
    cs-term-forms.extension = notAllowed
  }
}

## Locales
div {
  
  ## Terms are localized strings used as content for the cs:text field. 
  ## It is only needed where you need to add a term not supported by 
  ## default, or override an existing one.
  terms = element cs:terms { locale+ }
  
  ## A language-specific wrapper.
  locale =
    element cs:locale {
      
      ## Where localization is other than that of the style, use the 
      ## xml:lang attribute.
      attribute xml:lang { xsd:language },
      (simple-term | compound-term)+
    }
  term-attributes =
    attribute form { cs-term-forms }?,
    attribute name { cs-terms },
    include-period
  
  ## Simple terms are basic strings, used to represent genres, media, etc.
  simple-term = element cs:term { term-attributes, text }
  
  ## Compound terms are those whose output can be either singular or plural. 
  ## Typically used for things like page number or editor labels.
  compound-term = element cs:term { term-attributes, single-term, multiple-term }
  multiple-term = element cs:multiple { text }
  single-term = element cs:single { text }
}
