Skip to content
Newer
Older
100644 144 lines (129 sloc) 3.98 KB
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 28, 2013
1 namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
2 namespace cs = "http://purl.org/net/xbiblio/csl"
3 namespace dc = "http://purl.org/dc/elements/1.1/"
4
5 dc:title [ "Extension schema for the Citation Style Language styles repository" ]
b62494c @rmzelle Work on CSL extension schema for styles repository
rmzelle authored Mar 30, 2013
6 dc:creator [ "Rintze M. Zelle" ]
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
7 dc:rights [
b62494c @rmzelle Work on CSL extension schema for styles repository
rmzelle authored Mar 30, 2013
8 "Copyright 2013 Rintze M. Zelle. Permission to freely use, copy and distribute."
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
9 ]
10 dc:description [
11 "Enforces stricter requirements for the styles in the official CSL styles repository."
12 ]
13
14 include "csl.rnc" {
15
16 ## Remove legacy attributes from cs:style of dependents
17 dependent-style.style =
18 element cs:style {
19 style.default-locale,
20 version,
21 dependent-style.style.info
22 }
23
262af55 @rmzelle Be more picky about repository dependents, too
rmzelle authored Apr 28, 2013
24 ## - Only allow cs:issn once
25 ## - Require a cs:rights element
26 ## - Forgo "interleave" (so the elements need to be in the order specified),
27 ## so that we can require
28 ## * one cs:link with "self"
29 ## * any number of cs:link with "template"
30 ## * at least one cs:link with "documentation"
31 ## * one cs:category with "citation-format"
32 ## * any number of cs:category with "field".
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
33 ## Metadata for independent styles.
34 independent-style.style.info =
35 element cs:info {
4f26fc2 @rmzelle Be more demanding of independents styles (cs:link, cs:category)
rmzelle authored Apr 28, 2013
36 info.title,
37 info.title-short?,
38 info.id,
39 independent-style.info.link.self,
40 independent-style.info.link.template*,
41 independent-style.info.link.documentation+,
42 info.author*,
43 info.contributor*,
44 info.category.citation-format,
45 info.category.field*,
46 info.issn?,
47 info.eissn?,
48 info.issnl?,
49 info.summary?,
50 info.published?,
51 info.updated,
52 info.rights
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
53 }
b62494c @rmzelle Work on CSL extension schema for styles repository
rmzelle authored Mar 30, 2013
54
262af55 @rmzelle Be more picky about repository dependents, too
rmzelle authored Apr 28, 2013
55 ## - Only allow cs:issn once
56 ## - Require a cs:rights element
57 ## - Forgo "interleave" (so the elements need to be in the order specified),
58 ## so that we can require
59 ## * one cs:link with "self"
60 ## * one cs:link with "independent-parent"
61 ## * any number of cs:link with "documentation"
62 ## * one cs:category with "citation-format"
63 ## * any number of cs:category with "field".
b62494c @rmzelle Work on CSL extension schema for styles repository
rmzelle authored Mar 30, 2013
64 ## Metadata for dependent styles.
65 dependent-style.style.info =
66 element cs:info {
262af55 @rmzelle Be more picky about repository dependents, too
rmzelle authored Apr 28, 2013
67 info.title,
68 info.title-short?,
69 info.id,
70 independent-style.info.link.self,
71 independent-style.info.link.independent-parent,
72 independent-style.info.link.documentation*,
73 info.author*,
74 info.contributor*,
75 info.category.citation-format,
76 info.category.field*,
77 info.issn?,
78 info.eissn?,
79 info.issnl?,
80 info.summary?,
81 info.published?,
82 info.updated,
83 info.rights
b62494c @rmzelle Work on CSL extension schema for styles repository
rmzelle authored Mar 30, 2013
84 }
85
86 ## Require "license" attribute; require specific value for "license" attribute and
87 ## text content for cs:rights
88 info.rights =
89 element cs:rights {
90 attribute license { "http://creativecommons.org/licenses/by-sa/3.0/" },
91 attribute xml:lang { xsd:language }?,
92 "This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License"
93 }
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
94
95 ## Remove legacy attributes from cs:et-al
96 names.et-al =
97
98 ## Specify the term used for et-al abbreviation and its formatting.
99 element cs:et-al {
100
101 ## Select the term to use for et-al abbreviation.
102 [ a:defaultValue = "et-al" ]
103 attribute term { "et-al" | "and others" }?,
104 font-formatting
105 }
4f26fc2 @rmzelle Be more demanding of independents styles (cs:link, cs:category)
rmzelle authored Apr 28, 2013
106 }
107
108 independent-style.info.link.self =
109 element cs:link {
110 attribute href { xsd:anyURI },
111 attribute rel { "self" },
112 info-text
113 }
114
115 independent-style.info.link.template =
116 element cs:link {
117 attribute href { xsd:anyURI },
118 attribute rel { "template" },
119 info-text
120 }
121
262af55 @rmzelle Be more picky about repository dependents, too
rmzelle authored Apr 28, 2013
122 independent-style.info.link.independent-parent =
123 element cs:link {
124 attribute href { xsd:anyURI },
125 attribute rel { "independent-parent" },
126 info-text
127 }
128
4f26fc2 @rmzelle Be more demanding of independents styles (cs:link, cs:category)
rmzelle authored Apr 28, 2013
129 independent-style.info.link.documentation =
130 element cs:link {
131 attribute href { xsd:anyURI },
132 attribute rel { "documentation" },
133 info-text
134 }
135
136 info.category.citation-format =
137 element cs:category {
138 attribute citation-format { category.citation-format }
139 }
140
141 info.category.field =
142 element cs:category {
143 attribute field { category.field }
1730a30 @rmzelle Start of extended CSL schema for styles repository
rmzelle authored Mar 29, 2013
144 }
Something went wrong with that request. Please try again.