diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..273ac9d
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+miscellaneous
+
diff --git a/build.xml b/build.xml
new file mode 100644
index 0000000..1fec316
--- /dev/null
+++ b/build.xml
@@ -0,0 +1,27 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/build/bazga.csl b/build/bazga.csl
new file mode 100644
index 0000000..139ec1d
--- /dev/null
+++ b/build/bazga.csl
@@ -0,0 +1,413 @@
+
+
+
+
diff --git a/schema-1.0.1/README.md b/schema-1.0.1/README.md
new file mode 100755
index 0000000..4fb97b6
--- /dev/null
+++ b/schema-1.0.1/README.md
@@ -0,0 +1,20 @@
+https://github.com/citation-style-language/schema/ is the official repository
+for the Citation Style Language (CSL) schema.
+
+The CSL schema consists of the files:
+
+* csl.rnc
+* csl-categories.rnc
+* csl-terms.rnc
+* csl-types.rnc
+* csl-variables.rnc
+
+CSL styles and locale files can be validated against csl.rnc, which incorporates
+the contents of the other four files.
+
+In addition, the repository contains the files csl-data.json and
+csl-citation.json, which describe the metadata model used by citeproc-js for its
+input data and for embedded citation data in word processor documents,
+respectively. At this point these JSON schemas are not yet normative.
+
+For more information, see CitationStyles.org.
\ No newline at end of file
diff --git a/schema-1.0.1/csl-categories.rnc b/schema-1.0.1/csl-categories.rnc
new file mode 100755
index 0000000..e489c55
--- /dev/null
+++ b/schema-1.0.1/csl-categories.rnc
@@ -0,0 +1,36 @@
+
+## Categories for style metadata
+div {
+ category.citation-format =
+ "author" | "author-date" | "label" | "note" | "numeric"
+
+ ## Use "generic-base" for styles that are non-discipline specific, such as
+ ## APA, Harvard, etc.
+ category.field =
+ "anthropology"
+ | "astronomy"
+ | "biology"
+ | "botany"
+ | "chemistry"
+ | "communications"
+ | "engineering"
+ | "generic-base"
+ | "geography"
+ | "geology"
+ | "history"
+ | "humanities"
+ | "law"
+ | "linguistics"
+ | "literature"
+ | "math"
+ | "medicine"
+ | "philosophy"
+ | "physics"
+ | "political_science"
+ | "psychology"
+ | "science"
+ | "social_science"
+ | "sociology"
+ | "theology"
+ | "zoology"
+}
diff --git a/schema-1.0.1/csl-citation.json b/schema-1.0.1/csl-citation.json
new file mode 100755
index 0000000..8072b9b
--- /dev/null
+++ b/schema-1.0.1/csl-citation.json
@@ -0,0 +1,100 @@
+{
+ "description": "JSON schema (draft 3) for CSL citation objects",
+ "id": "https://github.com/citation-style-language/schema/raw/master/csl-citation.json",
+ "type": "object",
+ "properties": {
+ "schema": {
+ "type": "string",
+ "required": true,
+ "enum" : [
+ "https://github.com/citation-style-language/schema/raw/master/csl-citation.json"
+ ]
+ },
+ "citationID": {
+ "type": [
+ "string",
+ "number"
+ ],
+ "required": true
+ },
+ "citationItems": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": [
+ "string",
+ "number"
+ ],
+ "required": true
+ },
+ "itemData": {
+ "$ref": "csl-data.json/#/items"
+ },
+ "prefix": {
+ "type": "string"
+ },
+ "suffix": {
+ "type": "string"
+ },
+ "locator": {
+ "type": "string"
+ },
+ "label": {
+ "type": "string",
+ "enum": [
+ "book",
+ "chapter",
+ "column",
+ "figure",
+ "folio",
+ "issue",
+ "line",
+ "note",
+ "opus",
+ "page",
+ "paragraph",
+ "part",
+ "section",
+ "sub verbo",
+ "verse",
+ "volume"
+ ]
+ },
+ "suppress-author": {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ },
+ "author-only": {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ },
+ "uris": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "properties": {
+ "type": "object",
+ "properties": {
+ "noteIndex": {
+ "type": "number"
+ }
+ },
+ "additionalProperties" : false
+ }
+ },
+ "additionalProperties" : false
+}
diff --git a/schema-1.0.1/csl-citation.txt b/schema-1.0.1/csl-citation.txt
new file mode 100755
index 0000000..9be242c
--- /dev/null
+++ b/schema-1.0.1/csl-citation.txt
@@ -0,0 +1,106 @@
+CSL Embedded Citation Object Format
+-----------------------------------
+
+The JSON schema "csl-citation.json" describes a format for embedding citation
+objects in documents. The JSON schema references "csl-data.json", which
+describes the CSL citation data object format for CSL processors (documented at
+http://gsl-nagoya-u.net/http/pub/citeproc-doc.html#citation-data-object).
+
+Support for the CSL Embedded Citation Object format is available in
+Mendeley Desktop 1.0 and later.
+
+The CSL citation data object consists of:
+
+* a required "schema" element of type "string", set to the URI of the schema
+* a required "citationID" element of type "string" or "number", set to ???
+* a "citationItems" element of type "array", containing "objects" with the data
+ of the individual cites. The individual cite object are structured as:
+
+ * a required "id" element of type "string" or "number", set to an unique cite
+ ID
+ * a "itemData" element of type "object", described in "csl-data.json/#/items",
+ containing the metadata of a single bibliographic item (this object is
+ returned in citeproc-js by "sys.retrieveItem()")
+ * an "uris" element of type "array", which can contain any number of URIs (of
+ type "string") to the bibliographic item
+ * a "prefix" element of type "string"
+ * a "suffix" element of type "string"
+ * a "locator" element of type "string"
+ * a "label" element of type "string", set to one of the CSL locator types (see
+ http://citationstyles.org/downloads/specification.html#locators)
+ * a "suppress-author" element of type "string", "boolean" or "number"
+ * a "author-only" element of type "string", "boolean" or "number"
+* a "properties" element of type "object" containing:
+ * a "noteIndex" element of type "number", set to the index of the footnote or
+ endnote
+* (Mendeley-specific) a "mendeley" element of type "object" containing:
+ * a "previouslyFormattedCitation" element of type "string", set to the
+ rendered output of the cite of the previous rendering round (this can be
+ used to determine if the user manually altered the output)
+ * a "manualFormatting" element of type "string", set to the user-customized
+ output of the cite (this output will be used in favor of the generated
+ output)
+
+The method to embed metadata for citations and bibliographies typically varies
+between word processors. Currently Mendeley uses:
+
+* For Word for Windows: in-text citations and bibliographies are represented by
+ a field code of type "wdFieldAddin" or temporarily represented as a bookmark
+ if exporting to OpenOffice
+* For OpenOffice: in-text citations are of type
+ "com.sun.star.text.ReferenceMark", bibliographies are of type
+ "com.sun.star.text.TextSection" or temporarily represented as a bookmark if
+ exporting to Word
+
+If you are trying to implement this and want help ensuring compatibility or have
+suggestions for changes, please use the xbiblio mailing list:
+https://lists.sourceforge.net/lists/listinfo/xbiblio-devel
+
+An example of an embedded citation object from Mendeley (the "Mendeley
+Citation{970e7ce0-8a21-482e-b7d6-e77794a2d37d}" part is not required and used
+only for backwards compatibility with older versions of Mendeley, any text before
+"CSL_CITATION" can be ignored, and newlines have been added for readability):
+
+---
+ADDIN Mendeley Citation{970e7ce0-8a21-482e-b7d6-e77794a2d37d} CSL_CITATION
+{
+ "schema": "https://github.com/citation-style-language/schema/raw/master/csl-citation.json",
+ "citationID":"12rsus7rlj",
+ "citationItems":
+ [
+ {
+ "id":"ITEM-1",
+ "itemData":
+ {
+ "id" : "ITEM-1",
+ "issued" : { "date-parts" : [ [ "2007" ] ] },
+ "title" : "My paper",
+ "type" : "journal-article"
+ },
+ "locator":"21",
+ "label":"page",
+ "uris" :
+ [
+ "http://www.mendeley.com/documents/?uuid=970e7ce0-8a21-482e-b7d6-e77794a2d37d",
+ "http://www.zotero.org/uniqueDocumentId"
+ ]
+ }
+ ],
+ "mendeley":
+ {
+ "previouslyFormattedCitation" : "(2007)",
+ "manualFormatting" : "2007b"
+ }
+ "properties":
+ {
+ "noteIndex": 1
+ }
+}
+---
+
+An example of a bibliography field code contents from Mendeley (the "Mendeley
+Bibliography" part is not required and only used by Mendeley for backwards compatibility)
+
+---
+ADDIN Mendeley Bibliography CSL_BIBLIOGRAPHY
+---
diff --git a/schema-1.0.1/csl-data.json b/schema-1.0.1/csl-data.json
new file mode 100755
index 0000000..e171618
--- /dev/null
+++ b/schema-1.0.1/csl-data.json
@@ -0,0 +1,446 @@
+{
+ "description": "JSON schema (draft 3) for CSL input data",
+ "id": "https://github.com/citation-style-language/schema/raw/master/csl-data.json",
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "type": {
+ "type": "string",
+ "required": true,
+ "enum" : [
+ "article",
+ "article-journal",
+ "article-magazine",
+ "article-newspaper",
+ "bill",
+ "book",
+ "broadcast",
+ "chapter",
+ "dateset",
+ "entry",
+ "entry-dictionary",
+ "entry-encyclopedia",
+ "figure",
+ "graphic",
+ "interview",
+ "legal_case",
+ "legislation",
+ "manuscript",
+ "map",
+ "motion_picture",
+ "musical_score",
+ "pamphlet",
+ "paper-conference",
+ "patent",
+ "personal_communication",
+ "post",
+ "post-weblog",
+ "report",
+ "review",
+ "review-book",
+ "song",
+ "speech",
+ "thesis",
+ "treaty",
+ "webpage"
+ ]
+ },
+ "id": {
+ "type": [
+ "string",
+ "number"
+ ],
+ "required": true
+ },
+ "categories": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "language": {
+ "type": "string"
+ },
+ "journalAbbreviation": {
+ "type": "string"
+ },
+ "shortTitle": {
+ "type": "string"
+ },
+ "author": {
+ "type": "array",
+ "items": {
+ "id": "name-variable",
+ "type": [
+ {
+ "properties": {
+ "family" : {
+ "type": "string"
+ },
+ "given" : {
+ "type": "string"
+ },
+ "dropping-particle" : {
+ "type": "string"
+ },
+ "non-dropping-particle" : {
+ "type": "string"
+ },
+ "suffix" : {
+ "type": "string"
+ },
+ "comma-suffix" : {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ },
+ "static-ordering" : {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ },
+ "literal" : {
+ "type": "string"
+ },
+ "parse-names" : {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ }
+ },
+ "additionalProperties" : false
+ },
+ {
+ "properties": {
+ "literal" : {
+ "type": "string"
+ }
+ },
+ "additionalProperties" : false
+ }
+ ]
+ }
+ },
+ "collection-editor": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "composer": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "container-author": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "director": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "editor": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "editorial-director": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "interviewer": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "illustrator": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "original-author": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "recipient": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "reviewed-author": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "translator": {
+ "type": "array",
+ "items": {
+ "$ref": "name-variable"
+ }
+ },
+ "accessed": {
+ "id": "date-variable",
+ "type": [
+ {
+ "properties": {
+ "date-parts": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "maxItems": 3
+ },
+ "maxItems": 2
+ },
+ "season": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "circa": {
+ "type": [
+ "string",
+ "number",
+ "boolean"
+ ]
+ },
+ "literal": {
+ "type": "string"
+ },
+ "raw": {
+ "type": "string"
+ }
+ },
+ "additionalProperties" : false
+ },
+ {
+ "properties": {
+ "literal": {
+ "type": "string"
+ }
+ },
+ "additionalProperties" : false
+ }
+ ]
+ },
+ "container": {
+ "$ref": "date-variable"
+ },
+ "event-date": {
+ "$ref": "date-variable"
+ },
+ "issued": {
+ "$ref": "date-variable"
+ },
+ "original-date": {
+ "$ref": "date-variable"
+ },
+ "submitted": {
+ "$ref": "date-variable"
+ },
+ "abstract": {
+ "type": "string"
+ },
+ "annote": {
+ "type": "string"
+ },
+ "archive": {
+ "type": "string"
+ },
+ "archive_location": {
+ "type": "string"
+ },
+ "archive-place": {
+ "type": "string"
+ },
+ "authority": {
+ "type": "string"
+ },
+ "call-number": {
+ "type": "string"
+ },
+ "chapter-number": {
+ "type": "string"
+ },
+ "citation-number": {
+ "type": "string"
+ },
+ "citation-label": {
+ "type": "string"
+ },
+ "collection-number": {
+ "type": "string"
+ },
+ "collection-title": {
+ "type": "string"
+ },
+ "container-title": {
+ "type": "string"
+ },
+ "container-title-short": {
+ "type": "string"
+ },
+ "dimensions": {
+ "type": "string"
+ },
+ "DOI": {
+ "type": "string"
+ },
+ "edition": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "event": {
+ "type": "string"
+ },
+ "event-place": {
+ "type": "string"
+ },
+ "first-reference-note-number": {
+ "type": "string"
+ },
+ "genre": {
+ "type": "string"
+ },
+ "ISBN": {
+ "type": "string"
+ },
+ "ISSN": {
+ "type": "string"
+ },
+ "issue": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "jurisdiction": {
+ "type": "string"
+ },
+ "keyword": {
+ "type": "string"
+ },
+ "locator": {
+ "type": "string"
+ },
+ "medium": {
+ "type": "string"
+ },
+ "note": {
+ "type": "string"
+ },
+ "number": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "number-of-pages": {
+ "type": "string"
+ },
+ "number-of-volumes": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "original-publisher": {
+ "type": "string"
+ },
+ "original-publisher-place": {
+ "type": "string"
+ },
+ "original-title": {
+ "type": "string"
+ },
+ "page": {
+ "type": "string"
+ },
+ "page-first": {
+ "type": "string"
+ },
+ "PMCID": {
+ "type": "string"
+ },
+ "PMID": {
+ "type": "string"
+ },
+ "publisher": {
+ "type": "string"
+ },
+ "publisher-place": {
+ "type": "string"
+ },
+ "references": {
+ "type": "string"
+ },
+ "reviewed-title": {
+ "type": "string"
+ },
+ "scale": {
+ "type": "string"
+ },
+ "section": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ },
+ "title": {
+ "type": "string"
+ },
+ "title-short": {
+ "type": "string"
+ },
+ "URL": {
+ "type": "string"
+ },
+ "version": {
+ "type": "string"
+ },
+ "volume": {
+ "type": [
+ "string",
+ "number"
+ ]
+ },
+ "year-suffix": {
+ "type": "string"
+ }
+ },
+ "additionalProperties" : false
+ }
+}
diff --git a/schema-1.0.1/csl-data.rnc b/schema-1.0.1/csl-data.rnc
new file mode 100755
index 0000000..e1b97d3
--- /dev/null
+++ b/schema-1.0.1/csl-data.rnc
@@ -0,0 +1,103 @@
+namespace dc = "http://purl.org/dc/elements/1.1/"
+
+dc:title [ "Citation Style Language Data" ]
+dc:creator [ "Bruce D'Arcus" ]
+dc:copyright [ "Bruce D'Arcus, 2009" ]
+dc:description [ "A schema for the CSL data model." ]
+include "csl-types.rnc"
+include "csl-variables.rnc"
+start = element references { reference+ }
+reference = element reference { type, id, uri?, container-uri?, (contributor* & date* & variable+) }
+
+## Types
+div {
+ type = attribute type { cs-types }
+}
+
+## Identifiers
+div {
+
+ ## The id is an identifier unique to the scope of the file
+ id = attribute id { token }
+
+ ## The URI is the global identity for the refererence; used to associate a citation reference to its data
+ uri = attribute uri { xsd:anyURI }
+
+ ## the URI for containing items (such as edited books or journals)
+ container-uri = attribute container-uri { xsd:anyURI }
+}
+
+## Contributors
+div {
+ contributor =
+ element contributor {
+ attribute type { cs-names },
+ name-elements
+ }
+ name-elements =
+ element name { text }
+ | ((element given { text }? &
+ element family { text }?) &
+ element dropping-particle { text }? &
+ element non-dropping-particle { text }? &
+ element suffix { text }?)
+}
+
+## Dates
+div {
+ date =
+ element date {
+ attribute type { cs-dates },
+ attribute circa { xsd:boolean }?,
+ (date-pattern | date-range)
+ }
+ date-pattern =
+ year-pattern,
+ ( ( month-pattern, day-pattern? ) | season-pattern )?
+ date-range =
+ element begin-date { date-pattern },
+ element end-date { date-pattern }?
+ year-pattern =
+ attribute year {
+ xsd:integer { maxInclusive="-1" }
+ | xsd:integer { minInclusive="1" }
+ }
+ month-pattern =
+ attribute month { xsd:integer { minInclusive="1" maxInclusive="12" } }
+ day-pattern =
+ attribute day { xsd:integer { minInclusive="1" maxInclusive="31" } }
+
+ # 1 = Spring, 2 = Summer, 3 = Fall, 4 = Winter
+ season-pattern =
+ attribute season { xsd:integer { minInclusive="1" maxInclusive="4" } }
+}
+
+## Simple Variables
+div {
+ variable =
+ element variable {
+ attribute type { cs-variables },
+ (simple-variable-pattern | rich-variable-pattern)
+ }
+ simple-variable-pattern = text
+ rich-variable-pattern =
+ (text
+ | element abbr { text }
+ | element b { text }
+ | element cite {
+
+ ## cited title which is a part (like an article), and so typically rendered in quotes, rather than italicized
+ attribute class { "part" }?,
+ text
+ }
+ | element i { text }
+ | element sc { text }
+ | element span {
+
+ ## text whose case should not be transformed (as with proper nouns)
+ attribute class { "protect" }?,
+ text
+ }
+ | element sup { text }
+ | element sub { text })+
+}
diff --git a/schema-1.0.1/csl-relaxed.rnc b/schema-1.0.1/csl-relaxed.rnc
new file mode 100755
index 0000000..01d5e12
--- /dev/null
+++ b/schema-1.0.1/csl-relaxed.rnc
@@ -0,0 +1,13 @@
+namespace cs = "http://purl.org/net/xbiblio/csl"
+namespace dc = "http://purl.org/dc/elements/1.1/"
+
+dc:title [ "Citation Style Language Schema - Relaxed" ]
+dc:creator [ "Bruce D'Arcus" ]
+dc:rights [ "Permission to freely use, copy and distribute." ]
+dc:description [
+ "Relaxes the need for a cs:updated value in the official CSL schema."
+]
+
+include "csl.rnc"{
+ info-updated = element cs:updated { xsd:dateTime? }
+}
\ No newline at end of file
diff --git a/schema-1.0.1/csl-terms.rnc b/schema-1.0.1/csl-terms.rnc
new file mode 100755
index 0000000..cf9a777
--- /dev/null
+++ b/schema-1.0.1/csl-terms.rnc
@@ -0,0 +1,138 @@
+
+## Terms
+div {
+ terms =
+ terms.gender-assignable
+ | terms.gender-variants
+ | terms.locator
+ |
+ ## Contributor roles
+ variables.names
+ | "editortranslator"
+ |
+ ## Miscellaneous terms
+ "accessed"
+ | "ad"
+ | "and"
+ | "and others"
+ | "anonymous"
+ | "at"
+ | "available at"
+ | "bc"
+ | "by"
+ | "circa"
+ | "cited"
+ | "et-al"
+ | "forthcoming"
+ | "from"
+ | "ibid"
+ | "in"
+ | "in press"
+ | "internet"
+ | "interview"
+ | "letter"
+ | "no date"
+ | "online"
+ | "presented at"
+ | "reference"
+ | "retrieved"
+ | "scale"
+ | "version"
+ |
+ ## Punctuation
+ "open-quote"
+ | "close-quote"
+ | "open-inner-quote"
+ | "close-inner-quote"
+ | "page-range-delimiter"
+ |
+ ## Seasons
+ "season-01"
+ | "season-02"
+ | "season-03"
+ | "season-04"
+ |
+ ## (legacy; remove in CSL 1.1)
+ category.field
+
+ ## Terms to which a gender may be assigned
+ terms.gender-assignable =
+
+ ## 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"
+ | terms.non-locator-number-variables
+ | terms.locator-number-variables
+
+ ## Terms for which gender variants may be specified
+ terms.gender-variants =
+ terms.ordinals
+ | terms.long-ordinals
+
+ terms.ordinals =
+
+ ## Ordinals
+ xsd:string { pattern = "ordinal(-\d{2})?" }
+
+ terms.long-ordinals =
+
+ ## Long ordinals
+ "long-ordinal-01"
+ | "long-ordinal-02"
+ | "long-ordinal-03"
+ | "long-ordinal-04"
+ | "long-ordinal-05"
+ | "long-ordinal-06"
+ | "long-ordinal-07"
+ | "long-ordinal-08"
+ | "long-ordinal-09"
+ | "long-ordinal-10"
+
+ ## Locators
+ terms.locator =
+ terms.locator.testable
+ |
+ ## "sub verbo" is recognized as "sub" & "verbo" in attribute lists; term
+ ## should be renamed to "sub-verbo"
+ "sub verbo"
+
+ ## Locator terms that can be tested with the "locator" conditional
+ ## ("sub verbo" can be tested with "sub-verbo")
+ terms.locator.testable =
+ "book"
+ | "chapter"
+ | "column"
+ | "figure"
+ | "folio"
+ | "line"
+ | "note"
+ | "opus"
+ | "page"
+ | "paragraph"
+ | "part"
+ | "section"
+ | "verse"
+ | terms.locator-number-variables
+
+ ## Locator terms with matching number variables
+ terms.locator-number-variables = "issue" | "volume"
+
+ ## Non-locator terms accompanying number variables
+ terms.non-locator-number-variables =
+ "chapter-number"
+ | "collection-number"
+ | "edition"
+ | "number"
+ | "number-of-pages"
+ | "number-of-volumes"
+}
diff --git a/schema-1.0.1/csl-types.rnc b/schema-1.0.1/csl-types.rnc
new file mode 100755
index 0000000..716a70a
--- /dev/null
+++ b/schema-1.0.1/csl-types.rnc
@@ -0,0 +1,40 @@
+
+## Item types
+div {
+ item-types =
+ "article"
+ | "article-journal"
+ | "article-magazine"
+ | "article-newspaper"
+ | "bill"
+ | "book"
+ | "broadcast"
+ | "chapter"
+ | "dataset"
+ | "entry"
+ | "entry-dictionary"
+ | "entry-encyclopedia"
+ | "figure"
+ | "graphic"
+ | "interview"
+ | "legal_case"
+ | "legislation"
+ | "manuscript"
+ | "map"
+ | "motion_picture"
+ | "musical_score"
+ | "pamphlet"
+ | "paper-conference"
+ | "patent"
+ | "personal_communication"
+ | "post"
+ | "post-weblog"
+ | "report"
+ | "review"
+ | "review-book"
+ | "song"
+ | "speech"
+ | "thesis"
+ | "treaty"
+ | "webpage"
+}
diff --git a/schema-1.0.1/csl-variables.rnc b/schema-1.0.1/csl-variables.rnc
new file mode 100755
index 0000000..a894c88
--- /dev/null
+++ b/schema-1.0.1/csl-variables.rnc
@@ -0,0 +1,98 @@
+
+## Variables
+div {
+
+ ## All variables
+ variables =
+ variables.dates
+ | variables.names
+ | variables.numbers
+ | variables.strings
+
+ ## Standard variables
+ variables.standard = variables.numbers | variables.strings
+
+ ## Date variables
+ variables.dates =
+ "accessed"
+ | "container"
+ | "event-date"
+ | "issued"
+ | "original-date"
+ | "submitted"
+
+ ## Name variables
+ variables.names =
+ "author"
+ | "collection-editor"
+ | "composer"
+ | "container-author"
+ | "director"
+ | "editor"
+ | "editorial-director"
+ | "illustrator"
+ | "interviewer"
+ | "original-author"
+ | "recipient"
+ | "reviewed-author"
+ | "translator"
+
+ ## Number variables
+ variables.numbers =
+ "chapter-number"
+ | "collection-number"
+ | "edition"
+ | "issue"
+ | "number"
+ | "number-of-pages"
+ | "number-of-volumes"
+ | "volume"
+
+ ## String variables
+ variables.strings =
+ "abstract"
+ | "annote"
+ | "archive"
+ | "archive_location"
+ | "archive-place"
+ | "authority"
+ | "call-number"
+ | "citation-label"
+ | "citation-number"
+ | "collection-title"
+ | "container-title"
+ | "container-title-short"
+ | "dimensions"
+ | "DOI"
+ | "event"
+ | "event-place"
+ | "first-reference-note-number"
+ | "genre"
+ | "ISBN"
+ | "ISSN"
+ | "jurisdiction"
+ | "keyword"
+ | "locator"
+ | "medium"
+ | "note"
+ | "original-publisher"
+ | "original-publisher-place"
+ | "original-title"
+ | "page"
+ | "page-first"
+ | "PMID"
+ | "PMCID"
+ | "publisher"
+ | "publisher-place"
+ | "references"
+ | "reviewed-title"
+ | "scale"
+ | "section"
+ | "source"
+ | "status"
+ | "title"
+ | "title-short"
+ | "URL"
+ | "version"
+ | "year-suffix"
+}
diff --git a/schema-1.0.1/csl.rnc b/schema-1.0.1/csl.rnc
new file mode 100755
index 0000000..e0b0cd6
--- /dev/null
+++ b/schema-1.0.1/csl.rnc
@@ -0,0 +1,1173 @@
+namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
+namespace bibo = "http://purl.org/ontology/bibo/"
+namespace cs = "http://purl.org/net/xbiblio/csl"
+namespace dc = "http://purl.org/dc/elements/1.1/"
+namespace sch = "http://www.ascc.net/xml/schematron"
+namespace xhtml = "http://www.w3.org/1999/xhtml"
+
+# CSL schema metadata
+
+dc:title [ "Citation Style Language" ]
+dc:creator [ "Bruce D'Arcus" ]
+dc:creator [ "Simon Kornblith" ]
+bibo:editor [ "Frank Bennett" ]
+bibo:editor [ "Rintze Zelle" ]
+dc:rights [
+ "Copyright 2007-2012 by Frank Bennett, Bruce D'Arcus, Simon Kornblith, and Rintze Zelle. Permission to freely use, copy and distribute."
+]
+dc:description [
+ "RELAX NG compact schema for the Citation Style Language (CSL)."
+]
+# Embedded Schematron rules to detect calls to nonexistent macros
+
+sch:ns [ uri = "http://purl.org/net/xbiblio/csl" prefix = "cs" ]
+sch:pattern [
+ name = "Non-existing macros"
+ sch:rule [
+ context = "//cs:text[@macro]"
+ sch:assert [
+ test = "@macro = /cs:style/cs:macro/@name"
+ "This macro call has no corresponding macro."
+ ]
+ ]
+ sch:rule [
+ context = "//cs:key[@macro]"
+ sch:assert [
+ test = "@macro = /cs:style/cs:macro/@name"
+ "This macro call has no corresponding macro."
+ ]
+ ]
+]
+
+## Subparts of the CSL schema
+include "csl-terms.rnc"
+include "csl-types.rnc"
+include "csl-variables.rnc"
+include "csl-categories.rnc"
+[
+ a:documentation [
+ xhtml:h2 [ "cs:style and cs:locale - Root Elements" ]
+ ]
+]
+div {
+ start =
+ independent-style.style | dependent-style.style | locale-file.locale
+
+ independent-style.style =
+ element cs:style {
+
+ ## Select whether citations appear in-text or as notes.
+ attribute class { "in-text" | "note" },
+ style.default-locale,
+ style.options,
+ version,
+ independent-style.style.info,
+ (style.locale*
+ & style.macro*
+ & style.citation
+ & style.bibliography?)?
+ }
+
+ dependent-style.style =
+ element cs:style {
+ style.default-locale,
+ version,
+ dependent-style.style.info,
+ dependent-style.style.legacy-attributes
+ }
+
+ locale-file.locale =
+ element cs:locale {
+
+ ## Specify the locale of the locale file.
+ attribute xml:lang { xsd:language },
+ version,
+ locale-file.locale.info?,
+ (locale.style-options & locale.date+ & locale.terms)
+ }
+
+ style.default-locale =
+
+ ## Set a default style locale.
+ attribute default-locale { xsd:language }?
+
+ version =
+
+ ## Indicate CSL version compatibility ("1.0" for CSL 1.0).
+ [ a:defaultValue = "1.0" ] attribute version { "1.0" }
+
+ ## Obsolete for dependent styles. Will be disallowed with CSL 1.1.
+ dependent-style.style.legacy-attributes =
+ attribute class { "in-text" | "note" }?,
+ style.options
+}
+[
+ a:documentation [
+ xhtml:h2 [ "cs:info - Style and Locale File Metadata" ]
+ ]
+]
+div {
+
+ ## Metadata for independent styles.
+ independent-style.style.info =
+ element cs:info {
+ info.author*
+ & info.category*
+ & info.contributor*
+ & info.id
+ & info.issn*
+ & info.eissn?
+ & info.issnl?
+ & independent-style.info.link*
+ & info.published?
+ & info.rights?
+ & info.summary?
+ & info.title
+ & info.title-short?
+ & info.updated
+ }
+
+ ## Metadata for dependent styles.
+ dependent-style.style.info =
+ element cs:info {
+ info.author*
+ & info.category*
+ & info.contributor*
+ & info.id
+ & info.issn*
+ & info.eissn?
+ & info.issnl?
+ & dependent-style.info.link+
+ & info.published?
+ & info.rights?
+ & info.summary?
+ & info.title
+ & info.title-short?
+ & info.updated
+ }
+
+ ## Metadata for locale files.
+ locale-file.locale.info =
+ element cs:info { info.translator* & info.rights? & info.updated? }
+
+ info.author = element cs:author { personal-details }
+
+ info.contributor = element cs:contributor { personal-details }
+
+ info.translator = element cs:translator { personal-details }
+
+ personal-details =
+ element cs:name { text }
+ & element cs:email { text }?
+ & element cs:uri { xsd:anyURI }?
+
+ info.category =
+
+ ## Specify the citation format of the style (using the "citation-format"
+ ## attribute) or the fields and disciplines for which the style is
+ ## relevant (using the "field" attribute).
+ element cs:category {
+ attribute citation-format { category.citation-format }
+ | attribute field { category.field }
+ }
+
+ info.id =
+
+ ## Specify the URI to establish the identity of the style. The URI
+ ## should be stable, unique and dereferenceable URI.
+ element cs:id { xsd:anyURI }
+
+ info.issn =
+
+ ## Specify the journal's ISSN(s) for journal-specific styles. An ISSN
+ ## must consist of four digits, a hyphen, three digits, and a check
+ ## digit (a numeral digit or roman X), e.g. "1234-1231".
+ element cs:issn { issn }
+
+ info.eissn =
+
+ ## Specify the journal's eISSN for journal-specific styles.
+ element cs:eissn { issn }
+
+ info.issnl =
+
+ ## Specify the journal's ISSN-L for journal-specific styles.
+ element cs:issnl { issn }
+
+ issn = xsd:string { pattern = "\d{4}\-\d{3}(\d|x|X)" }
+
+ independent-style.info.link =
+ element cs:link {
+ attribute href { xsd:anyURI },
+
+ ## Specify how the URL relates to the style.
+ attribute rel {
+
+ ## The URI of the CSL style itself.
+ "self"
+ |
+ ## URI of the style from which the current style is derived.
+ "template"
+ |
+ ## URI of style documentation.
+ "documentation"
+ |
+ ## Obsolete for independent styles. Will be disallowed with
+ ## CSL 1.1.
+ "independent-parent"
+ },
+ info-text
+ }
+
+ dependent-style.info.link =
+ element cs:link {
+ attribute href { xsd:anyURI },
+
+ ## Specify how the URL relates to the style.
+ attribute rel {
+
+ ## The URI of the CSL style itself.
+ "self"
+ |
+ ## URI of the CSL style whose content should be used for
+ ## processing. Required for dependent styles.
+ "independent-parent"
+ |
+ ## URI of style documentation.
+ "documentation"
+ |
+ ## Obsolete for dependent styles. Will be disallowed with CSL
+ ## 1.1.
+ "template"
+ },
+ info-text
+ }
+
+ info.published =
+
+ ## Specify when the style was initially created or made available.
+ element cs:published { xsd:dateTime }
+
+ info.rights =
+ element cs:rights {
+ attribute license { xsd:anyURI }?,
+ info-text
+ }
+
+ info.summary = element cs:summary { info-text }
+
+ info.title = element cs:title { info-text }
+
+ info.title-short =
+
+ ## Specify an abbreviated style title (e.g., "APA")
+ element cs:title-short { info-text }
+
+ info.updated =
+
+ ## Specify when the style was last updated (e.g.,
+ ## "2007-10-26T21:32:52+02:00")
+ element cs:updated { xsd:dateTime }
+
+ info-text =
+ attribute xml:lang { xsd:language }?,
+ text
+}
+[ a:documentation [ xhtml:h2 [ "cs:locale in Independent Styles" ] ] ]
+div {
+ style.locale =
+
+ ## Use to (re)define localized terms, dates and options.
+ element cs:locale {
+
+ ## Specify the affected locale(s). If "xml:lang" is not set, the
+ ## "cs:locale" element affects all locales.
+ attribute xml:lang { xsd:language }?,
+ (locale.style-options? & locale.date* & locale.terms?)
+ }
+}
+[
+ a:documentation [
+ xhtml:h2 [ "cs:locale Contents - Localization Data" ]
+ ]
+]
+div {
+
+ ## Localized global options are specified as attributes in the
+ ## cs:style-options element. If future versions of CSL include localized
+ ## options that are citation or bibliography specific, the elements
+ ## cs:citation-options and cs:bibliography-options can be added.
+ locale.style-options =
+ element cs:style-options {
+
+ ## Limit the "ordinal" form to the first day of the month.
+ [ a:defaultValue = "false" ]
+ attribute limit-day-ordinals-to-day-1 { xsd:boolean }?,
+
+ ## Specify whether punctuation (a period or comma) is placed within
+ ## or outside (default) the closing quotation mark.
+ [ a:defaultValue = "false" ]
+ attribute punctuation-in-quote { xsd:boolean }?
+ }
+
+ locale.date =
+ element cs:date {
+ date.form,
+ delimiter,
+ font-formatting,
+ text-case,
+ locale.date.date-part+
+ }
+
+ date.form =
+
+ ## Select the localized date format ("text" or "numeric").
+ attribute form {
+
+ ## Text date form (e.g., "December 15, 2005").
+ "text"
+ |
+ ## Numeric date form (e.g., "2005-12-15").
+ "numeric"
+ }
+
+ locale.date.date-part =
+ element cs:date-part {
+ affixes, font-formatting, text-case, (day | month | year)
+ }
+
+ locale.terms = element cs:terms { terms.term+ }
+
+ ## The "cs:term" element can either hold a basic string, or "cs:single" and
+ ## "cs:multiple" child elements to give singular and plural forms of the term.
+ terms.term =
+ element cs:term {
+ term.attributes,
+ (text | (term.single, term.multiple))
+ }
+
+ term.attributes =
+ (attribute name { terms },
+ [ a:defaultValue = "long" ] attribute form { term.form }?)
+ | (attribute name { terms.ordinals },
+ attribute form { "long" }?,
+ attribute gender-form { "masculine" | "feminine" }?,
+ attribute match { "last-digit" | "last-two-digits" | "whole-number" }?)
+ | (attribute name { terms.long-ordinals },
+ attribute form { "long" }?,
+ attribute gender-form { "masculine" | "feminine" })
+ | (attribute name { terms.gender-assignable },
+ attribute form { "long" }?,
+ attribute gender { "masculine" | "feminine" })
+
+ ## "verb-short" reverts to "verb" if the "verb-short" form is not available.
+ ## "symbol" reverts to "short" if the "symbol" form is not available.
+ ## "verb" and "short" revert to "long" if the specified form is not available.
+ term.form = "long" | "verb" | "short" | "verb-short" | "symbol"
+ term.single =
+
+ ## Singular version of the term.
+ element cs:single { text }
+
+ term.multiple =
+
+ ## Plural version of the term.
+ element cs:multiple { text }
+}
+[ a:documentation [ xhtml:h2 [ "cs:macro" ] ] ]
+div {
+ style.macro =
+
+ ## Use to create collections of (reusable) formatting instructions.
+ element cs:macro {
+ attribute name { xsd:NMTOKEN },
+ rendering-element+
+ }
+
+ rendering-element =
+ rendering-element.names
+ | rendering-element.date
+ | rendering-element.label
+ | rendering-element.text
+ | rendering-element.number
+ | rendering-element.choose
+ | rendering-element.group
+}
+[ a:documentation [ xhtml:h2 [ "cs:citation and cs:bibliography" ] ] ]
+div {
+ style.citation =
+
+ ## Use to describe the formatting of citations.
+ element cs:citation { citation.options, sort?, citation.layout }
+
+ style.bibliography =
+
+ ## Use to describe the formatting of the bibliography.
+ element cs:bibliography {
+ bibliography.options, sort?, bibliography.layout
+ }
+
+ citation.layout =
+ element cs:layout {
+ affixes, delimiter, font-formatting, rendering-element+
+ }
+
+ bibliography.layout =
+ element cs:layout { affixes, font-formatting, rendering-element+ }
+}
+[ a:documentation [ xhtml:h2 [ "cs:names Rendering Element" ] ] ]
+div {
+ rendering-element.names =
+ element cs:names {
+ names.attributes,
+ ((names.name?, names.et-al?) & names.label*),
+ names.substitute?
+ }
+
+ names.attributes =
+ attribute variable {
+ list { variables.names+ }
+ },
+ affixes,
+
+ ## Specify the delimiter for name lists of name variables rendered by
+ ## the same cs:names element.
+ delimiter,
+ display,
+ font-formatting
+
+ names.name =
+ element cs:name {
+ name.attributes,
+
+ ## Select the "long" (first name + last name, for Western names),
+ ## "short" (last name only, for Western names), or "count" name form
+ ## (returning the number of names in the name variable, which can be
+ ## useful for some sorting algorithms).
+ [ a:defaultValue = "long" ]
+ attribute form { "long" | "short" | "count" }?,
+ affixes,
+
+ ## Set the delimiter for names in a name variable (e.g., ", " in
+ ## "Doe, Smith")
+ [ a:defaultValue = ", " ] delimiter,
+ font-formatting,
+ name.name-part*
+ }
+
+ name.attributes =
+
+ ## Use to separate the second-to-last and last name of a name list by
+ ## the "and" term or ampersand.
+ attribute and {
+
+ ## Use the "and" term (e.g., "Doe, Johnson and Smith").
+ "text"
+ |
+ ## Use the "ampersand" (e.g., "Doe, Johnson & Smith").
+ "symbol"
+ }?,
+
+ ## Specify when the name delimiter is used between a truncated name list
+ ## and the "et-al" (or "and others") term in case of et-al abbreviation
+ ## (e.g., "Smith, Doe et al." or "Smith, Doe, et al.").
+ [ a:defaultValue = "contextual" ]
+ attribute delimiter-precedes-et-al {
+
+ ## The name delimiter is only used when the truncated name list
+ ## consists of two or more names.
+ "contextual"
+ |
+ ## The name delimiter is always used.
+ "always"
+ |
+ ## The name delimiter is never used.
+ "never"
+ |
+ ## The name delimiter is only used if the preceding name is inverted as
+ ## a result of the "name-as-sort-order" attribute.
+ "after-inverted-name"
+ }?,
+
+ ## Specify when the name delimiter is used between the second-to-last
+ ## and last name of a non-truncated name list. Only has an effect when
+ ## the "and" term or ampersand is used (e.g., "Doe and Smith" or "Doe,
+ ## and Smith").
+ [ a:defaultValue = "contextual" ]
+ attribute delimiter-precedes-last {
+
+ ## The name delimiter is only used when the name list consists of
+ ## three or more names.
+ "contextual"
+ |
+ ## The name delimiter is always used.
+ "always"
+ |
+ ## The name delimiter is never used.
+ "never"
+ |
+ ## The name delimiter is only used if the preceding name is inverted as
+ ## a result of the "name-as-sort-order" attribute.
+ "after-inverted-name"
+ }?,
+
+ ## Set the minimum number of names needed in a name variable to activate
+ ## et-al abbreviation.
+ attribute et-al-min { xsd:integer }?,
+
+ ## Set the number of names to render when et-al abbreviation is active.
+ attribute et-al-use-first { xsd:integer }?,
+
+ ## As "et-al-min", but only affecting subsequent citations to an item.
+ attribute et-al-subsequent-min { xsd:integer }?,
+
+ ## As "et-al-use-first", but only affecting subsequent citations to an
+ ## item.
+ attribute et-al-subsequent-use-first { xsd:integer }?,
+
+ ## If set to "true", the "et-al" (or "and others") term is replaced by
+ ## an ellipsis followed by the last name of the name variable.
+ [ a:defaultValue = "false" ]
+ attribute et-al-use-last { xsd:boolean }?,
+
+ ## If set to "false", names are not initialized and "initialize-with"
+ ## only affects initials already present in the input data.
+ [ a:defaultValue = "true" ] attribute initialize { xsd:boolean }?,
+
+ ## Activate initializing of given names. The attribute value is appended
+ ## to each initial (e.g., with ". ", "Orson Welles" becomes "O. Welles").
+ attribute initialize-with { text }?,
+
+ ## Specify whether (and which) names should be rendered in their sort
+ ## order (e.g., "Doe, John" instead of "John Doe").
+ attribute name-as-sort-order {
+
+ ## Render the first name of each name variable in sort order.
+ "first"
+ |
+ ## Render all names in sort order.
+ "all"
+ }?,
+
+ ## Sets the delimiter for name-parts that have switched positions as a
+ ## result of "name-as-sort-order" (e.g., ", " in "Doe, John").
+ [ a:defaultValue = ", " ] attribute sort-separator { text }?
+
+ name.name-part =
+
+ ## Use to format individual name parts (e.g., "Jane DOE").
+ element cs:name-part {
+ attribute name { "family" | "given" },
+ affixes,
+ font-formatting,
+ text-case
+ }
+
+ names.et-al =
+
+ ## Specify the term used for et-al abbreviation and its formatting.
+ element cs:et-al {
+
+ ## Select the term to use for et-al abbreviation.
+ [ a:defaultValue = "et-al" ]
+ attribute term { "et-al" | "and others" }?,
+ font-formatting,
+ names.et-al.legacy-attributes
+ }
+
+ ## Ignored in CSL 1.0.1. Will be disallowed with CSL 1.1.
+ names.et-al.legacy-attributes = affixes
+
+ ## Inherits variable from the parent cs:names element.
+ names.label =
+ element cs:label {
+ [ a:defaultValue = "long" ] attribute form { term.form }?,
+ label.attributes-shared
+ }
+
+ names.substitute =
+
+ ## Specify substitution options when the name variables selected on the
+ ## parent cs:names element are empty.
+ element cs:substitute { (substitute.names | rendering-element)+ }
+
+ ## Short version of cs:names, without children, allowed in cs:substitute.
+ substitute.names = element cs:names { names.attributes }
+}
+[ a:documentation [ xhtml:h2 [ "cs:date Rendering Element" ] ] ]
+div {
+ rendering-element.date =
+ element cs:date {
+ attribute variable { variables.dates },
+ ((
+ ## Limit the date parts rendered.
+ [ a:defaultValue = "year-month-day" ]
+ attribute date-parts {
+
+ ## Year, month and day
+ "year-month-day"
+ |
+ ## Year and month
+ "year-month"
+ |
+ ## Year only
+ "year"
+ }?,
+ date.form,
+ rendering-element.date.date-part.localized*)
+ | (rendering-element.date.date-part.non-localized+, delimiter)),
+ affixes,
+ display,
+ font-formatting,
+ text-case
+ }
+
+ rendering-element.date.date-part.localized =
+
+ ## Specify overriding formatting for localized dates (affixes
+ ## cannot be overridden, as these are considered locale-specific).
+ ## Example uses are forcing the use of leading-zeros, or of the
+ ## "short" month form. Has no effect on which, and in what order,
+ ## date parts are rendered.
+ element cs:date-part {
+ font-formatting, text-case, (day | month | year)
+ }
+
+ rendering-element.date.date-part.non-localized =
+
+ ## Specify, in the desired order, the date parts that should be
+ ## rendered and their formatting.
+ element cs:date-part {
+ affixes, font-formatting, text-case, (day | month | year)
+ }
+
+ day =
+ attribute name { "day" },
+
+ ## Day forms: "numeric" ("5"), "numeric-leading-zeros" ("05"), "ordinal"
+ ## ("5th").
+ [ a:defaultValue = "numeric" ]
+ attribute form { "numeric" | "numeric-leading-zeros" | "ordinal" }?,
+ range-delimiter
+
+ month =
+ attribute name { "month" },
+
+ ## Months forms: "long" (e.g., "January"), "short" ("Jan."), "numeric"
+ ## ("1"), and "numeric-leading-zeros" ("01").
+ [ a:defaultValue = "long" ]
+ attribute form {
+ "long" | "short" | "numeric" | "numeric-leading-zeros"
+ }?,
+ range-delimiter,
+ strip-periods
+
+ year =
+ attribute name { "year" },
+
+ ## Year forms: "long" ("2005"), "short" ("05").
+ [ a:defaultValue = "long" ] attribute form { "short" | "long" }?,
+ range-delimiter
+
+ range-delimiter =
+
+ ## Specify a delimiter for date ranges (by default the en-dash). A custom
+ ## delimiter is retrieved from the largest date part ("day", "month" or
+ ## "year") that differs between the two dates.
+ [ a:defaultValue = "–" ] attribute range-delimiter { text }?
+}
+[ a:documentation [ xhtml:h2 [ "cs:text Rendering Element" ] ] ]
+div {
+ rendering-element.text =
+
+ ## Use to call macros, render variables, terms, or verbatim text.
+ element cs:text {
+ text.attributes,
+ affixes,
+ display,
+ font-formatting,
+ quotes,
+ strip-periods,
+ text-case
+ }
+
+ text.attributes =
+
+ ## Select a macro.
+ attribute macro { xsd:NMTOKEN }
+ | (
+ ## Select a term.
+ attribute term { terms },
+ [ a:defaultValue = "long" ] attribute form { term.form }?,
+
+ ## Specify term plurality: singular ("false") or plural ("true").
+ [ a:defaultValue = "false" ] attribute plural { xsd:boolean }?)
+ |
+ ## Specify verbatim text.
+ attribute value { text }
+ | (
+ ## Select a variable.
+ attribute variable { variables.standard },
+ [ a:defaultValue = "long" ] attribute form { "short" | "long" }?)
+}
+[ a:documentation [ xhtml:h2 [ "cs:number Rendering Element" ] ] ]
+div {
+ rendering-element.number =
+
+ ## Use to render a number variable.
+ element cs:number {
+ number.attributes, affixes, display, font-formatting, text-case
+ }
+
+ number.attributes =
+ attribute variable { variables.numbers },
+
+ ## Number forms: "numeric" ("4"), "ordinal" ("4th"), "long-ordinal"
+ ## ("fourth"), "roman" ("iv").
+ [ a:defaultValue = "numeric" ]
+ attribute form { "numeric" | "ordinal" | "long-ordinal" | "roman" }?
+}
+[ a:documentation [ xhtml:h2 [ "cs:label Rendering Element" ] ] ]
+div {
+ rendering-element.label =
+
+ ## Use to render a term whose pluralization depends on the content of a
+ ## variable. E.g., if "page" variable holds a range, the plural label
+ ## "pp." is selected instead of the singular "p.".
+ element cs:label { label.attributes, label.attributes-shared }
+
+ label.attributes =
+ attribute variable { variables.numbers | "locator" | "page" },
+ [ a:defaultValue = "long" ]
+ attribute form { "long" | "short" | "symbol" }?
+
+ label.attributes-shared =
+
+ ## Specify when the plural version of a term is selected.
+ [ a:defaultValue = "contextual" ]
+ attribute plural { "always" | "never" | "contextual" }?,
+ affixes,
+ font-formatting,
+ strip-periods,
+ text-case
+}
+[ a:documentation [ xhtml:h2 [ "cs:group Rendering Element" ] ] ]
+div {
+ rendering-element.group =
+
+ ## Use to group rendering elements. Groups are useful for setting a
+ ## delimiter for the group children, for organizing the layout of
+ ## bibliographic entries (using the "display" attribute), and for
+ ## suppressing the rendering of terms and verbatim text when variables
+ ## are empty.
+ element cs:group {
+ group.attributes,
+ affixes,
+ delimiter,
+ display,
+ font-formatting,
+ rendering-element+
+ }
+
+ group.attributes = notAllowed?
+}
+[ a:documentation [ xhtml:h2 [ "Options" ] ] ]
+div {
+ style.options =
+ style.demote-non-dropping-particle,
+ style.initialize-with-hyphen,
+ style.page-range-format,
+ names-inheritable-options,
+ name-inheritable-options
+
+ citation.options =
+ citation.cite-group-delimiter,
+ citation.collapse-options,
+ citation.disambiguate-options,
+ citation.near-note-distance,
+ names-inheritable-options,
+ name-inheritable-options
+
+ bibliography.options =
+ bibliography.hanging-indent,
+ bibliography.line-formatting-options,
+ bibliography.second-field-align,
+ bibliography.subsequent-author-substitute-options,
+ names-inheritable-options,
+ name-inheritable-options
+
+ style.demote-non-dropping-particle =
+
+ ## Specify whether the non-dropping particle is demoted in inverted
+ ## names (e.g., "Koning, W. de").
+ [ a:defaultValue = "display-and-sort" ]
+ attribute demote-non-dropping-particle {
+ "never" | "sort-only" | "display-and-sort"
+ }?
+
+ style.initialize-with-hyphen =
+
+ ## Specify whether compound given names (e.g., "Jean-Luc") are
+ ## initialized with ("J-L") or without a hyphen ("JL").
+ [ a:defaultValue = "true" ]
+ attribute initialize-with-hyphen { xsd:boolean }?
+
+ style.page-range-format =
+
+ ## Reformat page ranges in the "page" variable.
+ attribute page-range-format {
+ "chicago" | "expanded" | "minimal" | "minimal-two"
+ }?
+
+ citation.cite-group-delimiter =
+
+ ## Activate cite grouping and specify the delimiter for cites within a
+ ## cite group.
+ [ a:defaultValue = ", " ] attribute cite-group-delimiter { text }?
+
+ citation.collapse-options =
+
+ ## Activate cite grouping and specify the method of citation collapsing.
+ attribute collapse {
+
+ ## Collapse ranges of numeric cites, e.g. from "[1,2,3]" to "[1-3]".
+ "citation-number"
+ |
+ ## Collapse cites by suppressing repeated names, e.g. from "(Doe
+ ## 2000, Doe 2001)" to "(Doe 2000, 2001)".
+ "year"
+ |
+ ## Collapse cites as with "year", but also suppresses repeated
+ ## years, e.g. from "(Doe 2000a, Doe 2000b)" to "(Doe 2000a, b)".
+ "year-suffix"
+ |
+ ## Collapses cites as with "year-suffix", but also collapses
+ ## ranges of year-suffixes, e.g. from "(Doe 2000a, Doe 2000b,
+ ## Doe 2000c)" to "(Doe 2000a-c)".
+ "year-suffix-ranged"
+ }?,
+
+ ## Specify the delimiter between year-suffixes. Defaults to the cite
+ ## delimiter.
+ attribute year-suffix-delimiter { text }?,
+
+ ## Specify the delimiter following a group of collapsed cites. Defaults
+ ## to the cite delimiter.
+ attribute after-collapse-delimiter { text }?
+
+ citation.disambiguate-options =
+
+ ## Set to "true" to activate disambiguation by showing names that were
+ ## originally hidden as a result of et-al abbreviation.
+ [ a:defaultValue = "false" ]
+ attribute disambiguate-add-names { xsd:boolean }?,
+
+ ## Set to "true" to activate disambiguation by expanding names, showing
+ ## initials or full given names.
+ [ a:defaultValue = "false" ]
+ attribute disambiguate-add-givenname { xsd:boolean }?,
+
+ ## Set to "true" to activate disambiguation by adding year-suffixes
+ ## (e.g., "(Doe 2007a, Doe 2007b)") for items from the same author(s)
+ ## and year.
+ [ a:defaultValue = "false" ]
+ attribute disambiguate-add-year-suffix { xsd:boolean }?,
+
+ ## Specify how name are expanded for disambiguation.
+ [ a:defaultValue = "by-cite" ]
+ attribute givenname-disambiguation-rule {
+
+ ## Each ambiguous names is progressively transformed until
+ ## disambiguated (when disambiguation is not possible, the name
+ ## remains in its original form).
+ "all-names"
+ |
+ ## As "all-names", but name expansion is limited to showing
+ ## initials.
+ "all-names-with-initials"
+ |
+ ## As "all-names", but disambiguation is limited to the first name
+ ## of each cite.
+ "primary-name"
+ |
+ ## As "all-names-with-initials", but disambiguation is limited to
+ ## the first name of each cite.
+ "primary-name-with-initials"
+ |
+ ## As "all-names", but only ambiguous names in ambiguous cites are
+ ## expanded.
+ "by-cite"
+ }?
+
+ citation.near-note-distance =
+
+ ## Set the number of preceding notes (footnotes or endnotes) within
+ ## which the current item needs to have been previously cited in order
+ ## for the "near-note" position to be "true".
+ [ a:defaultValue = "5" ]
+ attribute near-note-distance { xsd:integer }?
+
+ bibliography.hanging-indent =
+
+ ## Set to "true" to render bibliographic entries with hanging indents.
+ [ a:defaultValue = "false" ]
+ attribute hanging-indent { xsd:boolean }?
+
+ bibliography.line-formatting-options =
+
+ ## Set the spacing between bibliographic entries.
+ [ a:defaultValue = "1" ]
+ attribute entry-spacing { xsd:nonNegativeInteger }?,
+
+ ## Set the spacing between bibliographic lines.
+ [ a:defaultValue = "1" ]
+ attribute line-spacing {
+ xsd:integer { minExclusive = "0" }
+ }?
+
+ bibliography.second-field-align =
+
+ ## Use to align any subsequent lines of bibliographic entries with the
+ ## beginning of the second field.
+ attribute second-field-align {
+
+ ## Align the first field with the margin.
+ "flush"
+ |
+ ## Put the first field in the margin and align all subsequent
+ ## lines of text with the margin.
+ "margin"
+ }?
+
+ bibliography.subsequent-author-substitute-options =
+
+ ## Substitute names that repeat in subsequent bibliographic entries by
+ ## the attribute value.
+ attribute subsequent-author-substitute { text }?,
+
+ ## Specify the method of substitution of names repeated in subsequent
+ ## bibliographic entries.
+ [ a:defaultValue = "complete-all" ]
+ attribute subsequent-author-substitute-rule {
+
+ ## Requires a match of all rendered names in the name variable, and
+ ## substitutes once for all names.
+ "complete-all"
+ |
+ ## Requires a match of all rendered names in the name variable,
+ ## and substitutes for each name.
+ "complete-each"
+ |
+ ## Substitutes for each name, until the first mismatch.
+ "partial-each"
+ |
+ ## Substitutes the first name if it matches.
+ "partial-first"
+ }?
+
+ ## Options affecting cs:names, for cs:style, cs:citation and cs:bibliography.
+ names-inheritable-options =
+
+ ## Inheritable name option, companion for "delimiter" on cs:names.
+ attribute names-delimiter { text }?
+
+ ## Options affecting cs:name, for cs:style, cs:citation and cs:bibliography.
+ name-inheritable-options =
+ name.attributes,
+
+ ## Inheritable name option, companion for "delimiter" on cs:name.
+ attribute name-delimiter { text }?,
+
+ ## Inheritable name option, companion for "form" on cs:name.
+ [ a:defaultValue = "long" ]
+ attribute name-form { "long" | "short" | "count" }?
+}
+[ a:documentation [ xhtml:h2 [ "cs:sort - Sorting" ] ] ]
+div {
+ sort =
+
+ ## Specify how cites and bibliographic entries should be sorted. By
+ ## default, items appear in the order in which they were cited.
+ element cs:sort { sort.key+ }
+
+ sort.key =
+ element cs:key {
+ (attribute variable { variables }
+ | attribute macro { xsd:NMTOKEN }),
+
+ ## The minimum number of names needed in a name variable to activate
+ ## name list truncation. Overrides the values set on any
+ ## "et-al-(subsequent-)min" attributes.
+ attribute names-min { xsd:integer }?,
+
+ ## The number of names to render when name list truncation is
+ ## activated. Overrides the values set on the
+ ## "et-al-(subsequent-)use-first" attributes.
+ attribute names-use-first { xsd:integer }?,
+
+ ## Use to override the value of the "et-at-use-last" attribute.
+ attribute names-use-last { xsd:boolean }?,
+
+ ## Select between an ascending and descending sort.
+ [ a:defaultValue = "ascending" ]
+ attribute sort { "ascending" | "descending" }?
+ }
+}
+[
+ a:documentation [ xhtml:h2 [ "cs:choose - Conditional Statements" ] ]
+]
+div {
+ rendering-element.choose =
+
+ ## Use to conditionally render rendering elements.
+ element cs:choose { choose.if, choose.else-if*, choose.else? }
+
+ choose.if = element cs:if { condition+, match, rendering-element* }
+
+ choose.else-if =
+ element cs:else-if { condition+, match, rendering-element* }
+
+ choose.else = element cs:else { rendering-element+ }
+
+ condition =
+
+ ## If used, the element content is only rendered if it disambiguates two
+ ## otherwise identical citations. This attempt at disambiguation is only
+ ## made after all other disambiguation methods have failed.
+ [ a:defaultValue = "true" ] attribute disambiguate { "true" }
+ |
+ ## Tests whether the given variables contain numeric text.
+ attribute is-numeric {
+ list { variables+ }
+ }
+ |
+ ## Tests whether the given date variables contain approximate dates.
+ attribute is-uncertain-date {
+ list { variables.dates+ }
+ }
+ |
+ ## Tests whether the locator matches the given locator types.
+ attribute locator {
+ list { (terms.locator.testable | "sub-verbo")+ }
+ }
+ |
+ ## Tests whether the cite position matches the given positions.
+ attribute position {
+ list {
+ ("first"
+ | "subsequent"
+ | "ibid"
+ | "ibid-with-locator"
+ | "near-note")+
+ }
+ }
+ |
+ ## Tests whether the item matches the given types.
+ attribute type {
+ list { item-types+ }
+ }
+ |
+ ## Tests whether the default ("long") forms of the given variables
+ ## contain non-empty values.
+ attribute variable {
+ list { variables+ }
+ }
+
+ match =
+
+ ## Set the testing logic.
+ [ a:defaultValue = "all" ]
+ attribute match {
+
+ ## Element only tests "true" when all conditions test "true" for all
+ ## given test values.
+ "all"
+ |
+ ## Element tests "true" when any condition tests "true" for any given
+ ## test value.
+ "any"
+ |
+ ## Element only tests "true" when none of the conditions test "true"
+ ## for any given test value.
+ "none"
+ }?
+}
+
+## Formatting attributes.
+div {
+ affixes =
+ [ a:defaultValue = "" ] attribute prefix { text }?,
+ [ a:defaultValue = "" ] attribute suffix { text }?
+
+ delimiter = attribute delimiter { text }?
+
+ display =
+
+ ## By default, bibliographic entries consist of continuous runs of text.
+ ## With the "display" attribute, portions of each entry can be
+ ## individually positioned.
+ attribute display {
+
+ ## Places the content in a block stretching from margin to margin.
+ "block"
+ |
+ ## Places the content in a block starting at the left margin.
+ "left-margin"
+ |
+ ## Places the content in a block to the right of a preceding
+ ## "left-margin" block.
+ "right-inline"
+ |
+ ## Places the content in a block indented to the right by a standard
+ ## amount.
+ "indent"
+ }?
+
+ ## The font-formatting attributes are based on those of CSS and XSL-FO.
+ font-formatting =
+ [ a:defaultValue = "normal" ]
+ attribute font-style { "italic" | "normal" | "oblique" }?,
+ [ a:defaultValue = "normal" ]
+ attribute font-variant { "normal" | "small-caps" }?,
+ [ a:defaultValue = "normal" ]
+ attribute font-weight { "normal" | "bold" | "light" }?,
+ [ a:defaultValue = "none" ]
+ attribute text-decoration { "none" | "underline" }?,
+ [ a:defaultValue = "baseline" ]
+ attribute vertical-align { "baseline" | "sup" | "sub" }?
+
+ quotes =
+
+ ## When set to "true", quotes are placed around the rendered text.
+ [ a:defaultValue = "false" ] attribute quotes { xsd:boolean }?
+
+ strip-periods =
+
+ ## When set to "true", periods are removed from the rendered text.
+ [ a:defaultValue = "false" ]
+ attribute strip-periods { xsd:boolean }?
+
+ text-case =
+ attribute text-case {
+
+ ## Renders text in lowercase.
+ "lowercase"
+ |
+ ## Renders text in uppercase.
+ "uppercase"
+ |
+ ## Capitalizes the first character (other characters remain in
+ ## their original case).
+ "capitalize-first"
+ |
+ ## Capitalizes the first character of every word (other characters
+ ## remain in their original case).
+ "capitalize-all"
+ |
+ ## Renders text in title case.
+ "title"
+ |
+ ## Renders text in sentence case.
+ "sentence"
+ }?
+}
diff --git a/schema-1.0.1/csl.sch b/schema-1.0.1/csl.sch
new file mode 100644
index 0000000..58a4555
--- /dev/null
+++ b/schema-1.0.1/csl.sch
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+ This macro call has no corresponding macro.
+
+
+
+
+
+ This macro call has no corresponding macro.
+
+
+
+
+
+
diff --git a/schema-1.0.1/test.rnc b/schema-1.0.1/test.rnc
new file mode 100755
index 0000000..e0a27f5
--- /dev/null
+++ b/schema-1.0.1/test.rnc
@@ -0,0 +1,25 @@
+
+namespace cs = "http://purl.org/net/xbiblio/csl"
+namespace dc = "http://purl.org/dc/elements/1.1/"
+namespace sch = "http://www.ascc.net/xml/schematron"
+namespace xhtml = "http://www.w3.org/1999/xhtml"
+
+dc:title [ "CSL Test Suite Schema" ]
+dc:creator [ "Bruce D'Arcus" ]
+dc:rights [ "Permission to freely use, copy and distribute." ]
+dc:description [
+ "Describes a simple format for CSL processor tests."
+]
+
+include "csl.rnc"{
+ # here I've redefined the style pattern to allow an optional
+ # no-namespace style link (not sure if it should be namespaced)
+ style |= element style { attribute src { xsd:anyURI } }
+ start = element test { input & style & style-locale* & description? & tag* & output }
+ }
+
+input = element input { text }
+description = element description { text }
+tag = element tag { token }
+# right now plain text, but we can (should?) define an HTML output subset?
+output = element output { text }
diff --git a/src/bazga.csl b/src/bazga.csl
new file mode 100644
index 0000000..49b9f8c
--- /dev/null
+++ b/src/bazga.csl
@@ -0,0 +1,413 @@
+
+
+
+